Sub topic 11
Minimum and Maximum Overlap
This chapter assumes you know the two-set formula n(A∪B) = n(A) + n(B) − n(A∩B), the complement idea for "neither", and how to read a Venn diagram. It also assumes basic algebra. Here you will learn to find the smallest and largest possible overlap when a problem does not pin the overlap down.
Why overlap can vary
Many CAT questions give you the size of each group and the total, but not the overlap. For example: "In a group of 100 people, 70 like tea and 80 like coffee. What is the least and greatest number who like both?"
The data allows a range of answers, not one. Your job is to find the two ends of that range. Each end comes from an extreme arrangement of the sets.
The two-set bounds
Let the universe have N elements, and let n(A) and n(B) be the sizes of the two sets. Assume every element belongs to at least one set only if the problem says so. Otherwise, some elements may be in neither set.
Maximum overlap
The overlap cannot be larger than the smaller set. If B is smaller than A, the most overlap happens when B sits completely inside A.
- Maximum of n(A∩B) = min(n(A), n(B))
Minimum overlap
The overlap is smallest when the two sets are pushed as far apart as possible. If n(A) + n(B) fits inside N, they can be fully separate. If n(A) + n(B) is bigger than N, the sets must share elements, and the shared count is the excess.
- Minimum of n(A∩B) = max(0, n(A) + n(B) − N)
This comes straight from the union formula. The union cannot exceed N, so n(A) + n(B) − n(A∩B) ≤ N. Rearranging gives n(A∩B) ≥ n(A) + n(B) − N. The overlap also cannot be negative, so the lower bound is never below 0.
total = 100
n_a, n_b = 70, 80
max_both = min(n_a, n_b) # 70
min_both = max(0, n_a + n_b - total) # 50
print(min_both, max_both) # 50 70So in the tea and coffee problem, between 50 and 70 people like both.
Checking that both extremes can happen
A bound is only useful if some arrangement actually reaches it. Test the tea and coffee case:
- At overlap 50: only tea = 20, only coffee = 30, both = 50, neither = 0. The total is 100. All regions are non-negative.
- At overlap 70: only tea = 0, only coffee = 10, both = 70, neither = 20. The total is 100. All regions are non-negative.
Both work, so the range is exactly 50 to 70.
Reading the question: what is being held fixed?
The wording decides which formula to use. Watch for these cases.
| Wording | What it fixes | Minimum overlap | Maximum overlap |
|---|---|---|---|
| Universe of N, sizes a and b, some may be in neither | Total N | max(0, a + b − N) | min(a, b) |
| Everyone belongs to at least one set | Union = N | a + b − N | min(a, b) |
| Sizes a and b only, no universe given | Nothing about the total | 0 | min(a, b) |
| Everyone is in both or exactly one set, "neither" is 0 | Union = N | a + b − N | min(a, b) |
The second row matters. If every person must like at least one drink, then the union equals N exactly. The overlap is then fixed at a + b − N and the minimum equals the actual value. Be careful: the maximum can still differ only if the constraint allows it. When union = N is forced, the overlap is a single value, so min and max coincide at a + b − N. In that case a maximum of min(a, b) would break the union condition unless a + b − N = min(a, b), which means the larger set equals N.
Percentage versions
CAT often phrases this in percentages. The same logic applies with N = 100%.
Example: 75% of employees speak Hindi and 60% speak English. Every employee speaks at least one language is not stated. What are the least and greatest percentages who speak both?
- Minimum: max(0, 75 + 60 − 100) = 35%
- Maximum: min(75, 60) = 60%
So the overlap lies between 35% and 60%.
Three sets: minimum overlap of all three
For three sets the most common question is the least number who belong to all three. The idea is the same: push the sets apart, and the overlap is whatever the universe forces.
A convenient way is to count the elements that are missing from each set. Let the missing counts be N − n(A), N − n(B) and N − n(C). If everyone is outside at least one set, the three missing groups must cover the universe. The people not in all three sets can number at most the sum of the missing counts.
- Minimum of n(A∩B∩C) = max(0, N − [(N − n(A)) + (N − n(B)) + (N − n(C))])
- Equivalent form: max(0, n(A) + n(B) + n(C) − 2N)
The maximum of n(A∩B∩C) is min(n(A), n(B), n(C)), the size of the smallest set.
def triple_bounds(total, a, b, c):
low = max(0, a + b + c - 2 * total)
high = min(a, b, c)
return low, high
# 100 people, 70 like tea, 75 like coffee, 80 like juice
print(triple_bounds(100, 70, 75, 80)) # (25, 70)Here 70 + 75 + 80 − 200 = 25, so at least 25 people like all three. At most 70 do.
Check the low end. The people missing from tea, coffee and juice number 30, 25 and 20. Together these total 75. So at most 75 people lack at least one drink, which leaves at least 25 who have all three.
The lower bound can be zero
If a + b + c ≤ 2N, the formula gives 0 or a negative number, and the bound is 0. Example: N = 100, with sizes 40, 50 and 60. The sum is 150, which is less than 200, so the three sets can have no common element.
Minimum and maximum of "exactly" regions
Sometimes the question asks for the range of a different region, such as the number who like only one drink. Use the same approach: write the region as an expression in the unknown overlap, then plug in both ends of its allowed range.
Take the tea and coffee example, N = 100, tea = 70, coffee = 80. Let x be the overlap, with x between 50 and 70.
- Only tea = 70 − x
- Only coffee = 80 − x
- Exactly one = 150 − 2x
- Neither = 100 − (150 − x) = x − 50
At x = 50, exactly one is 50 and neither is 0. At x = 70, exactly one is 10 and neither is 20. As x grows, "exactly one" shrinks and "neither" grows. Seeing which direction each region moves tells you which end of x gives the answer you want.
A repeatable method
- Write N, and the sizes of each set.
- Decide whether "neither" is allowed or forced to zero.
- Set the overlap to x and write every region in terms of x.
- Require every region to be at least 0. Each inequality gives a bound on x.
- Combine the bounds. The smallest and largest allowed x are the answers.
- Check each endpoint by building the full Venn table and confirming the total.
Step 4 is the safest route because it never relies on remembering a formula. For two sets, the conditions x ≥ 0, x ≤ a, x ≤ b and a + b − x ≤ N reproduce both formulas.
def two_set_range(total, a, b, neither_allowed=True):
low = max(0, a + b - total)
high = min(a, b)
if not neither_allowed:
# union must equal total, so overlap is forced
forced = a + b - total
if forced < 0 or forced > high:
return None # inconsistent data
return forced, forced
return low, high
print(two_set_range(100, 70, 80)) # (50, 70)
print(two_set_range(100, 70, 80, neither_allowed=False)) # (50, 50)
print(two_set_range(100, 40, 30)) # (0, 30)Common errors
- Using min(a, b) as the maximum when the problem forces everyone into at least one set.
- Forgetting the max(0, ...) and reporting a negative minimum.
- Mixing up "at least" and "at most". The minimum overlap comes from the sets being spread apart, and the maximum from nesting.
- Applying the two-set lower bound to three sets. Use n(A) + n(B) + n(C) − 2N instead.
- Skipping the endpoint check. Always confirm that every region is non-negative at both ends.
- Reading "at least one of them" as a total. It tells you the union is N, not that the overlap is free.
Worked example with a twist
In a class of 60 students, 45 passed Maths and 38 passed English. At least 5 students failed both subjects. Find the range of students who passed both.
Let x be the number who passed both.
- Union = 45 + 38 − x = 83 − x
- Neither = 60 − (83 − x) = x − 23
- The condition "at least 5 failed both" means x − 23 ≥ 5, so x ≥ 28.
- Passing both cannot exceed the smaller set: x ≤ 38.
- Only Maths = 45 − x ≥ 0 gives x ≤ 45, which is already covered.
So 28 ≤ x ≤ 38.
Check x = 28: only Maths 17, only English 10, both 28, neither 5. Total 60. Check x = 38: only Maths 7, only English 0, both 38, neither 15. Total 60. Both are valid.
Exercise
In a town of 200 people, 150 read newspaper P, 130 read newspaper Q, and 90 read newspaper R. What is the minimum number who read both P and Q? What is the maximum number who read all three?
Show answer
For P and Q, the minimum overlap is max(0, 150 + 130 − 200) = 80. For all three, the maximum is the smallest set, which is R with 90. Check the maximum: P and Q each have at least 90 people to contain R, so all three can overlap on 90 readers.
Exercise
In a survey of 100 people, 80 like cricket, 70 like football and 60 like tennis. Find the minimum number who like all three sports.
Show answer
Minimum = max(0, 80 + 70 + 60 − 2 × 100) = 10. Check using the missing counts: 20 + 30 + 40 = 90 people can each miss at least one sport, so at least 100 − 90 = 10 like all three.
Exercise
In a group of 50, 30 know French and 35 know German, and everyone knows at least one of the two. How many know both? Why is there no range here?
Show answer
The union is 50, so both = 30 + 35 − 50 = 15. Because "neither" is forced to 0, the overlap is fixed. Only when "neither" may vary does the overlap have a range.