Chapter 34
Sets and Venn Diagrams
Draw the circles, fill the regions from the centre, and every survey question becomes simple addition.
This chapter is about counting people (or things) that fall into more than one group. Some students play cricket, some play football, and a few play both. If you add the two groups directly, the students who play both get counted twice. Almost every question here is about removing that double count correctly.
The tool we use is the Venn diagram: one circle for each group, drawn inside a box that holds everybody. Once the numbers are written in the right regions, the answer is usually just a sum of regions. So the real skill is reading the question carefully. Both, only, exactly one, at least one and neither each point to a different region.
In the exam you will meet two-set and three-set surveys, percentage versions (pass–fail, newspaper readers, languages), stories where one region is given as x, and maximum–minimum questions about the overlap. A few questions also check set basics such as subsets and the number sets N ⊂ W ⊂ Z ⊂ Q ⊂ R. All of them are covered here, in that order.
What a set is
A set is a well-defined collection of objects. Well-defined means that for any object you can say clearly whether it belongs or not. "Even numbers less than 12" is a set: {2, 4, 6, 8, 10}. "Good students of the class" is not, because good means different things to different people.
The objects are called elements. We write 4 ∈ A ("4 belongs to A") and 5 ∉ A. The number of elements is written n(A). For A = {2, 4, 6, 8, 10}, n(A) = 5. Writing an element twice does not change a set, so {1, 2, 2, 3} has only 3 elements.
Two ways of writing the same set are common: the list form {2, 4, 6, 8, 10} and the rule form {x : x is even, x < 12}. In the rule form, list the elements yourself before you count them.
[[fig:0]]
The universal set U holds everything under discussion, and it is drawn as the rectangle. A set with no element is the empty set, written ∅ or { }. If every element of A is also in B, then A is a subset of B, written A ⊆ B. If, in addition, B has something that A does not have, A is a proper subset (A ⊂ B).
A set with n elements has 2n subsets, and 2n − 1 of them are proper subsets.
For example, {a, b} has the 4 subsets ∅, {a}, {b} and {a, b}. Three of them are proper.
The Venn diagram and its regions
Two overlapping circles cut the rectangle into four regions. In the figure, p is only A, q is both A and B, r is only B and s is neither. Every person is in exactly one of these four regions, so
p + q + r + s = Total
Now read the usual words as regions:
- n(A) = p + q and n(B) = q + r (a circle includes its overlap)
- Both = q
- At least one (A or B) = p + q + r
- Exactly one = p + r
- Neither = s
[[fig:0]]
Three circles make eight regions: three only regions (1, 2, 3), three exactly two regions (4, 5, 6), one all three region (7) in the middle and the none region (8) outside.
[[fig:1]]
Whenever a question confuses you, draw the circles and put a number in each region, starting from the innermost one. Mistakes in this chapter almost always come from writing a number in the wrong region, not from the arithmetic.
Union, intersection, difference and complement
Union A ∪ B is everything in A or in B or in both. In words it is at least one.
[[fig:0]]
Intersection A ∩ B is only what is common to both. In words it is both. If A ∩ B = ∅, the sets are disjoint and the circles do not meet.
[[fig:1]]
Difference A − B is what is in A but not in B, that is, only A. So n(A − B) = n(A) − n(A ∩ B).
[[fig:2]]
Complement A′ is everything in U that is not in A, so n(A′) = n(U) − n(A). The complement of A ∪ B is the neither region: n((A ∪ B)′) = Total − n(A ∪ B).
Take Radhika's class of 40. If 25 of them sing, then 15 do not sing; that 15 is the complement. Every formula in this chapter is built from these four operations.
Type 1
Set basics: elements, subsets and number sets
Questions of this type are short, but they check whether your basics are clean.
1. Counting elements. List the elements first, especially when the set is given by a rule. In {x : x is a natural number, x² < 40}, the elements are 1, 2, 3, 4, 5, 6 (since 6² = 36 and 7² = 49). So n = 6. Check the end values carefully; that is where marks are lost.
2. Counting subsets. Each element has two choices, in or out. So a set of n elements has 2n subsets. One of them is the set itself, so there are 2n − 1 proper subsets. A set of 3 elements has 8 subsets and 7 proper subsets. Working backwards also comes up: 128 subsets means 2n = 128, so n = 7.
Formula: Subsets of an n-element set = 2n ; proper subsets = 2n − 1
3. Union and intersection of listed sets. Write the common elements once. For A = {1, 3, 5, 7} and B = {5, 7, 9}, A ∪ B = {1, 3, 5, 7, 9} and A ∩ B = {5, 7}. Check with the formula: 4 + 3 − 2 = 5.
[[fig:0]]
4. Number sets. The chain N ⊂ W ⊂ Z ⊂ Q ⊂ R is asked again and again. Natural numbers start at 1, whole numbers add 0, integers add the negatives, rationals add fractions such as 34, and real numbers add irrationals such as √2 and π. Rational and irrational numbers are disjoint (no number is both), and their union is R. Complex numbers like 2 + 3i are not real, so they are not a subset of R.
[[fig:1]]
5. Subset shortcuts. If A ⊂ B, then A ∩ B = A and A ∪ B = B. Use this directly; there is no need to draw anything.
Formula: n(A − B) = n(A) − n(A ∩ B) ; n(A′) = n(U) − n(A)
If A ⊂ B: A ∩ B = A and A ∪ B = B
N ⊂ W ⊂ Z ⊂ Q ⊂ R ; Q ∩ (irrationals) = ∅ ; Q ∪ (irrationals) = R
Type 2
Two sets: union, both and neither
Start with the one formula that runs this whole chapter:
n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Why the minus? When you add n(A) and n(B), the people in the overlap are counted once inside A and once again inside B. Subtract them once and everybody is counted exactly once.
[[fig:0]]
Take a group of 40 where 25 like tea, 22 like coffee and 7 like both. Then 25 + 22 − 7 = 40 like at least one. Look at the figure: only tea = 18, both = 7, only coffee = 15. Together that is 40.
The second link is with the total:
Formula: Total = n(A ∪ B) + Neither
So neither = Total − n(A ∪ B). These two lines are enough for every question of this type. Four quantities (n(A), n(B), both, at least one) are tied by the first formula, and the total and neither are tied by the second. Whatever is missing, put the known values in and solve.
Formula: Both = n(A) + n(B) − (Total − Neither)
[[fig:1]]
Watch for one special line: "each one of them likes at least one of the two" or "everyone passed in at least one subject". It means neither = 0, so n(A ∪ B) is the total itself.
Formula: n(A ∪ B) = n(A) + n(B) − n(A ∩ B)
Everyone in at least one ⇒ Neither = 0 ⇒ n(A ∪ B) = Total
- In a survey of 100 people, 60 like tea, 50 like coffee, and 25 like both tea and coffee. How many people like neither tea nor coffee?
- If A and B are two sets where the number of elements in set A is 28, the number of elements in set B is 35, and the number of elements…
- Based on a survey of 200 students, 140 students like cold drinks, 120 students like milkshakes, and 80 students like both. How many…
- If A and B are two sets such that number of elements in A is 20, number of elements in B is 18 and number of elements in both A and B is…
- In a class of 40 students, 15 students play cricket and 15 students play tennis, and 5 students play both the games. Then the number of…
Type 3
Two sets: only A, only B and exactly one
Now the question asks about a single region rather than a whole circle. The circle for A holds two kinds of people: those in A only and those in both. So
Formula: Total = Only A + Only B + Both + Neither
Only A = n(A) − Both and Only B = n(B) − Both
[[fig:0]]
Exactly one means only A or only B, never both:
Exactly one = Only A + Only B = n(A) + n(B) − 2 × Both
Formula: Exactly one = n(A) + n(B) − 2 n(A ∩ B) = n(A ∪ B) − n(A ∩ B)
Why 2 × Both this time? The overlap was counted twice in n(A) + n(B), and here we do not want it at all, so both copies go.
[[fig:1]]
Sometimes the data itself is given in regions: "20 like only tea, 15 like only coffee, 10 like both". Then n(Tea) = 20 + 10 = 30, not 20. Before using any formula, ask yourself whether a given number is a full circle or one region.
A useful pair to remember: n(A ∪ B) = Only A + Only B + Both, and also n(A ∪ B) = n(B) + Only A. Radhika used the second one in her class survey. 26 of her classmates sing, and 41 sing or dance, so only dance = 41 − 26 = 15, without finding the overlap at all.
Formula: Only A = n(A) − n(A ∩ B) = n(A ∪ B) − n(B)
- In a class of 80 students, 45 play cricket, 35 play football, and 15 play both cricket and football. How many students play only cricket?
- In a survey of 1000 people, 600 have visited Delhi, 450 have visited Mumbai and 250 have visited both cities. What is the ratio of people…
- In a club of 300 members, 160 like swimming, 140 like cycling and 60 like both. What fraction of the total members like exactly one…
Type 4
Percentage surveys and pass–fail questions
When the data is in percentages, take the total as 100 and use the same formulas. Every region becomes a percentage.
Formula: Take Total = 100 ; then n(A ∪ B) = a + b − both (all in %)
[[fig:0]]
Pass–fail questions look harder, but they are the same thing. "50% failed in Maths, 40% failed in English, 15% failed in both" is a two-set problem on the failed sets. Failed in at least one = 50 + 40 − 15 = 75%, so passed in both = 100 − 75 = 25%. Notice that passed in both is the neither region of the failed sets.
Formula: Passed in both = 100 − (fail A + fail B − fail both)
[[fig:1]]
You can also work on the passed sets. Passed in Maths = 50%, passed in English = 60%. Passed in at least one = 100 − (failed in both) = 85%. Then passed in both = 50 + 60 − 85 = 25%. Same answer. Choose the side on which the data is given.
Converting to a number. Usually one actual count is attached to one region: "If 360 students passed in both…". Find the percentage of that region, and the total follows:
Total = count × 100percentage of that region
Any other region is then the same fraction of the total. Better still, use the ratio of percentages directly: required number = given count × required %given %.
Formula: Total = given count × 100its % ; required = given count × required %given %
Type 5
Two-set stories with an unknown
Here the question does not give every number. It gives a relation instead: "only cricket is twice the number who play both", "neither is one-fifth of those who play at least one", "only tea : only coffee = 3 : 2".
The method is always the same. Put x in the region the relation talks about, write every other region in terms of x, and add all four regions to get the total.
Formula: Sum of all four regions = Total (write each region in x)
[[fig:0]]
For example, in a class of 52, only cricket is 3 times both, 10 play only football and 6 play neither. Let both = x, so only cricket = 3x. Then 3x + x + 10 + 6 = 52, which gives 4x = 36 and x = 9. Cricket players = 3x + x = 36.
Choose x carefully. Put x on the region that appears in the relation, usually the smaller one, so the other regions become 2x, 3x and so on with no fractions.
A relation between whole circles works the same way, but use the union formula. If football players = y and cricket players = y + 6, with 10 in both and 50 in the union, then (y + 6) + y − 10 = 50, so y = 27.
Formula: Relation between circles: (circle A) + (circle B) − Both = Union
When the total is unknown and only fractions or percentages of regions are given, the leftover fraction belongs to the known count. If 13 play only cricket and 14 play only football, the remaining 512 are the both-and-neither people together.
Formula: Unknown total: (sum of given fractions of regions) + (fraction of the rest) = 1
Type 6
Three sets: the full formula
For three sets the union formula grows by the same logic:
n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(B ∩ C) − n(C ∩ A) + n(A ∩ B ∩ C)
Follow one person who is in all three sets. Adding the three circles counts this person 3 times. Subtracting the three pairs removes them 3 times, so now they are counted 0 times. Adding the triple once brings them back to exactly 1. A person in exactly two sets is counted 2 times, then removed once, which leaves 1. Everybody ends up counted once.
Formula: All three = n(A ∪ B ∪ C) − ΣA + Σ(pairs)
[[fig:0]]
Remember the sign pattern as + singles, − pairs, + triple.
[[fig:1]]
As before, Total = n(A ∪ B ∪ C) + None. With these two lines you can find any one missing quantity: the union, the number in none, the number in all three, or even one missing circle or pair.
Formula: Total = n(A ∪ B ∪ C) + None
Example: 30 like A, 25 like B, 20 like C, 10 like A and B, 8 like B and C, 6 like C and A and 4 like all three. Union = 75 − 24 + 4 = 55. If there are 60 people, then 5 like none.
One important reading point: "n(A ∩ B) = 10" or "10 like A and B" includes the people who like all three. It is the whole lens shape, not just its part outside C. When a question means the part outside C, it will say "A and B but not C" or "only A and B".
Formula: n(A ∪ B ∪ C) = ΣA − Σ(pairs) + n(A ∩ B ∩ C)
Type 7
Three sets: only, exactly two and at least two
Region questions on three sets are solved by filling the diagram from the centre outwards.
1. Write the triple (all three) in the centre.
2. For each pair, exactly that pair = pair − triple.
3. For each circle, only that set = circle − (its two exactly-pair regions) − triple.
[[fig:0]]
Once all seven regions are written, any question is a sum of regions:
- Exactly one = only A + only B + only C
- Exactly two = the three exactly-pair regions = Σ(pairs) − 3 × triple
- At least two = exactly two + all three = Σ(pairs) − 2 × triple
Formula: Exactly two = Σ(pairs) − 3 × (all three) ; At least two = Σ(pairs) − 2 × (all three)
Exactly one = ΣA − 2 × (exactly two) − 3 × (all three)
Why 3 × triple in exactly two? Each of the three pair figures contains the centre once, so the three pairs together hold the centre three times.
[[fig:1]]
Two shortcut relations save a lot of time when circles and the union are given but the pairs are not:
ΣA = (exactly one) + 2 × (exactly two) + 3 × (all three)
Union = (exactly one) + (exactly two) + (all three)
Formula: ΣA = one + 2 × two + 3 × three ; Union = one + two + three
Subtract them: ΣA − Union = (exactly two) + 2 × (all three). For example, with circles 40, 35, 30, a union of 80 and 15 in exactly two, we get 105 − 80 = 15 + 2 × (all three), so all three = 5.
Formula: Only A = n(A) − n(A ∩ B) − n(A ∩ C) + n(A ∩ B ∩ C)
Type 8
Three-set puzzles: percentages, unknowns and reading a diagram
The toughest survey questions mix the ideas of the earlier types. Three tools handle all of them.
1. Percentages with three sets. Take the total as 100, find the union with the seven-term formula, and the rest is none. Then one real count fixes the total. For example, 45% read A, 40% read B, 30% read C, the pairs are 15%, 12% and 10%, and 6% read all three. The union is 115 − 37 + 6 = 84%, so 16% read none. If 480 people read none, the total is 480 × 10016 = 3000.
Formula: Three sets in %: None = 100 − [ΣA − Σ(pairs) + all three]
2. Unknowns in regions. Put x where the relation points. Write all eight regions in x and add them to the total. For example, each only region is 2x, each exactly two region is x and the centre is 4. With everyone in at least one set and a total of 49, 6x + 3x + 4 = 49 gives x = 5.
Formula: Sum of all eight regions = Total
[[fig:0]]
3. Reading a given diagram. When the figure is already filled, translate the words into regions and add. "A or B but not C" is only A + only B + (A and B only), which is three regions, not the full A ∪ B. "Not A" is everything outside circle A, including none.
Formula: A or B but not C = n(A ∪ B) − n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C)
[[fig:1]]
Whatever the form, the habit is the same: decide the regions, write a number in each, and check that the regions add up to the total.
Type 9
Maximum and minimum overlap
Sometimes the overlap is not given at all, and the question asks how large or how small it can be.
Maximum overlap. The overlap can never be bigger than the smaller set. If 30 like tea and 45 like coffee, at most 30 can like both; that happens when every tea lover also likes coffee. So max(A ∩ B) = smaller of n(A), n(B).
Minimum overlap. Push the two sets as far apart as the total allows. If the total is 60 and the sets are 30 and 45, then 30 + 45 = 75 is more than 60, so at least 75 − 60 = 15 must be common. So min(A ∩ B) = n(A) + n(B) − Total, and if that is negative, the minimum is 0.
Formula: min(A ∩ B) = n(A) + n(B) − Total (0 if negative)
[[fig:0]]
The bar picture makes it clear. Draw the total as a strip of length 100. Put A from the left end and B from the right end. The part where they still meet is the minimum overlap.
[[fig:1]]
The same idea gives the range of neither: neither is largest when the overlap is largest (Total − larger set) and smallest when the overlap is smallest.
Formula: max(Neither) = Total − larger set ; min(Neither) = max(0, Total − (a + b))
Three or more sets (in %). The people outside each set are 100 − a, 100 − b, 100 − c. At most, these groups are all different people, so at least 100 − [(100 − a) + (100 − b) + (100 − c)] are in all three. This simplifies to min(all three) = max(0, a + b + c − 200), and for four sets max(0, a + b + c + d − 300), with all percentages taken on the same population. The floor of 0 matters: the formula alone can come out negative.
Formula: max(A ∩ B) = min(n(A), n(B))
In %: min(all three) = max(0, a + b + c − 200) ; min(all four) = max(0, a + b + c + d − 300) (same population)