Practical problems on union and intersection
Counting with sets is everywhere , surveys, polls, exam statistics, sports data. The key formula is the inclusion–exclusion principle: if we add the sizes of overlapping sets we overcount the overlap, so we must subtract it back. Drawing a Venn diagram in every problem keeps the bookkeeping clean.
Definitions and formulas
For finite sets :
For three sets:
If are disjoint then , recovering the easier rule.
Also useful: and .
Derivation of the two-set formula
Split into three disjoint pieces:
- (in only),
- (in only),
- (in both).
These three are pairwise disjoint and their union is . So
Now (since splits as "only in " and "in both"). Similarly . Adding, Hence
Derivation of the three-set formula
Apply the two-set formula to and : Expand and use the distributive law so Substitute:
A working strategy
For a survey problem with two groups, three groups, or "at least one / exactly one":
- Read carefully and label each given count as etc.
- Draw a Venn diagram and fill in the innermost region first (). Then work outwards using subtraction.
- For "at least one of ": . For "in only": . For "neither": .
- For "exactly one": (or for three sets, sum the three single-only regions).
Worked examples
Example 1. In a class of students, play cricket, play football, and play both. How many play at least one of the two? How many play neither?
. Neither: .
Example 2. Of students, like Maths, like Science, and like both. How many like Maths only? Only Science? Neither?
Maths only: . Science only: . At least one: . Neither: .
Example 3. In a survey of people, read newspaper , read , and read both. How many read exactly one?
Read at least one: . Read both: . Exactly one: .
Example 4 (three sets). In a group of students, study Physics, Chemistry and Maths. study Physics and Chemistry, Chemistry and Maths, Physics and Maths, and study all three. How many study at least one subject? How many study none?
. None: .
Example 5 (harder). In a survey, people speak Hindi, speak English, speak Tamil. speak Hindi and English, English and Tamil, Hindi and Tamil, and all three. How many speak (a) at least one of the three languages? (b) exactly one of the three? (c) exactly two of the three?
(a) .
(b) Region counts (using Venn diagram, working inwards–outwards):
- All three: .
- only: . Similarly only: . only: .
- Hindi only: . English only: . Tamil only: .
Exactly one: .
(c) Exactly two: .
Sanity check: , matching part (a).
Try it yourself
- In a class of , play hockey, play badminton, play both. How many play at least one? Neither?
- Out of voters, favour candidate , favour , favour both. How many favour neither?
- In a group of , like tea, like coffee, like both. Find the number who like only tea, only coffee, neither.
- , , . Find .
- , , , . Find .
- In a group of , like apples, like bananas, like cherries. like apples and bananas, bananas and cherries, apples and cherries, all three. Find at least one and exactly one.
- In a survey of students, play cricket, tennis, both. How many play exactly one game?
- Of households, subscribe to newspaper , to , to both. Find: (a) at least one; (b) exactly one; (c) neither.
- In a class, every student studies at least one of Maths, Physics or Chemistry. study Maths, Physics, Chemistry, Maths and Physics, Physics and Chemistry, Maths and Chemistry, all three. How many students are in the class?
- Of students, play football, cricket, basketball. play football and cricket, cricket and basketball, football and basketball, all three. How many play none?
- Show using inclusion–exclusion: if , , , then .
- In a class of , passed Maths, passed Science, and failed both. How many passed both?
Pitfalls / Tricks
- Always check that and . If your computed values violate either, you have an arithmetic error or a misread of the problem.
- Fill the Venn diagram from the innermost region outwards. Putting numbers in the wrong region is the single biggest source of mistakes.
- "At least one" "exactly one". Read the question precisely.
- Insight. Inclusion–exclusion is the same formula in counting and probability , replacing by gives the addition rule for probability. We will meet it again in Chapter 14.