The pigeonhole principle: guaranteed coincidences in counting problems
“State and apply the pigeonhole principle in counting and existence problems”
The pigeonhole principle: if or more objects are placed into boxes, at least one box contains objects; generalised, or more in boxes forces some box to hold (equivalently for objects). It proves existence only, and the skill is choosing boxes (often remainders, intervals or subset-sums) that make the conclusion fall out.
Jump to a section
What this dot point is asking
NESA wants you to recognise problems where the pigeonhole principle applies, identify the "boxes" and "pigeons" appropriately, and use the principle to prove that some box must contain at least two objects (or more, in the generalised form). The principle itself is almost trivially true; the marks are won by the modelling, that is, choosing the boxes so cleverly that "two pigeons in one box" turns into exactly the statement you were asked to prove.
The answer
The pigeonhole principle (basic form)
If or more objects are placed into boxes, then at least one box contains at least objects.
Why: if every box held at most object, the total number of objects could be at most , which contradicts having or more. This is a proof by contradiction, and it is worth writing out that one line in an exam because it shows you understand why the principle holds, not just that it does.
Watch objects fill the boxes, stage by stage
The principle is easiest to believe when you try (and fail) to keep every box to one object. Take boxes and place objects one at a time. The first four can spread out, but the fifth has nowhere new to go.
Stage 1, place the first object. Drop object 1 into a box. Every box still holds at most one object, so there is no doubling-up yet.
Stage 2, fill every box once. Objects 2, 3 and 4 each take an empty box. Now all four boxes hold exactly one object. This is the tight case: with exactly as many objects as boxes, you can avoid a repeat, so objects in boxes guarantees nothing.
Stage 3, the fifth object forces a pair. Every box is already occupied, so the fifth object must share a box with one already there. Whichever box it lands in (box 1 shown) now holds two. This is the principle: objects in boxes forces a repeat.
Basic form: if or more objects go into boxes, some box holds at least . Generalised form: if or more objects go into boxes, some box holds at least ; equivalently, objects in boxes force some box to hold at least (the ceiling). The whole skill is choosing the boxes so that "two in one box" is exactly the conclusion you need.
The generalised pigeonhole principle
If or more objects are placed into boxes, then at least one box contains at least objects.
The reasoning is the same contradiction: if every one of the boxes held at most objects, the total would be at most , contradicting . Equivalently, if objects are placed in boxes, at least one box contains at least
objects (the ceiling, the smallest integer not less than ). The basic form is just .
Strategy for applying it
- Identify the objects (pigeons) and the categories (boxes).
- Count the number of each.
- Check whether the pigeons exceed (or sufficiently exceed) the boxes, that is for the basic form, or for the generalised form.
- State the conclusion, naming the principle.
The whole difficulty, and where the marks are, is step 1: choosing the boxes so that two pigeons in one box gives the statement you want.
Common box choices
- Remainders modulo . Any integers must include two with the same remainder on division by , so their difference is divisible by . This is the most common HSC pattern.
- Intervals partitioning a range. Split a length or a range of values into equal sub-intervals; the values in the range are the pigeons. (The -points-in-a-square question splits the square into cells.)
- Sums or subset-sums. When proving two subsets share a sum, the possible sums are the boxes and the subsets are the pigeons.
- Pairs that "use up" a value. When proving two of a collection match, the distinct possible values are the boxes.
Limitations
The pigeonhole principle gives existence, not construction. It tells you that two such objects exist, but never which ones. It is also sharp: with exactly objects in boxes, every box can hold exactly one, so guarantees nothing, you genuinely need . The same sharpness applies to the generalised form at .
How exam questions ask about the pigeonhole principle
- "Show that among any [integers / people / points] ... two must ...": a near-certain pigeonhole. Make the "..." the box description.
- "... two leave the same remainder on division by " / "... two whose difference is divisible by ": boxes are the remainders .
- "... two share a [birthday month / starting letter / value]": boxes are the categories (12 months, 26 letters, and so on).
- "Show that at least of them ...": the generalised form; you need more than pigeons.
- Points in a region, "two within distance ": cut the region into cells whose diameter is ; the cells are the boxes.
- The phrasing is almost always "show that", "prove that", or "must" (a guarantee), never "find" or "how many" (those are direct counting). A guarantee with more objects than obvious categories is the cue.
Open by naming the boxes and the pigeons in one sentence each: "Let the boxes be the four remainders modulo ; the five integers are the pigeons." Then state the inequality () and invoke the principle by name. For the generalised form, write the explicit comparison, ", so some box has at least ", so the marker sees the structure. Finish by translating "two in one box" back into the wording of the question (for example, "their difference is divisible by "). Markers reward a clearly identified box set far more than any clever arithmetic; an unclear box choice is the difference between full marks and zero.
Share a birthday month (basic form)
Show that among any people, at least two share a birthday month. The boxes are the months; the pigeons are the people. Since , by the pigeonhole principle at least one month is shared by two people.
Share a birth date (larger numbers, same idea)
Show that among any people, at least two share a birth date. The boxes are the possible dates (ignoring leap years); the pigeons are the people. Since , some date is shared by at least two people. (This is the certainty point of the birthday problem.)
Force five with the same remainder (generalised form)
Show that among any integers, at least leave the same remainder when divided by . The boxes are the remainders ; the pigeons are the integers. Since (equivalently ), at least one remainder is shared by of the integers.
Find a difference divisible by four (choosing the boxes)
Show that among any integers, there are two whose difference is divisible by . Let the boxes be the remainders modulo ; the integers are the pigeons. Since , two integers share a remainder. If and have the same remainder modulo , then is divisible by , which is the required conclusion.
Two close points in a square (geometry)
Show that if points are placed inside a square, two of them are at most apart. Cut the square into four cells (the boxes). With points and cells, some cell contains at least two points. The farthest two points in a cell are at its diagonal, , so those two points are at most apart.
Two subsets with equal sums (subset-sum)
Show that any distinct two-digit numbers contain two different subsets with the same sum. There are non-empty subsets (the pigeons). Each subset sum lies between (the smallest possible single element) and (the largest possible total), so there are at most possible sums (the boxes). Since , two different subsets share a sum. Removing any common elements from both leaves two disjoint subsets with equal sums.
- Wrong choice of boxes
- The principle only helps if "two pigeons in one box" gives the conclusion you want. Choosing boxes carelessly proves nothing. This is where most marks are lost.
- Off-by-one in the bound
- " or more" pigeons forces a box with ; exactly pigeons does not. State the strict inequality.
- Generalised-form miscount
- pigeons force in some box; pigeons do not. Use the ceiling to be safe, and double-check whether exactly (in which case the guarantee is only ).
- Trying to construct
- The principle is existence-only. Do not attempt to say which box has the extras or which objects coincide.
- Confusing it with exact counting
- Pigeonhole proves "at least one box has "; it never says how many boxes do, nor exactly how full any box is.
Exam-style questions
Questions in the style of NESA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.
HSC-style2 marksShow that among any integers, at least two leave the same remainder when divided by .Show worked answer →
When an integer is divided by , the possible remainders are , which is categories (boxes).
The integers are the pigeons. Since , by the pigeonhole principle at least one remainder is shared by two of the integers.
Hence at least two of the five integers have the same remainder modulo .
HSC-style3 marks points are placed inside a square of side length . Show that some pair of points is at most apart.Show worked answer →
Divide the unit square into a grid of smaller squares, each of side (these are the boxes).
There are points (pigeons) and small squares. Since , by the pigeonhole principle at least one small square contains at least two of the points.
The greatest distance between two points within a small square is its diagonal, .
Therefore those two points are at most apart.