Sub topic 10
Exactly One, Exactly Two and Exactly Three
Assume you know basic set notation, two-set inclusion-exclusion, and how to read a Venn diagram. This chapter extends those ideas to count people or objects belonging to an exact number of sets.
What “exactly” means
If a person studies Maths, Physics, or Chemistry, the word exactly excludes extra memberships:
- Exactly one: belongs to one set and no other set.
- Exactly two: belongs to two sets but not the third.
- Exactly three: belongs to all three sets.
- None: belongs to no set.
For two sets, “exactly one” means belonging to only \(A\) or only \(B\). For three sets, the Venn diagram has eight regions.
Two sets
Let \(A\) and \(B\) be two sets. Their overlap is \(A \cap B\).
If \(n(A \cap B)=b\), then:
- Exactly two is \(b\).
- Only \(A\) is \(n(A)-b\).
- Only \(B\) is \(n(B)-b\).
- Exactly one is \(n(A)+n(B)-2b\).
The last formula subtracts the overlap twice because the overlap is included in both \(n(A)\) and \(n(B)\).
| Quantity | Formula |
|---|---|
| Exactly two | \(n(A\cap B)\) |
| Exactly one | \(n(A)+n(B)-2n(A\cap B)\) |
| At least one | \(n(A\cup B)\) |
| Neither | Total \(-n(A\cup B)\) |
For example, suppose 60 students study Maths, 50 study Physics, and 25 study both. Then:
- Only Maths: \(60-25=35\)
- Only Physics: \(50-25=25\)
- Exactly one: \(35+25=60\)
- Exactly two: \(25\)
Three sets
Let the sets be \(A\), \(B\), and \(C\). Begin with the innermost region:
\[ t=n(A\cap B\cap C) \]
This is the number belonging to exactly three sets.
The pairwise intersection \(n(A\cap B)\) includes both the exactly-two \(A,B\) region and the triple region. Therefore:
\[ \text{Exactly }A\text{ and }B\text{ only}=n(A\cap B)-t \]
Use the same idea for the other two pairs.
The total number belonging to exactly two sets is:
\[ E_2=n(A\cap B)+n(B\cap C)+n(A\cap C)-3t \]
Why subtract \(3t\)? The triple region is counted once in each of the three pairwise intersections, but it must not appear in the exactly-two count.
The union is:
\[ n(A\cup B\cup C)=n(A)+n(B)+n(C) -\bigl[n(A\cap B)+n(B\cap C)+n(A\cap C)\bigr]+t \]
Then:
\[ E1=n(A\cup B\cup C)-E2-t \]
Here, \(E1\) is exactly one and \(E2\) is exactly two.
Worked example
Suppose:
\[ n(A)=30,\quad n(B)=25,\quad n(C)=20 \]
\[ n(A\cap B)=10,\quad n(B\cap C)=8,\quad n(A\cap C)=6,\quad t=4 \]
First calculate exactly two:
\[ E_2=10+8+6-3(4)=12 \]
Next calculate the union:
\[ n(A\cup B\cup C)=30+25+20-10-8-6+4=55 \]
Therefore:
\[ E_1=55-12-4=39 \]
So 39 belong to exactly one set, 12 to exactly two, and 4 to exactly three.
n_a, n_b, n_c = 30, 25, 20
n_ab, n_bc, n_ac = 10, 8, 6
triple = 4
union = n_a + n_b + n_c - n_ab - n_bc - n_ac + triple
exactly_two = n_ab + n_bc + n_ac - 3 * triple
exactly_one = union - exactly_two - triple
print(union) # 55
print(exactly_one) # 39
print(exactly_two) # 12
print(triple) # 4Consistency checks
Every individual Venn region must be non-negative. Also check:
\[ \text{exactly one}+\text{exactly two}+\text{exactly three}+\text{none} =\text{total} \]
If a region is negative, either the data are inconsistent or an overlap has been subtracted incorrectly.
Exercise
In a group of 100 people, 60 belong to A, 50 to B, 40 to C. The pairwise intersections are 20, 15 and 10, and 5 belong to all three. How many belong to exactly two sets?
Show answer
Exactly two = 20 + 15 + 10 - 3(5) = 30.