Pigeonhole Principle
Every question with a fully worked solution.
- Pigeonhole Principle - Video - Pigeonhole Principle Proof Watch
Theory
The pigeonhole principle: if more than \(k\) items are placed in \(k\) pigeonholes, at least one pigeonhole holds two or more. This Year 11 Mathematics Extension 1 page covers the general form (at least \(\dfrac{n}{k}\), rounded up), how many items must be chosen to guarantee a match, how to choose and count the pigeonholes, and how to set out a pigeonhole proof.
The pigeonhole principle: if \(n\) pigeons sit in \(k\) pigeonholes and \(n\gt k\), then at least one pigeonhole contains at least \(2\) pigeons. The "pigeons" are the items being placed and the "pigeonholes" are the categories they go into: colours, suits, days of the year, months, tables, possible values.
General form. If \(n\) pigeons sit in \(k\) pigeonholes, at least one pigeonhole contains at least \(\dfrac{n}{k}\) pigeons. The number of pigeons in a pigeonhole is a whole number, so if \(\dfrac{n}{k}\) is not a whole number, round it up: with \(\dfrac{n}{k}=4\dfrac{1}{5}\) some pigeonhole has at least \(5\).
Why it works. If every pigeonhole held fewer than \(\dfrac{n}{k}\) pigeons, the \(k\) pigeonholes together would hold fewer than \(k\times\dfrac{n}{k}=n\) pigeons, which is impossible.
Guaranteeing a match. To find how many items must be chosen to be sure of a match, think of the worst case: the items are spread as evenly as possible. With \(k\) pigeonholes, \(k\) items can all be different, so \(k+1\) items guarantee two in the same pigeonhole. To guarantee \(r\) in one pigeonhole, the worst case is \(r-1\) in every pigeonhole, so \(k(r-1)+1\) items are needed.
The principle only says that some pigeonhole has at least that many; it does not say which one. The skill is choosing the pigeonholes: sometimes they must be counted (with the multiplication principle) or built to suit the question, such as pairs of numbers with the same sum.
\(n\) pigeons in \(k\) pigeonholes:
Number of items needed to be sure of at least \(r\) in one of \(k\) pigeonholes:
| Pigeons \(n\) | Pigeonholes \(k\) | \(\dfrac{n}{k}\) | At least one has at least |
|---|---|---|---|
| \(25\) | \(4\) | \(6\dfrac{1}{4}\) | \(7\) |
| \(30\) | \(6\) | \(5\) | \(5\) |
| \(100\) | \(7\) | \(14\dfrac{2}{7}\) | \(15\) |
How to use the pigeonhole principle
- Identify the pigeons (the items) and the pigeonholes (the categories). Count the pigeonholes \(k\); this may need the multiplication principle.
- "At least how many share?" Divide: \(\dfrac{n}{k}\). If it is not a whole number, round up. State "\(\therefore\) at least \(\dots\)".
- "How many to be sure?" Picture the worst case: \(r-1\) items in every pigeonhole, then add one: \(k(r-1)+1\).
- For a proof, describe the pigeonholes clearly (list them if they are built, e.g. pairs), state how many pigeons and pigeonholes there are, and conclude "by the pigeonhole principle, two (or more) are in the same pigeonhole, so \(\dots\)".
The \(6\) days are the pigeonholes and the \(80\) tests are the pigeons. \(n=80\) and \(k=6\).
| \(\dfrac{n}{k}\) | \(=\) | \(\dfrac{80}{6}\) |
| \(\) | \(=\) | \(13\dfrac{1}{3}\) |
Round up: \(\therefore\) on at least one day she marks at least \(14\) tests.
Check: if every day had at most \(13\), there would be at most \(6\times13=78\lt80\) tests.
(i) two marbles of the same colour?
(ii) five marbles of the same colour?
The \(5\) colours are the pigeonholes.
(i) The first \(5\) marbles could all be different colours. The next marble must match one of them.
| \(\text{Number}\) | \(=\) | \(5+1\) |
| \(\) | \(=\) | \(6\) |
(ii) Worst case: \(4\) marbles of every colour, which is \(5\times4=20\) marbles with no colour five times. One more marble makes five of one colour.
| \(\text{Number}\) | \(=\) | \(5\times4+1\) |
| \(\) | \(=\) | \(21\) |
\(\therefore\) (i) \(6\) marbles (ii) \(21\) marbles
The pigeonholes are the possible pairs of initials. By the multiplication principle:
| \(k\) | \(=\) | \(26\times26\) |
| \(\) | \(=\) | \(676\) |
The \(1400\) students are the pigeons:
| \(\dfrac{n}{k}\) | \(=\) | \(\dfrac{1400}{676}\) |
| \(\) | \(\approx\) | \(2.07\) |
Round up: \(\therefore\) at least \(3\) students have the same pair of initials.
(ii) Show that the result is not true for five numbers.
(i) Group the numbers \(1\) to \(10\) into pairs that add to \(11\). These are the pigeonholes:
\(\{1,10\},\ \{2,9\},\ \{3,8\},\ \{4,7\},\ \{5,6\}\)
Every number from \(1\) to \(10\) is in exactly one pair, so there are \(5\) pigeonholes. The \(6\) chosen numbers are the pigeons. Since \(6\gt5\), by the pigeonhole principle two of the chosen numbers are in the same pair.
\(\therefore\) those two numbers add to \(11\).
(ii) Choose one number from each pair, e.g. \(1,2,3,4,5\). No two of these add to \(11\) (the largest sum is \(4+5=9\)), so five numbers are not enough.
Common pitfalls
Frequently asked questions
What is the pigeonhole principle?
If more items are placed into pigeonholes than there are pigeonholes, at least one pigeonhole must hold two or more items. In general, \(n\) items in \(k\) pigeonholes put at least \(\dfrac{n}{k}\) items, rounded up, in some pigeonhole.
How do you work out the least number of people who must share something?
Divide the number of people by the number of categories and round up. For example, \(100\) people and \(7\) days of the week give \(\dfrac{100}{7}=14\dfrac{2}{7}\), so at least \(15\) people were born on the same day of the week.
How many items do you need to be sure of a matching pair?
One more than the number of categories. With \(k\) categories, \(k\) items could all be different, so \(k+1\) items guarantee a pair. To be sure of \(r\) the same, you need \(k(r-1)+1\).
Why does the pigeonhole principle work?
If every pigeonhole held fewer than \(\dfrac{n}{k}\) items, the total would be less than \(k\times\dfrac{n}{k}=n\), which contradicts having \(n\) items.
How do you write a pigeonhole principle proof?
Say what the pigeonholes are (list them if you built them, such as pairs of numbers), say how many pigeons and pigeonholes there are, then conclude: "by the pigeonhole principle, two are in the same pigeonhole, so \(\dots\)".