Skip to main content
ExamExplained
NSW · Maths Extension 1
Maths Extension 1 study scene
§-Syllabus dot point
NSWMaths Extension 1Syllabus dot point

When can we guarantee that some box contains more than one object, and how do we apply this to counting and existence arguments?

State and apply the pigeonhole principle in counting and existence problems

A focused answer to the HSC Maths Extension 1 dot point on the pigeonhole principle. The basic and generalised forms, identifying boxes and pigeons in a problem, and using the principle to prove existence statements, with a stepped objects-into-boxes diagram and worked examples.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

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 n+1n + 1 or more objects are placed into nn boxes, then at least one box contains at least 22 objects.

Why: if every box held at most 11 object, the total number of objects could be at most nn, which contradicts having n+1n + 1 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 44 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.

Pigeonhole stage 1: first object placedFour boxes; the first of five objects is placed into box one. Every box still holds at most one object.Object 1box 1box 2box 3box 41Place object 1 in box 1. Each box holds at most one so far.

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 44 objects in 44 boxes guarantees nothing.

Pigeonhole stage 2: four objects, one per boxFour objects placed one in each of the four boxes. Every box holds exactly one object and there is no doubling up yet.Objects 1 to 4box 1box 2box 3box 41234Four objects can sit one per box: still no box has two. This is the tight case.

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: 5=4+15 = 4 + 1 objects in 44 boxes forces a repeat.

Pigeonhole stage 3: the fifth object forces a pairA fifth object is placed; the four boxes already hold one each, so wherever the fifth goes that box now holds two. Box one is highlighted holding objects one and five.Object 5box 1box 2box 3box 415234The 5th object has no empty box: some box (here box 1) now holds two.

The generalised pigeonhole principle

If kn+1k n + 1 or more objects are placed into nn boxes, then at least one box contains at least k+1k + 1 objects.

The reasoning is the same contradiction: if every one of the nn boxes held at most kk objects, the total would be at most knkn, contradicting kn+1kn + 1. Equivalently, if mm objects are placed in nn boxes, at least one box contains at least

mn\left\lceil \frac{m}{n} \right\rceil

objects (the ceiling, the smallest integer not less than mn\frac{m}{n}). The basic form is just k=1k = 1.

Strategy for applying it

  1. Identify the objects (pigeons) and the categories (boxes).
  2. Count the number of each.
  3. Check whether the pigeons exceed (or sufficiently exceed) the boxes, that is m>nm > n for the basic form, or m>knm > kn for the generalised form.
  4. 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 nn. Any n+1n + 1 integers must include two with the same remainder on division by nn, so their difference is divisible by nn. 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 2525-points-in-a-square question splits the square into 1616 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 nn objects in nn boxes, every box can hold exactly one, so m=nm = n guarantees nothing, you genuinely need mn+1m \ge n + 1. The same sharpness applies to the generalised form at m=knm = kn.

How exam questions ask about the pigeonhole principle

  • "Show that among any NN [integers / people / points] ... two must ...": a near-certain pigeonhole. Make the "..." the box description.
  • "... two leave the same remainder on division by dd" / "... two whose difference is divisible by dd": boxes are the dd remainders 0,1,,d10, 1, \dots, d - 1.
  • "... two share a [birthday month / starting letter / value]": boxes are the categories (12 months, 26 letters, and so on).
  • "Show that at least kk of them ...": the generalised form; you need more than (k1)×(boxes)(k - 1) \times (\text{boxes}) pigeons.
  • Points in a region, "two within distance dd": cut the region into cells whose diameter is dd; 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.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

HSC-style2 marksShow that among any 55 integers, at least two leave the same remainder when divided by 44.
Show worked answer →

When an integer is divided by 44, the possible remainders are 0,1,2,30, 1, 2, 3, which is 44 categories (boxes).

The 55 integers are the pigeons. Since 5>45 > 4, 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 44.

HSC-style3 marks2525 points are placed inside a square of side length 11. Show that some pair of points is at most 24\frac{\sqrt{2}}{4} apart.
Show worked answer →

Divide the unit square into a 4×44 \times 4 grid of 1616 smaller squares, each of side 14\frac{1}{4} (these are the boxes).

There are 2525 points (pigeons) and 1616 small squares. Since 25>1625 > 16, 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, (14)2+(14)2=24\sqrt{\left( \tfrac{1}{4} \right)^2 + \left( \tfrac{1}{4} \right)^2} = \frac{\sqrt{2}}{4}.

Therefore those two points are at most 24\frac{\sqrt{2}}{4} apart.

ExamExplained