Sub topic 10
Exactly one, exactly two and exactly three
This chapter assumes you know the two-set and three-set inclusion-exclusion formulas, can read the eight regions of a three-set Venn diagram, and can solve simple linear equations. Here you learn to separate "at least" counts from "exactly" counts. CAT questions often hide this difference in one word.
Why "exactly" is a different question
The union formula counts everyone who belongs to at least one set. That group mixes people who belong to one set, two sets or three sets. Many CAT questions ask about only one of these layers:
- "How many people take exactly one subject?"
- "How many take exactly two?"
- "How many take at least two?"
These are different numbers. The words "at least", "exactly" and "only" decide which regions of the Venn diagram you add up.
| Phrase | Meaning | Regions counted |
|---|---|---|
| At least one | In A, B or C | All seven regions inside the circles |
| Exactly one | In one set and no other | The three "only" regions |
| Exactly two | In two sets, not the third | The three pairwise-only regions |
| Exactly three | In all three | The centre region |
| At least two | Two or three sets | Exactly two plus exactly three |
| At most one | None or exactly one | Outside the circles plus exactly one |
The eight regions
For three sets A, B and C, name the regions as follows.
- Only A, only B, only C: one set each.
- AB only, BC only, AC only: two sets each.
- ABC: all three sets.
- Outside: none of the sets.
The counts of the three "only" regions add up to "exactly one". The three pairwise-only regions add up to "exactly two". The centre is "exactly three". Together with the outside region, these four layers make up the whole universe.
The pairwise intersections are not "exactly two"
The most common error is treating n(A∩B) as the number who belong to A and B only. The intersection n(A∩B) includes the people who are also in C. So it has two parts:
n(A∩B) = (AB only) + n(A∩B∩C)
Summing all three pairwise intersections therefore counts each person in all three sets three times, once in each pairwise intersection. Write the sum of the pairwise intersections as S2 = n(A∩B) + n(B∩C) + n(A∩C). Then:
S2 = (exactly two) + 3 × n(A∩B∩C)
Solving for the exactly-two count gives:
Exactly two = S2 − 3 × n(A∩B∩C)
Exactly-three is simply n(A∩B∩C). Exactly-one follows from the union:
Exactly one = n(A∪B∪C) − exactly two − exactly three
Worked example: all three layers
In a group, 30 people read newspaper A, 25 read B and 20 read C. Also 10 read both A and B, 8 read both B and C, 6 read both A and C, and 4 read all three. Find how many read exactly one, exactly two and exactly three newspapers.
- Union: 30 + 25 + 20 − (10 + 8 + 6) + 4 = 55.
- Exactly three: 4.
- Exactly two: (10 + 8 + 6) − 3 × 4 = 24 − 12 = 12.
- Exactly one: 55 − 12 − 4 = 39.
The code below repeats the same steps.
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 # 55
exactly_three = n_abc # 4
exactly_two = (n_ab + n_bc + n_ac) - 3 * n_abc # 12
exactly_one = union - exactly_two - exactly_three # 39
print(union, exactly_one, exactly_two, exactly_three) # 55 39 12 4To check this, compute each "only" region directly. AB only is 10 − 4 = 6, BC only is 8 − 4 = 4, AC only is 6 − 4 = 2. These add to 12, which matches. Only A is 30 − 6 − 2 − 4 = 18. Only B is 25 − 6 − 4 − 4 = 11. Only C is 20 − 4 − 2 − 4 = 10. These add to 39, which matches.
A shortcut that skips the union
Sometimes the problem gives the individual set sizes and the "exactly" counts but not the union. A second route uses the total number of memberships. Add n(A) + n(B) + n(C). This counts each person once for every set they belong to. So:
n(A) + n(B) + n(C) = 1 × (exactly one) + 2 × (exactly two) + 3 × (exactly three)
This weighted-sum identity is very useful. For the example above: 39 + 2 × 12 + 3 × 4 = 39 + 24 + 12 = 75, and 30 + 25 + 20 = 75. The identity also works as a final check on your answers.
You can use it when the pairwise intersections are unknown. Suppose 100 people give 160 total memberships across three groups, 30 people are in exactly three groups and 40 are in exactly one. Then 40 + 2x + 90 = 160, so x = 15 people belong to exactly two groups.
memberships = 160
exactly_one = 40
exactly_three = 30
exactly_two = (memberships - exactly_one - 3 * exactly_three) // 2
print(exactly_two) # 15Two sets: the same idea in a smaller case
With two sets, "exactly one" means in A or B but not both. It is the symmetric difference:
Exactly one = n(A) + n(B) − 2 × n(A∩B)
The intersection is subtracted twice because each person in both sets is counted in n(A) and in n(B), and none of them should remain. For n(A) = 60, n(B) = 50 and n(A∩B) = 25, exactly one is 60 + 50 − 50 = 60. This is the same as only A (35) plus only B (25).
total = 100
n_a = 60
n_b = 50
neither = 15
union = total - neither
both = n_a + n_b - union
only_a = n_a - both
only_b = n_b - both
print(union, both, only_a, only_b) # 85 25 35 25
print(only_a + only_b) # 60, exactly oneSolving from the innermost region outward
When a problem gives some of the numbers, start at the centre and work outward.
- Fill the triple intersection ABC if it is known.
- Subtract it from each pairwise intersection to get the pairwise-only regions.
- Subtract the pairwise-only regions and the centre from each set total to get the "only" regions.
- Total all regions, including "none", and compare with the universe.
If the triple intersection is unknown, call it x and write every region in terms of x. Then use one given total to solve for x.
Example with an unknown centre
Of 100 students, 8 study none of three subjects. The sets have sizes 40, 35 and 30. The pairwise intersections are 15, 12 and 10. Find how many study all three.
The union is 100 − 8 = 92. Apply the formula: 92 = 40 + 35 + 30 − (15 + 12 + 10) + x = 105 − 37 + x = 68 + x. So x = 24.
This cannot be right. The triple intersection cannot exceed the smallest pairwise intersection, which is 10. The numbers are inconsistent, so this is a good example of a consistency check. A valid problem needs x ≤ 10 and every region non-negative.
union = 100 - 8
n_a, n_b, n_c = 40, 35, 30
pairs = 15 + 12 + 10
x = union - (n_a + n_b + n_c - pairs)
smallest_pair = min(15, 12, 10)
print(x, x <= smallest_pair) # 24 FalseReading the wording of pairwise data
A frequent trap is that the problem says "10 read A and B", and you must decide which of two meanings is intended.
- "10 read A and B" usually means n(A∩B) = 10, which includes people in C.
- "10 read A and B only" or "10 read exactly A and B" means the pairwise-only region is 10.
If the pairwise numbers are "only" numbers, the exactly-two count is just their sum, with no subtraction of 3 × n(A∩B∩C). Misreading this changes the answer by exactly 3 × n(A∩B∩C), a number that often appears among the wrong answer options.
At least two and at most one
Two derived phrases appear often.
- At least two = exactly two + exactly three = S2 − 2 × n(A∩B∩C).
- At most one = total − (at least two).
The first expression follows by adding the centre back: (S2 − 3x) + x = S2 − 2x, where x is n(A∩B∩C). In the example, at least two is 24 − 8 = 16, which equals 12 + 4.
s2 = 10 + 8 + 6
x = 4
exactly_two = s2 - 3 * x
at_least_two = s2 - 2 * x
print(exactly_two, at_least_two) # 12 16Percentage versions
CAT often gives percentages of a group instead of counts. The same identities apply with the total taken as 100. Suppose 70% of customers use product A, 60% use B and 50% use C, and every customer uses at least one. The memberships total 180%. If nobody is in exactly three, then exactly one + exactly two = 100 and exactly one + 2 × exactly two = 180. Subtracting gives exactly two = 80%, and exactly one = 20%.
Edge cases
- Empty layers are allowed. Exactly three can be zero, in which case exactly two equals S2.
- A "none" group changes the union but not the layer formulas. Subtract it from the total first.
- Every region must be a non-negative whole number. A negative region means the data cannot occur.
- If you are given exactly-one, exactly-two and exactly-three counts, the union is their sum. Add them directly without the inclusion-exclusion formula.
Exercises
Exercise
In a class of 60, 25 study French, 30 study German and 20 study Spanish. Also 8 study French and German, 7 study German and Spanish, 5 study French and Spanish, and 3 study all three. Everyone studies at least one language. Find how many study exactly one language and how many study exactly two.
Show answer
S2 = 8 + 7 + 5 = 20. Exactly two = 20 − 3 × 3 = 11. Exactly three = 3. Union = 25 + 30 + 20 − 20 + 3 = 58, which is not 60, so the claim that everyone studies a language fails by 2 students who study none. With the given data, exactly one = 58 − 11 − 3 = 44 and exactly two = 11. Check with the weighted sum: 44 + 22 + 9 = 75 = 25 + 30 + 20.
Exercise
In a survey of 200 people, the total number of memberships across clubs P, Q and R is 330. Exactly 50 people are in all three clubs and 20 people are in none. How many people are in exactly one club and how many in exactly two?
Show answer
The union is 200 − 20 = 180. Let a be exactly one and b be exactly two. Then a + b + 50 = 180, so a + b = 130. The weighted sum gives a + 2b + 150 = 330, so a + 2b = 180. Subtracting gives b = 50 and a = 80. So 80 people are in exactly one club and 50 in exactly two.
Exercise
A report says that 12 people read A and B, 9 read B and C, and 7 read A and C. The report states that 10 people read all three. Explain why the data are impossible.
Show answer
The triple intersection cannot be larger than any pairwise intersection, because everyone in all three sets is also in each pair. Here 10 exceeds 9 (B and C) and 7 (A and C). Taking the intersections as "including the centre", the A and C count of 7 would give a negative region: AC only = 7 − 10 = −3.