Resources For Teachers For Tutors For Students & Parents Pricing
Year 11 Maths - Specialist (Unit 1 and Unit 2) Combinatorics

The pigeon-hole principle

20 practice questions 0 video lessons Theory + worked examples

Master the pigeon-hole principle in Year 11 VCE Specialist Mathematics. It says that placing \(n\) items into \(m\) boxes forces some box to hold at least \(\left\lceil\dfrac{n}{m}\right\rceil\) items, so with more items than boxes at least one box must double up. It sits in the Discrete mathematics area of study of the VCE Mathematics Study Design (VCAA), within the Combinatorics topic of Unit 1.

You will learn the basic form (\(n>m\) forces a box of \(2\)), the generalised form \(m(k-1)+1\) that guarantees a box of \(k\), and how to build existence proofs — shared birth months, matching socks and equal remainders.

Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The pigeon-hole principle says that if \(n\) items are placed into \(m\) boxes, then some box must hold at least \(\left\lceil \dfrac{n}{m}\right\rceil\) items. In its basic form, if \(n>m\) then some box holds at least \(2\). In Year 11 Specialist Mathematics you use it to guarantee a result and to build existence proofs — shared birth months, matching socks, and equal remainders.

The pigeon-hole principle is a simple counting idea with surprising reach. If more pigeons are placed into fewer pigeon-holes than there are pigeons, then at least one hole must contain more than one pigeon. The “pigeons” are the items being sorted and the “holes” are the categories they fall into.

In its basic form: if \(n\) items are placed into \(m\) boxes and \(n>m\), then at least one box contains at least \(2\) items. The reasoning is by the worst case — if every box held at most one item, the boxes could hold at most \(m\) items in total, but there are \(n>m\) of them, so some box must double up.

More precisely, sharing \(n\) items as evenly as possible across \(m\) boxes still forces some box to hold at least \(\left\lceil \dfrac{n}{m}\right\rceil\) items, where \(\lceil\ \rceil\) is the ceiling (round up). This is the guaranteed load.

Read the other way, this becomes the generalised form: to be certain that some box holds at least \(k\) items, you must place a minimum of \(m(k-1)+1\) items. Filling every box to \(k-1\) uses \(m(k-1)\) items without any box reaching \(k\); the very next item is the one that forces a box to \(k\). The heart of every problem is naming the pigeons and the holes correctly.

Basic form: more items than boxes forces a repeatSix boxes hold seven items in total. Five boxes hold one item each and one box, outlined in red, is forced to hold two. When there are more items than boxes, some box must contain at least two items.
Basic form. Seven items in \(6\) boxes: even after one item per box, the \(7\)th has nowhere empty to go, so the red box is forced to hold \(2\). Whenever \(n>m\), some box holds at least \(2\).
Guaranteed load: the most even split still overflowsSix boxes share twenty items as evenly as possible: two boxes hold four and four hold three. Even this fairest split leaves a box, outlined in red, holding four. So some box must hold at least the ceiling of twenty over six, which is four.
Guaranteed load. Spreading \(20\) items over \(6\) boxes as evenly as possible still leaves a box with \(4\), since \(\left\lceil \tfrac{20}{6}\right\rceil = \lceil 3.33\ldots\rceil = 4\).

Place \(n\) items into \(m\) boxes. The guaranteed load — the largest number some box is certain to hold — is the ceiling of \(n\) divided by \(m\):

\[ \text{some box holds at least } \left\lceil \dfrac{n}{m}\right\rceil \]
nm

The basic form is the case \(k=2\): as soon as there are more items than boxes, the ceiling is at least \(2\).

\[ n > m \ \Rightarrow\ \text{some box holds at least } 2 \]

Turned around, the generalised form gives the least number of items that guarantees some box holds at least \(k\):

\[ n_{\min} = m(k-1)+1 \]
nmin=m(k1)+1
Why the “\(+1\)”? Filling every one of the \(m\) boxes with \(k-1\) items uses \(m(k-1)\) items while no box yet holds \(k\). This is the worst case. The next item must land in a box that already has \(k-1\), pushing it to \(k\) — hence \(m(k-1)+1\).

The two forms are inverses of each other. Given \(n\) and \(m\), the ceiling gives the forced load; given the target load \(k\) and the number of boxes \(m\), the formula \(m(k-1)+1\) gives the number of items needed to force it.

How to apply the pigeon-hole principle

  1. Name the pigeons and the holes. Decide what is being sorted (the items / pigeons) and what the categories are (the boxes / holes). This is the whole problem — get it right and the arithmetic is short.
  2. Count the holes \(m\). For months \(m=12\); for sock colours \(m=\) the number of colours; for remainders on division by \(d\), \(m=d\) (the remainders \(0,1,\dots,d-1\)).
  3. Decide which way round the question runs. Given the items, find the forced load \(\left\lceil \tfrac{n}{m}\right\rceil\). Given a target load \(k\), find the least number of items \(m(k-1)+1\).
  4. Argue by the worst case. Spread the items as evenly as possible (or fill each box to \(k-1\)); the item that has nowhere left to go proves the result.

To guarantee two people share a birth month there are \(m=12\) holes, so a minimum of \(12(2-1)+1 = 13\) people is needed.

Example 1 — Guaranteed load \(\lceil n/m\rceil\)
Twenty pigeons roost in \(6\) nesting boxes. Using the pigeon-hole principle, at least how many pigeons must share one box?
Solution

Identify the pigeons and the holes, then take the ceiling of their ratio:

\(\text{pigeons } n\)\(=\)\(20\)
\(\text{holes } m\)\(=\)\(6\)
\(\left\lceil \dfrac{n}{m}\right\rceil\)\(=\)\(\left\lceil \dfrac{20}{6}\right\rceil\)
\(=\)\(\lceil 3.33\ldots\rceil\)
\(=\)\(4\)

Some box must hold at least \(4\) pigeons.

Twenty pigeons in six boxesTwenty pigeons shared as evenly as possible over six boxes give two boxes of four and four boxes of three, so some box, shown in red, holds four.
Example 2 — Basic form: a shared birth month
What is the smallest number of people in a room that guarantees at least two of them were born in the same month?
Solution

The holes are the \(12\) months; the people are the pigeons:

\(\text{holes } m\)\(=\)\(12 \ \text{(months)}\)
\(\text{worst case: one person per month}\)\(=\)\(12 \ \text{people, all different}\)

One more person must repeat a month \(\bigl(k=2\bigr)\):

\(n\)\(=\)\(m(k-1)+1\)
\(=\)\(12(2-1)+1\)
\(=\)\(13\)

\(13\) people guarantee two share a birth month.

Example 3 — Matching socks
A drawer holds many socks in \(3\) colours (red, blue, black), all mixed together. Socks are drawn one at a time without looking. How many must be drawn to be certain of a matching pair (two of the same colour)?
Solution

The colours are the holes; a matching pair means some hole reaches \(k=2\):

\(\text{holes } m\)\(=\)\(3 \ \text{(colours)}\)
\(\text{worst case: one of each colour}\)\(=\)\(3 \ \text{socks, all different}\)

The next sock must repeat a colour:

\(n\)\(=\)\(m(k-1)+1\)
\(=\)\(3(2-1)+1\)
\(=\)\(4\)

\(4\) socks guarantee a matching pair.

Four socks in three coloursThree boxes stand for the three sock colours. After one sock of each, the fourth sock must fall into a box that already has one, shown in red, giving a matching pair.
Example 4 — Generalised form: forcing a box of \(3\)
Cards are dealt into \(5\) boxes. To guarantee that at least one box contains at least \(3\) cards, what is the least number of cards needed?
Solution

Fill each box to \(k-1\), then one more forces a box to \(k\); here \(k=3\):

\(\text{boxes } m\)\(=\)\(5\)
\(\text{worst case: } (k-1)=2 \text{ per box}\)\(=\)\(5\times 2 = 10 \ \text{cards}\)

The next card forces some box to \(3\):

\(n\)\(=\)\(m(k-1)+1\)
\(=\)\(5(3-1)+1\)
\(=\)\(11\)

\(11\) cards are required.

Example 5 — Matching remainders (mod \(5\))
Any integer divided by \(5\) leaves a remainder of \(0,1,2,3\) or \(4\). What is the least number of integers you must choose to be sure two of them leave the same remainder on division by \(5\)?
Solution

The holes are the \(5\) possible remainders; a repeat means \(k=2\):

\(\text{holes } m\)\(=\)\(5 \ \text{(remainders } 0\text{--}4)\)
\(\text{worst case: one integer per remainder}\)\(=\)\(5\)

The next integer must repeat a remainder:

\(n\)\(=\)\(m(k-1)+1\)
\(=\)\(5(2-1)+1\)
\(=\)\(6\)

\(6\) integers guarantee a repeated remainder.

Example 6 — Generalised form: three sharing a month
How many people must be in a room to guarantee that at least \(3\) of them share the same birth month?
Solution

Now the target load is \(k=3\) with \(m=12\) month-holes:

\(\text{months } m\)\(=\)\(12\)
\(\text{worst case: } 2 \text{ per month}\)\(=\)\(12\times 2 = 24 \ \text{people}\)

One more person forces a third into some month:

\(n\)\(=\)\(m(k-1)+1\)
\(=\)\(12(3-1)+1\)
\(=\)\(25\)

\(25\) people guarantee three sharing a birth month.

Common pitfalls

Forgetting the “\(+1\)”. Filling \(m\) boxes with \(k-1\) items each uses \(m(k-1)\) items with no box yet at \(k\). You need one more to force a box to \(k\): the answer is \(m(k-1)+1\), not \(m(k-1)\).
Confusing the two forms. “At least how many must share?” asks for the forced load \(\left\lceil \tfrac{n}{m}\right\rceil\). “How many are needed to guarantee a box of \(k\)?” asks for \(m(k-1)+1\). Read which way the question runs.
Miscounting the holes. For remainders on division by \(d\) there are \(d\) holes \((0,1,\dots,d-1)\), not \(d-1\). For months there are \(12\); for days of the week, \(7\). Naming the holes wrongly wrecks the arithmetic.
Rounding \(n/m\) the wrong way. The guaranteed load rounds up (ceiling), never down. With \(20\) items in \(6\) boxes, \(\left\lceil \tfrac{20}{6}\right\rceil = 4\), not \(3\).

Frequently asked questions

What is the pigeon-hole principle?

It states that if \(n\) items are placed into \(m\) boxes, some box must contain at least \(\left\lceil \tfrac{n}{m}\right\rceil\) items. In particular, if there are more items than boxes \((n>m)\), then at least one box holds \(2\) or more.

What is the basic form of the principle?

The basic form is the case \(k=2\): if \(n>m\), then at least one box must contain at least \(2\) items. If every box held at most one item there could be at most \(m\) items, but there are \(n>m\), so some box doubles up.

What is the generalised form?

To guarantee that some box holds at least \(k\) items, you need a minimum of \(m(k-1)+1\) items. Filling each of the \(m\) boxes to \(k-1\) uses \(m(k-1)\) items with no box at \(k\); the next item forces one box to \(k\).

How do I know how many pigeons force a shared box?

Work out the number of holes \(m\) and the target load \(k\), then use \(m(k-1)+1\). To guarantee two people share a birth month, \(m=12\) and \(k=2\), giving \(12(2-1)+1=13\) people.

How does it apply to remainders?

When integers are divided by \(d\) the possible remainders are \(0,1,\dots,d-1\), so there are \(d\) holes. Choosing \(d+1\) integers forces two to share a remainder — for \(d=5\), any \(6\) integers include two with the same remainder.

When do I round up rather than down?

Always round up. The guaranteed load is \(\left\lceil \tfrac{n}{m}\right\rceil\), the ceiling of \(n/m\). Even the most even split leaves some box holding the rounded-up value, so \(\tfrac{20}{6}=3.33\ldots\) rounds up to a guaranteed \(4\).