Method line M4 · When and why do we use it?

The Pigeonhole Principle

In the Chinese book: 抽屉原理

More objects than boxes means a box holds two. The art is building boxes.

📖 Chapter 4 of 《解题方法与策略》

One idea, one picturePick numbers from 1 to 20 and avoid “one is a multiple of another”. When you are stuck, try the four ways of building boxes. Which one makes any two numbers in the same box certain to be multiples of each other?

Loading figure…

In one sentence

Put objects into boxes, and some box holds at least two. More generally, put objects into boxes, and some box holds at least .

The proof takes one line (by contradiction): if each box held at most , there would be at most objects, not enough room. The real difficulty is that the problem never hands you the boxes. You have to partition the objects into classes so that “two in the same class” is exactly the property the problem wants. That is precisely the partition of a set from Vol. 1.

Example: any 11 numbers chosen from 1, 2, …, 20 include one that is a multiple of another

Step 1 / 4
Loading figure…
  1. First, try to avoid it

    Take : twice any of them is more than , so none is a multiple of another. numbers can avoid it.

Predict first

What is the largest number of numbers you can choose from so that none of them is a multiple of another?

Choose an answer first; then you can see the result.

Stop 1 · Families of subsets (Vol. 1)

Boxes do not have to hold numbers; they can hold subsets.

Example: among any 2ⁿ⁻¹ + 1 distinct subsets of {1, 2, …, n}, two are disjoint

Step 1 / 4
  1. The objects are subsets

    An -element set has subsets, and the problem takes of them: more than half.

Stop 2 · Periodic sequences (Vol. 5)

Infinitely many terms but only finitely many “states”: the pigeonhole principle forces a state to repeat, and the recurrence turns the repeat into a period.

Example: the remainders of the Fibonacci sequence mod m form a periodic sequence

Step 1 / 4
  1. States

    is determined by the two terms before it, so take the remainders of two neighboring terms, , as one state.

Stop 3 · Existence problems (Vol. 5)

“Some run of consecutive terms must add up to a multiple of ”: the boxes hold not the numbers themselves but their prefix sums.

One problem, several solutions

Given any integers , prove that some run of consecutive terms (at least one term) has a sum that is a multiple of .

Prefix sums into remainder boxes

Let (). If some , we are done.

Otherwise the prefix sums fall into the nonzero remainders, so for some , and then is a multiple of .

Example: (). The prefix sums leave remainders ; , so .

CostOne use of the pigeonhole principle, clean and quick.

Trying to construct it directly

For specific numbers you can find it by trial, but for general numbers no formula tells you which run it is.

That is the value of the pigeonhole principle: it proves the run exists without having to find it.

CostYou cannot say which run to take, only try them one by one: exactly the “existence only” proof the pigeonhole principle is good at.

Practice

Exercise 1Basic

What is the smallest number of lattice points (points whose coordinates are both integers) you must take in the plane to guarantee that the midpoint of some two of them is also a lattice point?

Exercise 2Basic

What is the smallest number of numbers you must choose from to guarantee that two of them are coprime?

Exercise 3Advanced

A family of subsets of has the property that any two of its subsets intersect. At most how many subsets can it contain?

Exercise 4Challenge

Given any distinct integers, prove that two of them have a sum or a difference that is a multiple of .

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

The boxes are built, but sharing a box proves nothing

The wrong step: Take numbers from and prove that one is a multiple of another: build boxes from “consecutive pairs” . Two of the numbers share a box, so one is a multiple of the other.
What went wrong? Think first, then open

Diagnosis and share a box, but neither is a multiple of the other. The number of boxes is right, but the link “same box conclusion” is broken. Consecutive pairs guarantee coprime numbers.

The right step: Build the boxes by odd part: , of them. Two numbers in the same box differ only by some factors of , so one is a multiple of the other.

“First check that two in the same box are the pair you want”

Exhibit

Showing “enough” but not “one fewer fails”

The wrong step: What is the smallest number of numbers that guarantees two coprime ones? numbers go into the boxes , so the answer is .
What went wrong? Think first, then open

Diagnosis The pigeonhole principle only shows that numbers are enough. To call the smallest, you must also show that are not enough.

The right step: Add an example: the even numbers are pairwise not coprime. So are not enough, are, and the answer is .

“Minimum = enough + one fewer is not enough”

Stops on this line

The same idea, used once in each of several places.

  1. Partitions of a SetVol. 1 Sets, ch. 4
  2. Families of SubsetsVol. 1 Sets, ch. 5
  3. Periodic SequencesVol. 5 Sequences and Mathematical Induction, ch. 8
  4. Existence Problems for SequencesVol. 5 Sequences and Mathematical Induction, ch. 15