Sub topic 3
The Three-Set Inclusion-Exclusion Formula
Prerequisites
This chapter assumes you can read a two-set Venn diagram, apply the two-set formula n(A∪B) = n(A) + n(B) − n(A∩B), and find a complement inside a universal set U.
The Three-Set Formula
For three sets A, B and C:
n(A∪B∪C) = n(A) + n(B) + n(C) − n(A∩B) − n(B∩C) − n(A∩C) + n(A∩B∩C)
The triple region is counted three times in the single sets and removed three times in the pairwise overlaps. It is therefore added back once.
Exactly One, Exactly Two and Exactly Three
Exactly three is n(A∩B∩C). Exactly two is the sum of the pairwise overlaps minus three times the triple overlap. Exactly one is the union minus the exactly-two and exactly-three counts.
n_a, n_b, n_c = 30, 25, 20
n_ab, n_bc, n_ac = 10, 8, 6
n_abc = 4
union = n_a + n_b + n_c - (n_ab + n_bc + n_ac) + n_abc
exactly_three = n_abc
exactly_two = (n_ab + n_bc + n_ac) - 3 * n_abc
exactly_one = union - exactly_two - exactly_three
print(union, exactly_one, exactly_two, exactly_three) # 55 39 12 4Minimum and Maximum Overlap
For two sets in a universe of size T, the overlap satisfies max(0, n(A) + n(B) − T) ≤ n(A∩B) ≤ min(n(A), n(B)). The lower bound applies when the sets fill the universe as tightly as possible. The upper bound applies when the smaller set lies wholly inside the larger one.
De Morgan's Laws
The complement of A∪B equals A′∩B′, and the complement of A∩B equals A′∪B′. For counting, "neither" equals U − n(A∪B), which is the complement route.
Counting Subsets and the Power Set
A set with k elements has 2^k subsets, including the empty set and the set itself. A three-element set therefore has 8 subsets. Use this only to count subsets, not Venn regions.
CAT Strategy: Traps, Shortcuts and Consistency Checks
Check that every region is non-negative. Check that the union does not exceed the universe. Check that the exactly-one, exactly-two and exactly-three regions add up to the union.
Exercise
The universe has 60 students. Sets A, B and C have sizes 30, 25 and 20. The pairwise overlaps are 10, 8 and 6, and the triple overlap is 4. How many students are in none of the sets?
Show answer
The union is 55, so 60 − 55 = 5 students are in none of the sets.