How many students in a class play cricket or football, if we know how many play each and how many play both? Questions like this are answered by a small set of results about cardinal numbers. Each one comes from looking at the regions of a Venn diagram and counting every element exactly once. This lesson collects the results; the next two lessons use them to solve problems.
The regions of a Venn diagram#
For two sets A and B in a universal set U, label the number of elements in each region:
Then n(A)=a+b, n(B)=b+c, n(A∪B)=a+b+c, and n(U)=a+b+c+d. Every result below can be checked from these four numbers.
Results for two sets#
1. n(A∪B)=n(A)+n(B)−n(A∩B)
Adding n(A) and n(B) counts the overlap twice: (a+b)+(b+c)=a+2b+c. Subtracting n(A∩B)=b once corrects this.
2. n(A∪B)=n(A)+n(B) when A and B are disjoint, since then there is no overlap.
3. n(A−B)=n(A)−n(A∩B)=n(A∪B)−n(B)=n(A∩B′). Each of these equals a.
4. n(B−A)=n(B)−n(A∩B)=n(A∪B)−n(A)=n(B∩A′). Each equals c.
5. n(AΔB)=n(A−B)+n(B−A)=n(A)+n(B)−2n(A∩B)=n(A∪B)−n(A∩B). Each equals a+c.
6. n(A′)=n(U)−n(A), since A′=U−A.
7. n(A′∪B′)=n((A∩B)′)=n(U)−n(A∩B), using De Morgan's law.
8. n(A′∩B′)=n((A∪B)′)=n(U)−n(A∪B), also by De Morgan's law. This counts the elements in neither set.
Example 1#
If n(U)=700, n(A)=200, n(B)=300 and n(A∩B)=100, find n(A′∩B′).
n(A′∩B′)=n((A∪B)′)=n(U)−n(A∪B)=n(U)−[n(A)+n(B)−n(A∩B)]=700−(200+300−100)=700−400=300
Example 2#
If n(A)=50, n(B)=20 and n(A∩B)=10, find n(AΔB).
n(AΔB)=n(A−B)+n(B−A)=[n(A)−n(A∩B)]+[n(B)−n(A∩B)]=n(A)+n(B)−2n(A∩B)
So n(AΔB)=50+20−2×10=50.
How large can a union or intersection be?#
9. n(A∩B)≤n(A) and n(A∩B)≤n(B), because A∩B is a subset of both. So n(A∩B) is at most the smaller of n(A) and n(B).
10. Let n(A)=p and n(B)=q. Then:
The union is smallest when the smaller set lies inside the larger one, and largest when the sets are disjoint. The intersection is largest when one set lies inside the other, and smallest (0) when they are disjoint. For instance, with p=2 and q=3:
Example 3#
Sets A and B have 3 and 6 elements. What is the least number of elements in A∪B? The greatest?
The least is max{3,6}=6, when A⊆B. The greatest is 3+6=9, when A and B are disjoint.
Results for three sets#
11. n(A∪B∪C)=n(A)+n(B)+n(C)−n(A∩B)−n(B∩C)−n(C∩A)+n(A∩B∩C)
Adding the three sets counts the pairwise overlaps twice; subtracting the three pairwise intersections corrects that, but the central region A∩B∩C has now been added three times and subtracted three times, so it is added back once.
Label the seven regions of the three-circle diagram: x1, x5, x7 for "only A", "only B", "only C"; x2, x6, x4 for "A and B only", "B and C only", "A and C only"; and x3 for the centre, in all three.
12. Elements in exactly one of the sets:
n(A)+n(B)+n(C)−2[n(A∩B)+n(B∩C)+n(A∩C)]+3n(A∩B∩C)
Check with the regions: n(A)+n(B)+n(C) counts each "only" region once, each "two only" region twice, and the centre three times. Subtracting twice the pairwise intersections removes each "two only" region twice and the centre six times. Adding 3x3 restores the centre to zero. What is left is x1+x5+x7.
13. Elements in exactly two of the sets:
n(A∩B)+n(B∩C)+n(C∩A)−3n(A∩B∩C)
Each pairwise intersection is a "two only" region plus the centre, so the three of them add up to the three "two only" regions plus three times the centre.
Example 4#
Given n(A)=20, n(B)=25, n(C)=30, n(A∩B)=8, n(B∩C)=10, n(A∩C)=7 and n(A∩B∩C)=3, find n(A∪B∪C) and the numbers of elements in exactly one and in exactly two of the sets.
n(A∪B∪C)=75−25+3=53.
Exactly two: 25−3×3=16.
Exactly one: 75−2×25+3×3=34.
Check: exactly one, exactly two and all three together give 34+16+3=53, which is n(A∪B∪C).
Practice#
- If n(A)=12, n(B)=17 and n(A∪B)=21, find n(A∩B).
- If A and B are disjoint, with n(A)=15 and n(B)=10, find n(A∪B).
- If n(U)=50, n(A)=20, n(B)=25 and n(A∩B)=8, find n(A′∩B′) and n(A′∪B′).
- If n(A)=30, n(B)=18 and n(A∩B)=6, find n(A−B), n(B−A) and n(AΔB).
- If n(A)=8 and n(B)=5, find the least and greatest possible values of n(A∪B) and of n(A∩B).
- If n(A)=n(B)=n(C)=10, each pairwise intersection has 4 elements and n(A∩B∩C)=2, find n(A∪B∪C).
- For the sets in question 6, how many elements are in exactly one set, and how many in exactly two?
- If n(U)=40 and n(A)=15, find n(A′).
- If n(A∪B)=40, n(A)=25 and n(B)=22, find n(AΔB).
- If n(U)=60, n(A′)=35, n(B′)=30 and n(A∩B)=10, find n((A∪B)′).
Answers#
Show answers
- 12+17−21=8
- 25
- n(A∪B)=37, so n(A′∩B′)=50−37=13; n(A′∪B′)=50−8=42.
- n(A−B)=24, n(B−A)=12, n(AΔB)=36.
- n(A∪B): least 8, greatest 13. n(A∩B): least 0, greatest 5.
- 30−12+2=20
- Exactly two: 12−6=6. Exactly one: 30−24+6=12. (Check: 12+6+2=20.)
- 40−15=25
- n(A∩B)=25+22−40=7, so n(AΔB)=40−7=33.
- n(A)=25 and n(B)=30, so n(A∪B)=25+30−10=45 and n((A∪B)′)=60−45=15.