Pigeonhole principle and invariants
IOQM · All sections · about 6 minutes
If n + 1 objects go into n boxes, some box gets two. Invariants are quantities that never change under the allowed moves, proving that some states are unreachable.
Both turn “show that…” arguments into numbers.
Pigeonhole
Pick boxes so that two objects in one box gives what you want. Among any 5 integers, two have the same remainder mod 4, so their difference is divisible by 4.
Invariants
Find something the moves cannot change. A chessboard with two opposite corners removed cannot be tiled by dominoes, because every domino covers one black and one white square but the corners have the same colour.
Worked examples
Example 1Among any 11 integers, show two have a difference divisible by 10. How many remainders mod 10 are there?
- There are 10 remainders and 11 numbers.
Answer: 10, so two share a remainder
See it move
Where marks are lost
- Choosing boxes that do not give the conclusion.
- Missing that an invariant must hold for every allowed move.
Exam tips
- To guarantee k in one box with n boxes, you need n(k − 1) + 1 objects.
- Common invariants: parity, sum, colouring.
- Choose the boxes cleverly: remainders, pairs adding to a total.
Practice questions
How many socks must you take from a drawer of 5 colours to be sure of a matching pair?
Minimum people needed to be sure that 3 share a birth month?
Numbers 1 to 10 are on a board. Replace any two by their difference repeatedly until one is left. Its parity is…
More worked examples
Try each one first, then open the working.
How many triangles of all sizes are in the figure?
Show the working
Start: A triangle is fixed by choosing two lines from the top corner and one base line.
Each strip between parallel lines gives C(4, 2) = 6 triangles (choose 2 of the 4 lines from the top corner), and there are 1 such levels: 6.
Answer: 6
Moving only right or up, how many shortest routes from A to B pass through P?
Show the working
Start: Routes to P times routes from P.
A→P: C(2, 1) = 2; P→B: C(6, 3) = 20. Multiply: 40.
Answer: 40
How many different arrangements can be made of all the letters of the word BANANA?
Show the working
Start: n! ÷ (p! q! …) for repeated letters.
6! divided by the factorials of the repeated letters = 60.
Answer: 60
How many triangles of all sizes are in the figure?
Show the working
Start: A triangle is fixed by choosing two lines from the top corner and one base line.
Each strip between parallel lines gives C(6, 2) = 15 triangles (choose 2 of the 6 lines from the top corner), and there are 3 such levels: 45.
Answer: 45
Practise more
New questions every time, at exam level
How many triangles of all sizes are in the figure?