If you put more objects into boxes than there are boxes, some box must hold at least two. The hard part is choosing what the objects (pigeons) and boxes (holes) are.
The pigeonhole principle
Let . If or more objects are placed into boxes, then at least one box contains two or more objects.
A function with cannot be one-to-one.
- 367 people: two share a birthday (366 possible birthdays).
- 27 English words: two end in the same letter (26 letters).
- Scores 0–50 (51 possible scores): 52 students guarantee two with the same score.
The generalized pigeonhole principle
If objects are placed into boxes, then some box contains at least objects.
Why: if every box had at most objects, the total would be at most , using . Contradiction.
- Guaranteed amount: objects in boxes means some box has .
- Minimum number needed: to guarantee some box has at least objects, you need
Reason: objects can be spread with exactly in every box. One more forces a box to reach .
, : .
, so at least 4 were born in the same month.
"Specific box" questions: think worst case
When you need objects of a specific kind, pigeonhole isn't the right tool. Imagine the worst luck: you draw every other kind first, then of the kind you want.
- At least 3 cards of the same suit (any suit): 4 suits, , so cards.
- At least 3 clubs: in the worst case you draw all 39 non-clubs first, so you need cards.
Writing a pigeonhole proof
- Name the pigeons (the objects) and count them: .
- Name the holes (the categories) and count them: , with .
- Say why each pigeon lands in exactly one hole.
- Conclude: by the pigeonhole principle, two pigeons share a hole, which means … (translate back into the problem).
| Problem type | Holes |
|---|---|
| Two integers with the same remainder mod | the remainders |
| Pairs adding to a target (e.g. sum 9 from ) | the pairs |
| Integer midpoint of lattice points | parity patterns: (even, odd), … ( of them) |
| Degrees in a network of computers | possible degrees, of which only can occur |
| One integer divides another (from class) | odd parts: write with odd |
Proof
Write each chosen integer as with odd. Each odd part is in , which has only values. With integers, two have the same odd part: and . If then . ∎
Proof
Consider the numbers . There are only possible remainders mod , so two of them, say with ones, have the same remainder. Their difference is divisible by and uses only 0s and 1s. ∎
Computing ceilings without a calculator
: divide, and if there's any remainder, round up.
- : , so it is .
- (because ).
- Using instead of . To guarantee 2 in a box you need , not .
- Forgetting that "at least 3 blue" is a worst-case question, not .
- In proofs, not saying what the boxes are, or not translating the conclusion back.
"There is a box containing at least ___ objects": the missing word is two.
Exam checklist
- Find the minimum that guarantees in some box: .
- Find the guaranteed amount .
- Use worst-case reasoning for a specific category.
- Write a clean pigeonhole proof with explicit pigeons and holes (remainders, pairs, parities, degrees).