An easy question on inclusion–exclusion for P3–P4, with a step-by-step solution, diagrams and the answer. Common in the Hua Xia Cup's P3 to P6 qualifying rounds and finals; harder ones have three overlapping groups, or ask who is in exactly two.
The question
In a class, 5 pupils keep a hamster and 3 keep a rabbit.
2 of them keep both.
How many pupils keep a hamster or a rabbit (at least one)?
Show the hints (2)
💡Hint 1: If you add 5 and 3, who gets counted twice?
💡Hint 2: Draw two overlapping circles: the overlap is the pupils who keep both.
Worked solution
Have a go first, then read the solution step by step.
1.The 5 who keep a hamster are in the left circle, the 3 who keep a rabbit in the right. The 2 who keep both are where the circles overlap.
2.5 + 3 = 8, but the 2 in the overlap are in both circles, so they are counted twice.
3.Take them off once: 8 − 2 = 6, the two circles together.
⚠️Common mistake: answering 8. The 2 in the overlap are counted twice.