An exam question says: "If |A| = 30, |B| = 25, and |A \cup B| = 45, find |A \cap B|." A student who has not internalised the pattern starts drawing a Venn diagram, guessing overlap sizes, working backward from examples. A student who has internalised it recognises the four-quantity signature instantly and writes one line.
The signature is: the problem gives you some three of the four quantities
and asks for the fourth. Inclusion-exclusion for two sets is the equation that connects all four:
Any one quantity in that equation is solvable from the other three by basic algebra. That is the whole trick.
The recognition cue
Train your eyes to spot the signature. The problem mentions:
- Two named sets A, B (or H and E, or cricket and football).
- At least two of their sizes — |A|, |B|, or "30 play cricket."
- And one more quantity — either the size of the union ("45 play at least one sport") or the size of the intersection ("10 play both").
- The question asks for whichever of the four quantities was not given.
Any problem with this structure is a single application of |A \cup B| = |A| + |B| - |A \cap B|. No Venn diagram needed (though you can always draw one on the rough sheet to check).
The four rearrangements
The same formula rearranges four ways, one for each unknown:
Memorise the first form; the others are immediate rearrangements. In an exam you identify which unknown you want and apply whichever rearrangement reads off in one step.
Walked mini-examples
Example 1. |A| = 30, |B| = 25, |A \cup B| = 45. Find |A \cap B|.
One step. The answer is 10.
Example 2. In a town, 60\% of people read a Hindi newspaper, 45\% read an English newspaper, and 85\% read at least one. What percentage read both?
Treat the percentages as cardinalities out of 100 people. Then |H| = 60, |E| = 45, |H \cup E| = 85, find |H \cap E|:
20\% read both.
Example 3. A class has 40 students. 18 play cricket, and 12 play both cricket and football. If the union of cricket and football players is 30, how many play football?
Identify: |C| = 18, |C \cap F| = 12, |C \cup F| = 30. Find |F|:
24 students play football.
Example 4 — works backwards too. |A| = 20, |A \cap B| = 8, |A \cup B| = 27. Find |B|:
|B| = 15.
The companion cue: "exactly one" and "at least one"
Once you spot the signature, two follow-up questions are common. Each reduces to the same formula.
- "How many are in at least one of A or B?" That is |A \cup B| — given directly or computed from |A| + |B| - |A \cap B|.
- "How many are in exactly one of A or B?" That is |A \cup B| - |A \cap B|, because you take the union and remove the overlap. Also writeable as |A| + |B| - 2|A \cap B|.
- "How many are in neither A nor B?" That is |U| - |A \cup B|, once you know |U|.
All three answers flow from the same inclusion-exclusion line. Write the base formula, then derive whichever sub-count the question asks for.
The three-set cousin
When the problem mentions three sets instead of two, the same pattern applies with a larger formula:
Seven quantities, any one solvable from the other six. The recognition cue extends directly: three named sets, six of the seven quantities given, one asked. Apply the formula.
For the pattern you might meet in competitive exams, see inclusion-exclusion vs direct Venn counting for guidance on when the formula is faster than the Venn-diagram filling approach.
Why the pattern is worth drilling
Two-set inclusion-exclusion shows up in:
- Every survey problem with two attributes (cricket/football, Hindi/English, coffee/tea, Android/iPhone).
- Probability questions about P(A \cup B) = P(A) + P(B) - P(A \cap B) — same formula, different letters.
- Counting problems in combinatorics where a number must satisfy at least one of two divisibility conditions.
- Database problems in later courses about OR-queries on tables.
It is the single most frequent set-operation pattern on school and competitive exams. The cost of recognising it is one-line of arithmetic; the cost of not recognising it is three to five minutes of Venn-diagram fumbling per question. The trade is so lopsided that the recognition is worth overtraining — every time you see any three of the four quantities, the formula should already be in your pen before you finish reading.
The exam reflex
- See |A|, |B|, and one of |A \cup B| or |A \cap B| in the stem.
- Immediately write |A \cup B| = |A| + |B| - |A \cap B| on the rough sheet.
- Solve for whichever quantity is missing.
- If the question asks for "exactly one" or "neither," do one more subtraction.
Three seconds of recognition, one line of arithmetic, done. That is the whole pattern.
Related: Set Operations · Inclusion-Exclusion Calculator · Inclusion-Exclusion vs Direct Venn Counting · Spot 'Neither A Nor B'