An expert question on pigeonhole principle for P5–P6, with a step-by-step solution, diagrams and the answer. Common in the Hua Xia Cup's P3 to P6 qualifying rounds and finals. The trick is to imagine the unluckiest case.
The question
A lucky-draw box holds 27 balls numbered 1 to 27, one of each.
Lok draws them one at a time without looking.
What is the fewest he must draw to be sure that two of the numbers differ by exactly 3?
Show the hints (3)
💡Hint 1: Which numbers could differ by 3? Try lining them up in chains.
💡Hint 2: For example, start at 1 and keep adding 3: that is a chain, neighbours 3 apart. Neighbours in a chain can't both be drawn; numbers in different chains never differ by 3.
💡Hint 3: There are 3 chains of 9 numbers each. In a chain of L numbers, taking every other one, how many can you take?
Worked solution
Have a go first, then read the solution step by step.
1.Split 1 to 27 into 3 chains by remainder on division by 3; neighbours in a chain differ by 3.
2.27 ÷ 3 = 9 exactly: 3 chains of 9.
3.Taking every other number in a chain: 5 from a chain of 9.
4.Worst luck: 3 × 5 = 15, still no two differing by 3.
5.One more must sit next to a drawn number in its chain: 15 + 1 = 16.
⚠️Common mistake: thinking each chain allows only one draw and answering 3 + 1 = 4. Numbers two apart in a chain differ by 6, so both can be drawn.