Massachusetts Institute of Technology
6.042J/18.062J, Spring ’10
: Mathematics for Computer Science
Prof. Albert R. Meyer
revised April 12, 2010, 700 minutes
Solve the following problems using the pigeonhole principle. For each problem, try to identify the
, and a
assigning each pigeon to a pigeonhole.
Every MIT ID number starts with a 9 (we think). Suppose that each of the 75 students in 6.042
sums the nine digits of his or her ID number. Explain why two people must arrive at the same
The students are the pigeons, the possible sums are the pigeonholes, and we map each
student to the sum of the digits in his or her MIT ID number. Every sum is in the range from
9 + 8
0 = 9
9 + 8
9 = 81
, which means that there are 73 pigeonholes. Since there are more
pigeons than pigeonholes, there must be two pigeons in the same pigeonhole; in other words,
there must be two students with the same sum.
In every set of 100 integers, there exist two whose difference is a multiple of 37.
The pigeons are the 100 integers. The pigeonholes are the numbers 0 to 36. Map integer
. Since there are 100 pigeons and only 37 pigeonholes, two pigeons must go in the
same pigeonhole. This means
), which implies that
is a multiple
For any ﬁve points inside a unit square (not on the boundary), there are two points at distance
The pigeons are the points. The pigeonholes are the four subsquares of the unit square,
each of side length 1/2.
Pigeons are assigned to the subsquare that contains them, except that if the pigeon is on a bound-
ary, it gets assigned to the leftmost and then lowest possible subsquare that includes it (so the
is assigned to the lower left subsquare).
There are ﬁve pigeons and four pigeonholes, so more than one point must be in the same sub-
square. The diagonal of a subsquare is
, so two pigeons in the same hole are at most this
distance. But pigeons must be inside the unit square, so two pigeons cannot be at the opposite
ends of the same subsquare diagonal. So at least one of them must be inside the subsquare, so
their distance is less than the length of the diagonal.