Massachusetts Institute of Technology
6.042J/18.062J, Spring ’10
: Mathematics for Computer Science
April 12
Prof. Albert R. Meyer
revised April 12, 2010, 700 minutes
Solutions
to
InClass
Problems
Week
10,
Mon.
Problem
1.
Solve the following problems using the pigeonhole principle. For each problem, try to identify the
pigeons
, the
pigeonholes
, and a
rule
assigning each pigeon to a pigeonhole.
(a)
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
sum.
Solution.
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
to
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.
(b)
In every set of 100 integers, there exist two whose difference is a multiple of 37.
Solution.
The pigeons are the 100 integers. The pigeonholes are the numbers 0 to 36. Map integer
k
to
rem(
k,
37)
. Since there are 100 pigeons and only 37 pigeonholes, two pigeons must go in the
same pigeonhole. This means
rem(
k
1
,
37)
=
rem(
k
2
,
37
,
), which implies that
k
1
−
k
2
is a multiple
of 37.
(c)
For any ﬁve points inside a unit square (not on the boundary), there are two points at distance
less
than
1
/
√
2
.
Solution.
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
point at
(1
/
2
,
1
/
2)
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
1
/
√
2
, 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.
(d)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '11
 Prof.AlbertR.Meyer
 Computer Science, Product Rule, Finite set, Mon, Inclass problems

Click to edit the document details