Pigeonhole Principle
Pigeonhole Principle
shtml
(https://www.cut-the-knot.org/manifesto/index.shtml)
Pigeonhole Principle
'... I am an American citizen, Delilah. They wouldn't
dare touch a hair on my head.'
'They'd have difficulty in finding one.'
W. Somerset Maugham
Ashenden: The British Agent
(https://www.amazon.com/exec/obidos
/ISBN=0140044930/ctksoftwareincA/),
Penguin Books, 1977, p. 229
At any given time in New York there live at least two people with the same number of hairs.
(1) If m pigeons are put into m pigeonholes, there is an empty hole iff (https://www.cut-the-knot.org
/do_you_know/few_words.shtml#iff) there's a hole with more than one pigeon.
Variously known as the Dirichlet Principle, the statement admits an equivalent formulation:
(2) If n > m pigeons are put into m pigeonholes, there's a hole with more than one pigeon.
A more formal statement is also available:
(3) Let |A| denote the number of elements in a finite set A. For two finite sets A and B, there exists a 1-1
correspondence (https://www.cut-the-knot.org/do_you_know/numbers.shtml#1-1) f: A->B iff (https://www.cut-the-
knot.org/do_you_know/few_words.shtml#iff) |A| = |B|.
As may be suggested by the following photo, the formulation may be reversed:
If there are more holes than pigeons, some holes are empty:
The Pigeonhole Principle admits several useful and almost as simple extensions (https://www.cut-the-knot.org
/pigeonhole/PigeonholeExtensions.shtml). In fact, the problems below do already use some of alternative formulations.
Proof
Does the Pigeonhole Principle require a proof? It does even though it may be intuitively clear. There are many ways to
1 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
go about proving it, however proof depends on a set of selected axioms. Far as I know, no one ever chose the
Pigeonhole as an axiom. Otherwise, it would have admitted a one line proof. As it is, in the absence of axioms, we may
choose assumptions that appear simpler and/or more intuitive, or more deserving perhaps, to be viewed closer to the
first principles. The Pigeonhole (as we study it) deals with finite sets. So it is reasonable to assume as fundamental a
property that sets finite sets apart from infinite. An infinite set may be equivalent to, i.e., have as many elements as, its
proper part. A finite set may not: a finite set containns more elements than any of its proper parts. In addition, it may not
be surperfluous to recollect that the symbol |X| for the number of elements in set X may only have sense, provided we
may count any finite set, i.e., only if it is possible to determine (by counting, or by a 1-1 correspondence) a natural
number N that could be ascribed as the number of elements |X|.
With these preliminaries, assume n < m and that there exists function f from Nm = {1, ..., m} to Nn = {1, ..., n}. This
means that,for every k∈Nm, there is an element f(k)∈Nn. Moreover, assume that no element of Nn is associated with
more than one element of Nm. In other words, i,j∈Nm and i≠j imply f(i)≠f(j). This exactly means that f(Nm) is a subset of
Nn, such that m = |f(Nm)| = |Nm| ≤ |Nn| = n. But this contradicts our assumption that n<m.
Let's return for the moment to the existence of two persons in New York (City) with the same number of hairs. I ran
experiments with members of my family. My teenage son secured himself the highest marks sporting, in my estimate,
about 900 hairs per square inch. Even assuming a pathological case of a 6 feet (two-sided) fellow 50 inch across,
covered with hair head, neck, shoulders and so on down to the toes, the fellow would have somewhere in the vicinity of
7,000,000 hairs which is probably a very gross over-estimate to start with. The Hammond's World Atlas I purchased
some 15 years ago, estimates the population of the New York City between 7,500,000 and 9,000,000. The assertion
therefore follows from the pigeonhole principle.
Example 1
Let a be irrational (https://www.cut-the-knot.org/do_you_know/numbers.shtml#rational). There exist infinitely many
rational numbers r = p/q such that
|a - r| < q-2
Proof
Let Q be a whole number, a positive integer. Assume also that a>0. Consider the fractional parts (https://www.cut-the-
knot.org/do_you_know/few_words.shtml#fractionalpart) {0}, {a}, {2a}, ..., {Qa} of the first (Q + 1) multiples of a. By the
pigeonhole principle, two of these must fall into one of the Q (semiopen) intervals [0, 1/Q), [1/Q, 2/Q), ..., [(Q-1)/Q, 1),
where, as usual, [A, B) = {x: A ≤ x < B}.
We have yet to demonstrate that the number of such pairs (p, q) is infinite. Assume on the contrary that only for a finite
number of ri = pi/qi, i = 1, ..., N, |a - ri| < (qi)-2. Since none of the differences is exactly 0, there exists an integer Q such
that |a - ri| > 1/Q for all i = 1, ..., N. Apply our starting argument to this Q to produce r = p/q such that
|a - r| < 1/(Qq) ≤ 1/Q. Hence r can't be one of the ri, i = 1, ..., N. On the other hand, as before, |a - r| < q-2 contradicting
the assumption that the fractions ri, i = 1, ..., N, were all the fractions with this property.
Example 2
Consider a chess board with two of the diagonally opposite corners removed. Is it possible to cover the board with
pieces of domino whose size is exactly two board squares?
2 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
Solution
No, it's not possible. Two diagonally opposite squares on a chess board are of the same color. Therefore, when these
are removed, the number of squares of one color exceeds by 2 the number of squares of another color. However, every
piece of domino covers exactly two squares and these are of different colors. Every placement of domino pieces
establishes a 1-1 (https://www.cut-the-knot.org/do_you_know/numbers.shtml#1-1) correspondence between the set of
white squares and the set of black squares. If the two sets have different number of elements, then, by the Pigeonhole
Principle, no 1-1 correspondence between the two sets is possible.
A Follow-Up
There are several problems naturally related to this one (https://www.cut-the-knot.org/do_you_know/chessboard.shtml).
Example 3
Prove that however one selects 55 integers 1 ≤ x1 < x2 < x3 < ... < x55 ≤ 100, there will be some two that differ by 9,
some two that differ by 10, a pair that differ by 12, and a pair that differ by 13. Surprisingly, there need not be a pair of
numbers that differ by 11.
Hint
Given a run of 2n consecutive integers: a + 1, a + 2, ..., a + 2n - 1, a + 2n, there are n pairs of numbers that differ by n:
(a+1, a+n+1), (a + 2, a + n + 2), ..., (a + n, a + 2n). Therefore, by the Pigeonhole Principle, if one selects more than n
numbers from the set, two are liable to belong to the same pair that differ by n.
Example 4
Prove that if n is odd then for any permutation (https://www.cut-the-knot.org/do_you_know/permutation.shtml) p of the
set {1, 2, ..., n} the product P(p) = (1 - p(1))(2 - p(2)) ...(n - p(n)) is necessarily even.
Hint
A product of several factors is even if only one of the factor is even.
Example 5
There are several people in the room. Some are acquaintances, others are not. (Being acquainted is a symmetric non-
reflexive (https://www.cut-the-knot.org/triangle/remarkable.shtml#ref) relationship.) Show that some two people have
the same number of acquaintances.
Hint
If there are N people in the room and each has a different number of acquaintances then one is bound to have N - 1
and one 0 acquaintances. This is a contradiction.
Remark
Another application of the Pigeonhole Principle can be found on the shredding the torus (https://www.cut-the-knot.org
/do_you_know/shredding.shtml#irr) page.
Following are a few more problems. (If the solution is available the exclamation mark is clickable - guess why did I say
that.) A good half of the problems (of which some are original) were kindly suggested by William A McWorter Jr.
Warmups
1. (https://www.cut-the-knot.org/pigeonhole/ThreeColorsOnBoard.shtml)Cells of a 15×15 square grid have been
3 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
painted in red, blue and green. Prove that there are at least two rows of cells with the same number of squares of
at least one of the colors.
4 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
Problems
1. (https://www.cut-the-knot.org/pigeonhole/RooksOnChessboard.shtml)17 rooks are placed on an 8×8
chessboard. Prove that there are at least 3 rooks that do not threaten each other.
13. (https://www.cut-the-knot.org/pigeonhole/divide.shtml)If more than half of the integers from {1, 2, ..., 2n} are
selected, then some two of the selected integers have the property that one divides the other.
5 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
16. (https://www.cut-the-knot.org/pigeonhole/1997.shtml)Given any 1000 integers, some two of them differ by, or
sum to, a multiple of 1997.
18. (https://www.cut-the-knot.org/pigeonhole/aspirin.shtml)A person takes at least one aspirin a day for 30 days. If
he takes 45 aspirin altogether, in some sequence of consecutive days he takes exactly 14 aspirin.
19. (https://www.cut-the-knot.org/pigeonhole/theatre.shtml)A theater club gives 7 plays one season. Five women
in the club are each cast in 3 of the plays. Then some play has at least 3 women in its cast.
23. (https://www.cut-the-knot.org/pigeonhole/ones.shtml)If a 14×14 0-1 matrix A has 58 1's, then some 2×2
submatrix of A consists of all 1's.
6 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
for a tournament decides to play at least one game every day but, in order not to tire himself, he decides not to
play more than 12 games during any calendar week. Show that there exists a succession of consecutive days
during which the chess master will have played exactly 21 games.
47. (https://www.cut-the-knot.org/pigeonhole/MathCircle.shtml)A Math Circle has 31 participant. Their ages are all
7 of 8 8/15/2019, 1:36 PM
Pigeonhole Principle https://www.cut-the-knot.org/do_you_know/pigeon.shtml
different and sum up to 434 years. Prove that it is possible to find 20 participants whose total age is at least 280.
Reference
1. V. K. Balakrishnan, Theory and Problems of Combinatorics (https://www.amazon.com/exec/obidos
/ISBN=007003575X/ctksoftwareincA/), Schaum's Outline Series, McGraw-Hill, 1995
2. A. Engel, Problem-Solving Strategies (https://www.amazon.com/exec/obidos/ISBN=0387982191
/ctksoftwareincA/), Springer Verlag, 1998
3. D. Fomin, S. Genkin, I. Itenberg, Mathematical Circles (Russian Experience) (https://www.amazon.com
/exec/obidos/ISBN=0821804308/ctksoftwareincA/), AMS, 1996
4. R. Graham, D. Knuth, O. Patashnik, Concrete Mathematics (https://www.amazon.com/exec/obidos
/ISBN=0201558025/ctksoftwareincA/), 2nd edition, Addison-Wesley, 1994.
5. R. Honsberger, Ingenuity in Mathematics (https://www.amazon.com/exec/obidos/ISBN=0394709233
/ctksoftwareincA/), MAA, New Math Library, 1970
6. R. Honsberger, Mathematical Morsels (https://www.amazon.com/exec/obidos/ISBN=0883853035
/ctksoftwareincA/), MAA, New Math Library, 1978
7. R. Honsberger, More Mathematical Morsels (https://www.amazon.com/exec/obidos/ISBN=0883853140
/ctksoftwareincA/), MAA, New Math Library, 1991
8. M. Kac and S. M. Ulam, Mathematics and Logic (https://www.amazon.com/exec/obidos/ISBN=0486670856
/ctksoftwareincA/), Dover Publications, NY, 1992
9. K. Kuratowski and A. Mostowski, Set Theory (https://www.amazon.com/exec/obidos/ISBN=0720404703
/ctksoftwareincA/), North-Holand, Amsterdam, 1967.
10. S. Savchev, T. Andreescu, Mathematical Miniatures (https://www.amazon.com/exec/obidos/ISBN=088385645X
/ctksoftwareincA/), MAA, 2003
11. A Decade of the Berkeley Mathematical Circle, The American Experience, Volume I (https://www.amazon.com
/exec/obidos/ISBN=0821846833/ctksoftwareincA/), Z. Stankova, Tom Rike (eds), AMS/MSRI, 2008
12. D. Wells, The Penguin Book of Curious and Interesting Puzzles (https://www.amazon.com/exec/obidos
/ISBN=0140148752/ctksoftwareincA/), Penguin Books, 1992
13. P. Zeitz, The Art and Craft of Problem Solving (https://www.amazon.com/exec/obidos/ISBN=0471135712
/ctksoftwareincA/), John Wiley & Sons, 1999
65223260
8 of 8 8/15/2019, 1:36 PM