Inclusion-Exclusion with Three Sets: Finding Exact Overlaps
Of the 150 houses in a certain development, 60 percent have air-conditioning, 50 percent have a sunporch, and 30 percent have a swimming pool. If 5 of the houses have all three of these amenities and 5 have none of them, how many of the houses have exactly two of these amenities?
Already Got the Answer? Check Here First
- Setup: set sizes are 90, 75, 45 (sum 210); houses with at least one amenity: 150 − 5 = 145; all three: 5.
- Key relation:
exactly two = (sum of sets) − (at least one) − 2 × (all three) - Answer:
210 − 145 − 10 = 55houses have exactly two amenities. - One-line check: 85 + 55 + 5 + 5 = 150 houses, and 85 + 2(55) + 3(5) = 210 amenities.
What You Will Learn
- Why "adding up the sets" overcounts. A house with two amenities is counted twice in the total, and a house with three is counted three times. Seeing this clearly is the whole problem.
- How to translate a Venn diagram into equations. Each region becomes a category, and two simple equations (one counting houses, one counting amenities) do the rest.
- The difference between "exactly two" and "at least two." Word choice changes the answer here (55 versus 60), and learning to read it precisely is a skill that carries over to every counting problem.
- The inclusion-exclusion principle for three sets, and how it connects to the counting-by-tally approach.
- That you can solve a problem without finding every unknown. You never need to know how many houses have only a pool, and in fact the data do not determine that.
Picture This
With three overlapping categories, a picture does real work. Each of the seven regions inside the circles holds houses with one specific combination of amenities, and the rectangle around everything holds all 150 houses, including those outside every circle.
The question asks for d + e + f, the three overlap regions that exclude the center. Note that the percentages describe whole circles, so "90 have air-conditioning" means a + d + e + 5 = 90, not just region a.
Solution: Method 1 — The Amenity-Tally Approach
The idea is to count the same group of houses in two different ways, once by houses and once by amenities, then compare. Each way gives one equation, and the two equations together pin down the answer.
Step 1 — Turn the percentages into house counts
Everything is easier with actual numbers of houses:
Sunporch: 0.50 × 150 = 75
Pool: 0.30 × 150 = 45
Step 2 — Find how many houses have at least one amenity
Five houses have none of the three amenities, so the rest must have at least one:
Step 3 — Sort those 145 houses by how many amenities they have
Let x be the number of houses with exactly one amenity and y the number with exactly two. We are told that 5 houses have all three. Every one of the 145 houses falls into exactly one of these groups, so
Step 4 — Count amenities instead of houses
Add the three set sizes: 90 + 75 + 45 = 210. This number is the total count of (house, amenity) pairs. A house with one amenity contributes 1 to it, a house with two amenities contributes 2, and a house with all three contributes 3. Therefore
Step 5 — Subtract the equations
Subtracting Equation 1 from Equation 2 eliminates x:
y = 55
For completeness, x = 140 − 55 = 85 houses have exactly one amenity.
Solution: Method 2 — Inclusion-Exclusion Formula
This is the textbook route. It is the same arithmetic in a different outfit, but it organizes the counting through overlaps rather than through "exactly one, two, three."
For three sets A (air-conditioning), S (sunporch), and P (pool), the number of houses in at least one set is
Step 1 — Substitute what is known
145 = 215 − (pair overlaps)
So the three pair overlaps add up to 215 − 145 = 70.
Step 2 — Interpret the 70 carefully
The pair overlaps are "at least" overlaps. The set A∩S includes houses with air-conditioning and a sunporch whether or not they also have a pool. So:
- A house with exactly two amenities sits in exactly one pair overlap, so it is counted once in the 70.
- A house with all three sits in all three pair overlaps, so it is counted three times in the 70.
Step 3 — Remove the triple-overlap houses
exactly two = 70 − 15 = 55
The result matches Method 1. Two routes through the problem agree, which is a good sign.
The Answer
55 houses have exactly two of the three amenities.
Full breakdown: 85 exactly one · 55 exactly two · 5 all three · 5 none · total 150.
Verification
Two independent checks: the house count must come to 150, and the amenity count must come to 210.
Amenities: 85(1) + 55(2) + 5(3) = 85 + 110 + 15 = 210 ✓
Sets: 90 + 75 + 45 = 210 ✓
For a stronger test, build an actual set of houses that fits. Put 20 houses in the AC-and-sunporch-only region, 20 in AC-and-pool-only, and 15 in sunporch-and-pool-only. That gives 55 houses with exactly two amenities. Then:
| Set | Only that one | Plus pair regions | Plus all three | Total |
|---|---|---|---|---|
| Air-conditioning | 45 | 20 + 20 | 5 | 90 ✓ |
| Sunporch | 35 | 20 + 15 | 5 | 75 ✓ |
| Pool | 5 | 20 + 15 | 5 | 45 ✓ |
The "only" columns sum to 45 + 35 + 5 = 85, matching x. Every circle total comes out right, so a valid arrangement exists and the answer is consistent.
What Trips People Up
✗ 90 + 75 + 45 = 210, and 210 − 150 = 60 "overlap houses"
This treats the excess over 150 as the number of houses with two amenities. It ignores two facts: houses with all three are overcounted twice, not once, and the 5 houses with no amenity are not in any circle at all. The excess 210 − 150 mixes both effects together.
✗ Answering 70 (the sum of the pairwise overlaps) or 60 (at least two)
Method 2 produces 70 as an intermediate number. It includes the 5 triple-overlap houses three times. Subtracting only the five houses once gives 65, and subtracting nothing gives 70. Likewise, "at least two" is 55 + 5 = 60. The word exactly is a flag: the all-three houses must be excluded.
✗ x + y + 5 = 150
The 150 includes the 5 houses with none of the amenities. If you write 150 on the right side of the house-count equation, you silently place those houses into "exactly one" or "exactly two." Always subtract the "none" group before using inclusion-exclusion; it lives outside the circles.
✗ Setting out to find each of a, b, c, d, e, f separately
With seven regions and fewer independent equations, the individual regions are not determined. The verification table shows one valid arrangement, but other arrangements work too (try 25, 20, and 10 for the pair regions). The problem asks only for the total of the three pair regions, and that total is forced. Recognizing which quantity the data actually pin down saves a lot of wasted effort.
The Pattern Behind This
The key move was comparing two counts of the same collection. Generalizing it gives a formula that works for any three-set problem. Let N be the total, n the number in no set, T the number in all three, and S the sum of the three set sizes. Then
tally: x + 2y + 3T = S
─────────────────────────
subtract: y + 2T = S − (N − n)
y = S − (N − n) − 2T
Here, y = 210 − 145 − 2(5) = 55. The formula reads as a story: the sum of the set sizes exceeds the number of distinct houses by exactly the overcounting, and the overcounting is one extra per exactly-two house plus two extra per all-three house.
Limits of the shortcut. It computes the total of the exactly-two regions, not the individual ones. It is also specific to three sets; with four sets the weights become 1, 2, 3, 4 and you need more information, such as the count with exactly three.
If You See These Words...
- "Exactly two of these" or "exactly one" signals that you must separate Venn regions rather than whole circles.
- Percentages of a common total (60%, 50%, 30%) that add to more than 100% mean the groups must overlap. Here they add to 140%.
- "All three" and "none of them" are the two easiest regions to pin down. Start from them.
- Disguised versions: students taking Math, Science, or Art; customers who buy items A, B, or C; survey respondents choosing several options. If the problem lists group sizes whose total exceeds the population, it is probably this pattern.
Beyond the Textbook
- Database queries. Counting records that match "at least one of three filters" or "exactly two of three tags" uses the same inclusion-exclusion logic that query planners rely on.
- Epidemiology and surveys. Overlapping symptoms, risk factors, or product-ownership categories are tallied exactly this way to estimate how many people are in none, one, or several categories.
- Probability. The formula for
P(A or B or C)is inclusion-exclusion with probabilities replacing counts.
If You Want to Go Deeper
Inclusion-exclusion extends to any number of sets, alternating between adding and subtracting overlaps. For four amenities, the "tally" idea needs weights 1, 2, 3, 4, and you would need extra data (for instance the number with exactly three amenities) to pin down the number with exactly two. Try inventing a four-set version where all the numbers are consistent. You will find that checking whether the data are consistent becomes part of the problem.
Extend Your Thinking
Four variations, roughly in increasing order of difficulty. Try each on paper first, then open the solution to compare.
150 − 20 = 130
With x = exactly one and y = exactly two: x + y + 5 = 130, so x + y = 125.
The set sizes still sum to 90 + 75 + 45 = 210, so x + 2y + 15 = 210, giving x + 2y = 195.
(x + 2y) − (x + y) = 195 − 125, so y = 70 houses have exactly two amenities (and x = 55).
Houses: 55 + 70 + 5 + 20 = 150 ✓. Amenities: 55 + 140 + 15 = 210 ✓. The formula agrees: 210 − 130 − 2(5) = 70.
150 − 5 = 145
Let x be the houses with exactly one amenity: x + 60 + 5 = 145, so x = 80.
Total amenities = 1(80) + 2(60) + 3(5) = 80 + 120 + 15 = 215.
The same total equals 90 + 75 + p, where p is the pool count. So 165 + p = 215.
p = 50 houses have a pool. Check: (90 + 75 + 50) − 145 − 2(5) = 215 − 145 − 10 = 60 ✓, matching the given 60 exactly-two houses.
200 − 14 = 186
120 + 100 + 80 = 300 memberships in total.
x + y + 20 = 186, so x + y = 166.
x + 2y + 3(20) = 300, so x + 2y = 240.
240 − 166 = 74, so 74 students are in exactly two clubs, and x = 92. Check: 92 + 74 + 20 + 14 = 200 ✓ and 92 + 148 + 60 = 300 ✓.
Let z = houses with all three, y = exactly two, x = exactly one. The given relationship is y = 3z.
At least one amenity: 150 − 5 = 145, so x + y + z = 145.
x + 2y + 3z = 90 + 75 + 45 = 210.
(x + 2y + 3z) − (x + y + z) = 210 − 145 gives y + 2z = 65.
Substitute y = 3z: 3z + 2z = 65, so 5z = 65 and z = 13. Then y = 39, and x = 145 − 39 − 13 = 93.
Houses: 93 + 39 + 13 + 5 = 150 ✓. Amenities: 93 + 78 + 39 = 210 ✓. Ratio: 39 = 3 × 13 ✓. So 13 houses have all three amenities and 39 have exactly two.
Frequently Asked Questions
2026-05-30