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:

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣.|A \cup B| = |A| + |B| - |A \cap B|.

Here ∣A∪B∣|A \cup B| is the number in at least one group and ∣A∩B∣|A \cap B| the number in both. Many questions also mention people in neither group, so write the whole population as

Total=∣A∣+∣B∣−Both+Neither.\text{Total} = |A| + |B| - \text{Both} + \text{Neither}.

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 25+18−7=3625 + 18 - 7 = 36 take at least one and 40−36=440 - 36 = 4 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

∣A∪B∪C∣=∣A∣+∣B∣+∣C∣−∣A∩B∣−∣A∩C∣−∣B∩C∣+∣A∩B∩C∣|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|

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 ∣A∩B∩C∣|A \cap B \cap C| brings the count back to one. A person in exactly two groups is counted twice and subtracted once, which is right.

In this formula ∣A∩B∣|A \cap B| 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: E1E_1 people in exactly one group, E2E_2 in exactly two and E3E_3 in all three. Then:

  • counting people, E1+E2+E3=Total−NoneE_1 + E_2 + E_3 = \text{Total} - \text{None};
  • counting memberships, ∣A∣+∣B∣+∣C∣=E1+2E2+3E3|A| + |B| + |C| = E_1 + 2E_2 + 3E_3, because each person is counted once for every group they are in.

Subtracting the first line from the second gives ∣A∣+∣B∣+∣C∣−(Total−None)=E2+2E3|A| + |B| + |C| - (\text{Total} - \text{None}) = E_2 + 2E_3, which rearranges to

Total−None=∣A∣+∣B∣+∣C∣−(exactly two)−2×(all three).\text{Total} - \text{None} = |A| + |B| + |C| - (\text{exactly two}) - 2 \times (\text{all three}).

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 E2+3E3E_2 + 3E_3: 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:

  1. The centre: all three.
  2. Each pair-only region: the pairwise count minus the centre.
  3. Each single-only region: the group's total minus its two pair-only regions and the centre.
  4. 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 70+60−100=3070 + 60 - 100 = 30 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

max⁡(0, ∣A∣+∣B∣−Total)≤Both≤min⁡(∣A∣,∣B∣).\max(0,\ |A| + |B| - \text{Total}) \le \text{Both} \le \min(|A|, |B|).

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 kk of the same kind among mm kinds, the worst case holds k−1k - 1 of each, so (k−1)m+1(k - 1)m + 1 draws are needed. With 4 kinds, 3 of one kind needs 2×4+1=92 \times 4 + 1 = 9 draws.
  • A scarce kind caps the worst case. A kind with fewer than k−1k - 1 items can contribute only what it has. Add up what each kind can give without reaching kk, 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?

  1. Those in at least one elective: 120−8=112120 - 8 = 112.

  2. Sum of the three groups: 64+52+40=15664 + 52 + 40 = 156. This counts each student once for every elective they take.

  3. Apply Total−None=∣A∣+∣B∣+∣C∣−(exactly two)−2×(all three)\text{Total} - \text{None} = |A| + |B| + |C| - (\text{exactly two}) - 2 \times (\text{all three}): 112=156−E2−2×12112 = 156 - E_2 - 2 \times 12, so E2=156−24−112=20E_2 = 156 - 24 - 112 = 20.

  4. Check by counting memberships: exactly one is 112−20−12=80112 - 20 - 12 = 80, and 80+2×20+3×12=80+40+36=15680 + 2 \times 20 + 3 \times 12 = 80 + 40 + 36 = 156, 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?

  1. Centre: 5 firms export to all three.

  2. Pair-only regions: France and Germany only 15−5=1015 - 5 = 10; France and Spain only 12−5=712 - 5 = 7; Germany and Spain only 10−5=510 - 5 = 5.

  3. Single-only regions: France only 45−10−7−5=2345 - 10 - 7 - 5 = 23; Germany only 38−10−5−5=1838 - 10 - 5 - 5 = 18; Spain only 30−7−5−5=1330 - 7 - 5 - 5 = 13.

  4. In at least one country: 5+10+7+5+23+18+13=815 + 10 + 7 + 5 + 23 + 18 + 13 = 81, so none is 100−81=19100 - 81 = 19.

  5. Check with inclusion–exclusion: 45+38+30−15−12−10+5=113−37+5=8145 + 38 + 30 - 15 - 12 - 10 + 5 = 113 - 37 + 5 = 81.

Answer

19 firms export to none of the three and 23 to France only. Taking France only as 45−15−12=1845 - 15 - 12 = 18 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?

  1. (a) The largest selection without 3 of one colour has 2 of each: 2+2+2=62 + 2 + 2 = 6 counters. The 7th must make a third of some colour.

  2. (b) Without 6 of one colour you can hold at most 5 red and 5 green, but only the 4 yellow that exist: 5+5+4=145 + 5 + 4 = 14 counters.

  3. 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.

  4. 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 (k−1)m+1=5×3+1=16(k - 1)m + 1 = 5 \times 3 + 1 = 16 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 ∣A∣+∣B∣+∣C∣|A| + |B| + |C| but should count once, so 2×2 \times (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 (Total−None\text{Total} - \text{None}) 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 kk 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 k−1k - 1 items, count all of them, not k−1k - 1.

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?

  1. A.30
  2. B.65
  3. C.105
  4. D.135
Show the answer

Answer: C. 105

Working

At least one kind: 160−25=135160 - 25 = 135. Both: 95+70−135=3095 + 70 - 135 = 30. Shares only: 95−30=6595 - 30 = 65; bonds only: 70−30=4070 - 30 = 40; exactly one: 65+40=10565 + 40 = 105. Check: 65+40+30+25=16065 + 40 + 30 + 25 = 160.

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?

  1. A.30
  2. B.45
  3. C.65
  4. D.85
Show the answer

Answer: B. 45

Working

In at least one activity: 200−15=185200 - 15 = 185. Sum of the groups: 110+90+70=270110 + 90 + 70 = 270. Then 185=270−E2−2×20185 = 270 - E_2 - 2 \times 20, so E2=270−40−185=45E_2 = 270 - 40 - 185 = 45. Check: exactly one is 185−45−20=120185 - 45 - 20 = 120, and 120+2×45+3×20=120+90+60=270120 + 2 \times 45 + 3 \times 20 = 120 + 90 + 60 = 270.

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 270−185270 - 185, 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?

  1. A.2
  2. B.4
  3. C.17
  4. D.18
Show the answer

Answer: D. 18

Working

The worst case takes every ball that is not red first: 10+6=1610 + 6 = 16. 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: Total=∣A∣+∣B∣−Both+Neither\text{Total} = |A| + |B| - \text{Both} + \text{Neither}.

  • Three groups with pairwise counts: add the groups, subtract the pairs, add back the centre.

  • With exactly-two counts: Total−None=∣A∣+∣B∣+∣C∣−(exactly two)−2×(all three)\text{Total} - \text{None} = |A| + |B| + |C| - (\text{exactly two}) - 2 \times (\text{all three}).

  • 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.

Poćwicz ten temat

Nowe pytania z tej umiejętności, z rozwiązaniami. Ćwiczenia wymagają Single Exam Pass lub Plus.