Section 20.5 Pigeonhole principle
Subsection 20.5.1 Regular strength version
Proof.
This principle is just the contrapositive of Statement 2 of Fact 12.2.5.
Corollary 20.5.2. Pigeonhole Principle.
If objects are placed in containers, where then at least one container must contain more than one object.
Proof.
Let be the set of objects and the set of containers, so that
Also let represent the function where means that object has been placed in container Then the Theorem 20.5.1 tells us that cannot be an injection, which means that there is at least one pair of distinct objects with
Worked Example 20.5.3. Too few seats.
Your car has five seats, but you also have five friends who need a ride home. How will everyone fit?
Solution.
Using the people who need to get home (i.e. your friends and you) as objects and car seats as containers, Pigeonhole Principle says that someone will have to sit on someone else’s lap.
Worked Example 20.5.4. Dessert logistics.
The cafeteria puts out chocolate puddings and tapioca puddings. If students each grab a bowl of pudding, what is the minimum number of tapioca puddings that have been taken?
Solution.
Since there is no injection
(Or: use students as objects, bowls of chocolate pudding as containers.)
But we can’t actually have two students take the same bowl of pudding, so at least one student must eat tapioca.
Worked Example 20.5.5. Matching pairs.
Solution.
Collect together the (unordered) pairs of numbers that add to
Notice that Thinking of the elements of as containers and elements of as objects, place object into container if We need one more object than container to ensure some container receives two objects, so the answer is
Worked Example 20.5.6. Matching modulo .
Solution.
The set of possible remainders is Computing remainder after division by defines a function Since this function cannot be an injection.
(Or: use elements of as objects, possible remainders when dividing a number by as containers.)
Subsection 20.5.2 Strong version
Recall that given a function we can define an equivalence relation on by taking to mean (see Example 18.4.5). In this way, we can regard as placing objects (elements of ) into containers (elements of ), so that object is “placed” in container when
Theorem 20.5.7. Pigeonhole Principle (strong form, formal version).
If for some then at least one of the equivalence classes of with respect to has more than elements.
Proof.
Consider the contrapositive:
if every equivalence class ofhas no more than elements, then
Since is finite and then also is finite and we can enumerate its elements. Write Each element of corresponds to an equivalence class of
In this diagram, the are representative elements of the class of elements of that are mapped to by In particular, we must have for each index
We are assuming that each class contains no more than elements; i.e. Since an equivalence relation always partitions a set into the disjoint union of its equivalence classes, we have
But is a subset of the finite set and so Combining this with the calculation above gives
Corollary 20.5.9. Pigeonhole Principle (strong form, informal version).
If objects are placed in containers, with for some then at least one container contains more than objects.
Proof idea.
Again, let be the set of objects and the set of containers, so that
Then apply the Pigeonhole Principle (strong form, formal version).
Note 20.5.10.
The Pigeonhole Principle (strong form, formal version) is a generalization of the Pigeonhole Principle (formal version). A function is an injection precisely when no two distinct elements of the domain produce the same output image, so using in the strong form gives back the original form.
Worked Example 20.5.11. Handing out coins.
Show that if thirteen coins are distributed to six children, then at least one child will receive at least three coins.
Solution.
Using coins as objects and children as containers, the given statement is just the Pigeonhole Principle (strong form, formal version) with we have objects and containers, and (Note: Since coins are discrete objects, “more than two” and “at least three” are the same thing.)
Remark 20.5.12.
It is worthwhile to think about how the strong form of the Pigeonhole Principle could be proved directly. Consider the diagram in Figure 20.5.8: the “tipping point” between and is when is surjective and each of the equivalence classes has exactly elements. When is surjective, there are equivalence classes in Since is the disjoint union of its equivalence classes under we have If we add one more element to it will have to be included in one of the equivalence classes, and that class will now have size greater than
Worked Example 20.5.13. Handing out pudding.
The cafeteria puts out chocolate, tapioca, and butterscotch puddings. How many students must grab a pudding before we can be certain that at least one of the flavours has at least half of the bowls taken?
Solution 1. Using “tipping point” thinking
Solution 2. Direct use of the Pigeonhole Principle
The “tipping point” is exactly bowls of each flavour taken, which requires students. After the student, we will definitely have bowls of one of the flavours taken.
Consider students as objects ( of them — this is the unknown to be determined) and flavours as containers ( of them). To determine the appropriate value of to use, consider that “at least half” in this problem means “at least ”, which is the same as “more than ”. So choose In that case, we need bringing us to the answer of students.