Discrete Structures
§8 Pigeonhole Principle, Contradiction, and Cases
8 min read
Sometimes a proof can guarantee that an object exists without telling us which one it is. The pigeonhole principle does this by counting: if there are too many objects for every box to hold just one, some box must hold more. Its proofs also illustrate the difference between contraposition and contradiction.
The pigeonhole principle
Suppose we put five objects into four boxes, assigning each object to exactly one box. We cannot keep all five objects separate: at least one box contains at least two objects. It does not follow that every box contains two objects, or that the shared box contains exactly two.
The pigeonhole principle, often abbreviated PHP, makes the same claim for any positive integers and :
If objects are distributed among boxes and , then at least one box contains at least two objects.
The objects are the “pigeons,” and the boxes or categories are the “holes.” Every object must be assigned to exactly one hole. The hard part of an application is often choosing holes so that sharing one gives the conclusion we want.
Proof by contrapositive
Instead of assuming there are more objects than holes, assume that every hole contains fewer than two objects. We will show that there can be at most as many objects as holes.
Let be the number of objects in hole , where . Each is a nonnegative integer, so “fewer than two” means . Counting all objects once gives
We have proved: if every hole contains at most one object, then . This is the contrapositive of the pigeonhole principle, so the original statement is true.
Seven points in a hexagon
Place seven points anywhere in a regular hexagon of side length . Show that at least two of the points are at distance at most from each other.
The points are the pigeons. To choose useful holes, divide the hexagon into six equilateral triangles by joining its centre to its vertices. Each triangle also has side length , and any two points in one of these triangles are at distance at most .
Assign each point to a triangle containing it. A point on a shared edge or at the centre must be assigned to just one of the triangles that contains it; any fixed choice works. This avoids counting a point twice.
There are seven points and only six triangles. By PHP, one triangle contains at least two assigned points. Their distance is therefore at most , as required.
This is a guarantee for every placement, not a probability statement. The non-strict bound also allows points on the boundary of the hexagon.
The generalized pigeonhole principle
If there are many more objects than holes, we can guarantee more than two in one hole. At least one hole must hold at least the average number of objects, rounded up to an integer.
For a real number , the ceiling is the smallest integer greater than or equal to . In particular,
The generalized pigeonhole principle says that distributing objects among holes, with and positive integers, guarantees at least one hole containing at least
objects. This is a lower bound, not an exact occupancy. The ordinary PHP follows whenever , because then and its ceiling is at least .
How many cards guarantee three of one suit?
Draw cards from a standard deck without jokers. What is the smallest number that guarantees at least three cards of the same suit?
The cards are the objects, and the four suits are the holes. If we draw cards, some suit appears at least times. We want
The ceiling reaches as soon as the number inside it exceeds ; that number need not reach itself. Thus
Since is an integer, nine cards suffice. They are also necessary for a guarantee: eight cards could consist of two from each suit, with no suit appearing three times. So the minimum is .
Proof by contradiction
To prove a statement by contradiction, assume its negation and derive something impossible. The assumption must then be false, so is true. In classical logic,
The impossibility need not contradict an explicitly written hypothesis. For example, deriving is already enough: no number is strictly less than itself.
Proving the generalized pigeonhole principle
Let count the objects in hole , for . Since every object is assigned to exactly one hole,
We want to prove that some hole contains at least objects. Suppose, for contradiction, that every hole contains fewer:
To compare these counts with their average , use the defining ceiling property:
If is an integer, the right-hand inequality is an equality; the left-hand inequality is still strict.
Each is an integer. Being below the integer therefore puts it at least one whole unit below:
Adding this strict inequality over all holes gives
This says , a contradiction. The assumption that every hole falls below the bound is false. Hence
Notice the change from every in the assumption to some in the conclusion. Negating “every hole is below the bound” does not say that every hole reaches the bound.
Example: the square root of two is irrational
Write for the set of integers. A rational number can be written as for integers and with . The set of rational numbers is denoted by . An irrational number is a real number that is not rational. We want to prove
Any rational number can be written in lowest terms with a positive denominator: choose and . Here is the greatest common divisor of and ; the condition says that they have no common positive divisor other than .
Suppose, for contradiction, that is rational. Choose such a reduced representation:
Squaring both sides and multiplying by gives
Thus is even. The parity result for integer squares says that an integer is even if and only if its square is even. Therefore is even, so for some integer .
Put this back into :
Now is even, so the same parity result makes even. Write for some integer .
Both and have the common divisor , contradicting . Our assumption was false, so is irrational.
Choosing lowest terms at the start is essential to this argument. Finding a common factor in an arbitrary fraction is not a contradiction; finding one in a fraction assumed to be reduced is.
Proof by cases
Sometimes different inputs need different arguments. A proof by cases splits the possibilities into conditions that cover every allowed input, then proves the desired conclusion in each case.
For cases, let be the case conditions and the conclusion. The logical equivalence is
To conclude , we must also know that at least one case applies: . The cases must be exhaustive, meaning that they cover all possibilities. They may overlap; they do not have to be mutually exclusive. Choosing useful cases is part of the proof, even when the problem does not suggest them.
Example: an integer is no larger than its square
We want to prove
Let be an arbitrary integer. Split according to its sign.
Case 1: . A square is nonnegative, so
Case 2: . Because is an integer, . Multiply by the positive number , which preserves the inequality:
Every integer satisfies either or , and both cases give the required result. This proves the claim.
The integer assumption matters exactly where we used to get . It would not be valid for an arbitrary positive real number.
0 reads