Lesson 31 of 36 · Quantitative reasoning
Sets, overlaps and worst cases
Count overlapping groups with inclusion–exclusion and the exactly-two formula, fill Venn diagrams from the centre out, and find worst-case guarantees.
About 22 minutes
In this lesson
- Count a union, a "neither" group or an overlap of two or three sets with inclusion–exclusion.
- Use the exactly-two formula, and fill a three-set Venn diagram from the centre out.
- Find the smallest number of draws that guarantees an outcome, and the smallest and largest possible overlap of two groups.
The idea
Two sets: add, then remove the double count
When two groups overlap, adding their sizes counts everyone in the overlap twice, so take the overlap off once:
Here is the number in at least one group and the number in both. Many questions also mention people in neither group, so write the whole population as
Any one of the five numbers follows from the other four. Of 40 students, if 25 take finance, 18 take marketing and 7 take both, then take at least one and take neither. The same rule for probabilities is in counting and probability.
A two-way table does the same job and makes the "only" groups visible. Every row and column must add up, so a missing cell can be filled from the others:
| Marketing | No marketing | Total | |
|---|---|---|---|
| Finance | 7 | 18 | 25 |
| No finance | 11 | 4 | 15 |
| Total | 18 | 22 | 40 |
Three sets: inclusion–exclusion
Follow one person who belongs to all three groups. The first three terms count them three times. They also sit in all three pairwise overlaps, so the subtractions remove them three times, leaving zero; adding brings the count back to one. A person in exactly two groups is counted twice and subtracted once, which is right.
In this formula means everyone in both A and B, including those also in C. A question that says "15 firms export to France and Germany" normally means this whole overlap; "only to France and Germany" or "to exactly these two" means the part outside the centre.
Exactly one, exactly two, all three
Split everyone in at least one group into layers: people in exactly one group, in exactly two and in all three. Then:
- counting people, ;
- counting memberships, , because each person is counted once for every group they are in.
Subtracting the first line from the second gives , which rearranges to
The sum of the three groups holds one extra copy of each exactly-two person and two extra copies of each all-three person; the formula removes exactly those copies. Use it when a question gives or asks for "exactly two"; use inclusion–exclusion when it gives pairwise "both" counts. The two connect because the three pairwise counts add up to : an all-three person sits in all three pairs.
Filling a Venn diagram from the centre out
Three circles make seven regions, plus the outside for "none". When the pairwise counts are given, fill the regions in this order:
- The centre: all three.
- Each pair-only region: the pairwise count minus the centre.
- Each single-only region: the group's total minus its two pair-only regions and the centre.
- None: the total minus all seven regions.
Each step uses only numbers already found, so nothing is taken off twice. Starting from a group's total instead forces a guess about how much of it lies in the overlaps. Before answering, check that every region is zero or more and that the seven regions add up to the union given by the formula.
How small or large can an overlap be?
Sometimes only the group sizes are known. If 70 of 100 people like A and 60 like B, at least like both, because 130 memberships cannot fit into 100 people otherwise; and at most 60 do, when the smaller group lies entirely inside the larger. In general
Worst cases and guarantees
"How many must be drawn to be sure of…" asks about the worst possible luck, not the average. Build the largest selection that still fails, then add one: the next item cannot avoid success. This is the pigeonhole principle: put more items than boxes into boxes, and some box holds at least two.
- To be sure of of the same kind among kinds, the worst case holds of each, so draws are needed. With 4 kinds, 3 of one kind needs draws.
- A scarce kind caps the worst case. A kind with fewer than items can contribute only what it has. Add up what each kind can give without reaching , then add one.
- To be sure of a particular kind, the worst case takes every item of the other kinds first.
Test the answer by trying to build a failing selection of that size. If none exists, and one item fewer can fail, the answer is right.
Worked examples
Example 1: Exactly two electives
In a cohort of 120 students, 64 take a finance elective, 52 a marketing elective and 40 a data elective; a student may take several. 12 take all three and 8 take none. How many take exactly two of the electives?
Those in at least one elective: .
Sum of the three groups: . This counts each student once for every elective they take.
Apply : , so .
Check by counting memberships: exactly one is , and , the sum of the groups.
Answer
20 students take exactly two electives. Subtracting the 12 only once gives 32, and ignoring them gives 44; each all-three student is counted three times in 156 and must lose two copies.
Example 2: Filling the diagram from the centre
Of 100 firms surveyed, 45 export to France, 38 to Germany and 30 to Spain. 15 export to both France and Germany, 12 to both France and Spain, 10 to both Germany and Spain, and 5 to all three. How many export to none of the three countries, and how many to France only?
Centre: 5 firms export to all three.
Pair-only regions: France and Germany only ; France and Spain only ; Germany and Spain only .
Single-only regions: France only ; Germany only ; Spain only .
In at least one country: , so none is .
Check with inclusion–exclusion: .
Answer
19 firms export to none of the three and 23 to France only. Taking France only as removes the 5 all-three firms twice, since both pairwise counts include them.
Example 3: Same colour, guaranteed
A bag holds 9 red, 7 green and 4 yellow counters. Counters are taken out without looking. How many must be taken to be sure of (a) 3 of the same colour, (b) 6 of the same colour?
(a) The largest selection without 3 of one colour has 2 of each: counters. The 7th must make a third of some colour.
(b) Without 6 of one colour you can hold at most 5 red and 5 green, but only the 4 yellow that exist: counters.
So 15 counters guarantee 6 of one colour: any 15 with at most 5 red, 5 green and 4 yellow would number at most 14, which is impossible.
Check that one fewer can fail: 14 counters can be 5 red, 5 green and 4 yellow, with no colour reaching 6.
Answer
(a) 7; (b) 15. The formula overshoots in (b), because the bag has only 4 yellow counters, not 5.
Common traps
Reading "both" as "only those two"
Unless the question says "only" or "exactly", a pairwise count such as "15 export to France and Germany" includes those that also export to Spain. Subtract the centre to get the pair-only region; using the pairwise count as the region counts the centre again.
Subtracting the all-three group only once
In the exactly-two formula each all-three member is counted three times in but should count once, so (all three) comes off. In inclusion–exclusion the centre is instead added back once. Keep the formulas apart: pairwise counts go with plus the centre; exactly-two counts go with minus twice the centre.
Forgetting the people in no group
The formulas count people in at least one group. If the total includes people in none, take them off first () or add them back at the end. A region that comes out negative means a count was used twice.
Guaranteeing with luck, or with items that do not exist
A guarantee must survive the worst order, so the best case, just draws, is never the answer when there are several kinds. And the worst case can only use items that are there: if a kind has fewer than items, count all of them, not .
Check yourself
Answer each question before you open its answer.
Question 1: Exactly one kind
Quantitative reasoning: sets and overlaps
In a survey of 160 investors, 95 hold shares, 70 hold bonds and 25 hold neither. How many hold exactly one of the two?
- A.30
- B.65
- C.105
- D.135
Show the answer
Answer: C. 105
Working
At least one kind: . Both: . Shares only: ; bonds only: ; exactly one: . Check: .
Why the other options are wrong
- A. This is the number who hold both; they hold two kinds, not one.
- B. Counts only those with shares and no bonds; the 40 with bonds and no shares also hold exactly one kind.
- D. This is the number who hold at least one kind; it still includes the 30 who hold both.
What carries over
Find the overlap from Total = A + B − Both + Neither first, then read off the region the question asks for.
Question 2: Exactly two activities
Quantitative reasoning: sets and overlaps
A club has 200 members. 110 play tennis, 90 swim and 70 run. 20 members do all three activities and 15 do none. How many members do exactly two of the activities?
- A.30
- B.45
- C.65
- D.85
Show the answer
Answer: B. 45
Working
In at least one activity: . Sum of the groups: . Then , so . Check: exactly one is , and .
Why the other options are wrong
- A. Treats all 200 members as doing at least one activity; the 15 who do none must be taken off first.
- C. Subtracts the 20 all-three members only once; each is counted three times in the sum of 270, so two extra copies must go.
- D. This is , which still holds two extra copies of each of the 20 members who do all three.
What carries over
Total minus none equals the sum of the groups minus exactly two minus twice all three.
Question 3: Two of one colour
Quantitative reasoning: worst case
A box holds 10 white, 6 blue and 3 red balls. Balls are taken out one at a time without looking. What is the smallest number that must be taken out to be sure of having at least 2 red balls?
- A.2
- B.4
- C.17
- D.18
Show the answer
Answer: D. 18
Working
The worst case takes every ball that is not red first: . One red then gives 17 balls with a single red. Only red balls remain, so the 18th is a second red. And 17 is not enough, as that order shows.
Why the other options are wrong
- A. This is the best case, two reds in the first two draws; a guarantee must hold in the worst order.
- B. This guarantees two balls of the same colour, whichever colour; here both must be red.
- C. This is the worst case itself, which still holds only one red ball; one more is needed.
What carries over
To be sure of a particular kind, let the worst case take every item of the other kinds first.
Key points
Two groups: .
Three groups with pairwise counts: add the groups, subtract the pairs, add back the centre.
With exactly-two counts: .
Fill a Venn diagram from the centre out, and check that every region is zero or more.
For a guarantee, build the largest selection that still fails, then add one.
All questions here are original and written for UniExamer; none comes from the test maker.
Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.