PHP Sols
PHP Sols
Solutions
“If you shove 8 pigeons into 7 holes, then there is a hole with at least 2 pigeons.”
Warm-up
1. Ten people are swimming in the lake. Prove that at least two of them were
born on the same day of the week.
The people are the pigeons and the days of the week are the pigeonholes. There are only
7 days in a week and 10 people, therefore at least two of them were born on the same day
of the week.
2. Seventeen children are in an elevator. Prove that at least three of them were
born on the same day of the week.
If no more than two children were born on each day of the week, then there could be at
most 14 children. Since there are 17 children, there must be a day of the week on which
at least 3 of them were born.
3. Briar the cat likes to wear socks on all four of its feet. Briar’s sock drawer
is filled with yellow, cyan, and pink socks. Every morning Briar pulls socks
out of the drawer one at a time until four matching socks are found. What is
the largest number of socks Briar may pull from the drawer before finding a
complete set?
Think about the worst Briar could do: if the cat pulls 3 socks of each color (for a total
of 9 socks) then it still does not have enough to make a matching set, but if a 10th sock
is chosen then it must complete one set of matching socks. Therefore 9 socks is the most
Briar can pull without getting a match.
4. Sarah writes down random positive integers when she gets bored. Prove that
if Sarah writes 1001 numbers, then there must be at least 2 with the same
last three digits.
Since there are 10 digits, there are only 103 = 1000 possibilities for the last three digits of
a positive integer. If Sarah writes down 1001 numbers, then by the pigeonhole principle
she must have at least 2 numbers with the same last three digits.
Workout
1. Simone is coloring in the squares on a (really really big) sheet of graph paper
with red and green pencils. Her goal is to color all the squares on the page
so that there is no rectangle all of whose corners are the same color (Simone
calls such rectangles unichrome and she hates them.) For example, the picture
below shows a successful start on the left and a failure on the right. This is a
failure since the 4 boxes in the corner of this rectangle are all red.
(a) Prove that it is impossible for Simone to successfully color the entire sheet
of graph paper without any unichrome rectangles.
Consider a 3 × 9 portion of the grid. Each column has 3 boxes and thus one of the
colors must appear twice by the pigeon hole principle. There are only 23 = 8 ways
to color 3 boxes either red or green. Since there are 9 columns in this grid, one of
the colorings must appear twice. Whichever color repeats in this column gives us a
unichrome rectangle. See the picture below.
(b) What is the largest 3×n box Simone can color without making a unichrome
rectangle?
Notice that in the picture above there is only one column that repeats, but there are
actually several unichrome rectangles. The problem comes from the columns that
are all one color (unichrome columns.) Suppose we use all the other column colorings
exactly once.
If we try to add one more column, then either it will repeat one already colored or
it will be a unichrome column. Repeating a column gives a unichrome rectangle and
a unichrome column (say its red) will make a unichrome rectangle with any column
that repeats red. What is the biggest 3 × n box we can color without a unichrome
rectangle if we include a unichrome column?
(c) Prove that using 3 colors instead of 2 will not help Simone avoid the
dreaded unichrome rectangles.
Using the same idea as before, consider a 4 × 82 portion of the grid (remember, her
paper is really really big.) Then by the pigeonhole principle each column must have
a repeated color and there are only 34 = 81 different column colorings. Hence some
column coloring will be repeated and thus we will have inevitably have a unichrome
rectangle.
Can you generalize this argument to show that no matter how many colors Simone
uses, she will never be able to realize her unichrome-free dreams?
2. Devon picks 7 numbers from {1, 2, 3, . . . , 10, 11}. Prove he has a pair that add
up to 12.
3. Tammy notices that whenever she selects 7 whole numbers, there is always a
triple a, b, c of numbers in her collection that all differ from each other by a
multiple of 3. Tammy conjectures this will always be the case. Prove Tammy’s
conjecture.
There are only 3 possible remainders when dividing a whole number by 3, namely 0, 1,
or 2. No matter which 7 numbers Tammy chooses, they each have one of these 3 remain-
ders, hence by the pigeonhole principle there must be at least 3 numbers with the same
remainder. If two numbers have the same remainder when divided by 3, their difference
is divisible by 3.
4. The Queen has a garden in the shape of an equilateral triangle with each side
measuring 2 kilometers. The 5 royal children like hide in the garden as far
away from each other as possible. Prove that no matter how hard they try
to get away from each other, there are still always two royal siblings within 1
kilometer of each other.
The Queen’s garden can be split into 4 smaller equilateral triangles each with side length
1 kilometer. Each of the 5 children must be in one of these smaller triangles, hence by
the pigeonhole principle there must be a small triangle with 2 royal children. But any
two children in the same small triangle are within 1 kilometer of each other.
Challenge
1. Given any two people, they have either high fived each other at least once in
their lives or they have not. Prove that if there are 6 people in a library, then
there are 3 of them who have either all high fived one another or who have
never high fived one another.
Suppose Esteban is one of the library patrons. He labels each of the other 5 people with
an H if they have high fived and with an N if they have never high fived. By the pigeon-
hole principle, there are at least 3 people with one of the 2 labels. Suppose without loss
of generality that they are labeled H. If any of those 3 people have high fived one another,
then together with Estaban they form a group of 3 mutual high fivers. If not, then the 3
of them form a group who have never high fived one another. Either way we get a group
of 3 as we desired.
Any plane passing through the center of a sphere intersects the sphere in a circle dividing
the sphere into two equal pieces. These are called great circles. Given any two points
on a sphere, there is a great circle passing through both of them (since there is a plane
passing through these two points and the center of the sphere.)
If we have 5 points on a sphere, pick 2 of them and consider a great circle passing through
them. This circle divides the sphere into two halves. Of the remaining 3 points, there
must be one half of the sphere containing 2 of them (or they could be on the great cir-
cle.) Either way, that half of the sphere together with the great circle forms a closed cap
containing 4 of the points.
3. Suppose that 101 positive integers are arranged in a circle. The sum of all the
numbers is 300. Prove that you can always choose a consecutive sequence of
numbers which sum to 200.
Pick one of the numbers on the circle and call it a1 . Label the numbers clockwise as
a1 , a2 , . . . , a101 . Now consider the sums
sk = a1 + a2 + . . . + ak ,
for 1 ≤ k ≤ 101. Then sk is an increasing sequence of 101 different integers (why are they
all different?) between 1 and 300. Since there are only 100 possibilities for the last two
digits of these numbers, there must be some si and si+j with the same last two digits.
Therefore si+j − si is positive, divisible by 100, and strictly less than 300. This only leaves
two possibilities: si+j − si = 100 or 200. On the other hand, note that this difference is
a sum of consecutive numbers on the circle,
If the difference is 200 then we are done. If the difference is 100, then the sum of the
remaining numbers on the circle must be 200 (since in total they all sum to 300.)