0% found this document useful (0 votes)
59 views9 pages

Lesson 3

This document discusses the pigeonhole principle and provides examples of how to apply it to solve problems involving sums of numbers, remainders when dividing, and grouping items. Several word problems are presented along with step-by-step solutions using the pigeonhole principle.

Uploaded by

Faith Nio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views9 pages

Lesson 3

This document discusses the pigeonhole principle and provides examples of how to apply it to solve problems involving sums of numbers, remainders when dividing, and grouping items. Several word problems are presented along with step-by-step solutions using the pigeonhole principle.

Uploaded by

Faith Nio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

LESSON 3: THE PIGEONHOLE PRINCIPLE

In mathematics, the pigeonhole principle or Dirichlet’s box principle states that if


n items are put into m pigeonholes with n > m, then at least one pigeonhole must
contain more than one item.
In the picture below there are 9 pigeonholes and 10 pigeons. At least one pigeon-
hole contains more than one pigeon.

1. Prove that among any three integers there are two whose sum is even.

Solution: The idea for this problem, as for most of the problems, is to choose some
boxes (pigeonholes) and some items to be placed in the boxes such that at least
one of the boxes will contain more than one item. In this case, the first box is the
set of all even numbers, and the second box is the set of all the odd numbers. As
any integer is either odd or even, and we have 3 integers in the problem, (at least)
two of them will be in the same pigeonhole. For this reason, they will have the
same parity and thus their sum will be even.

2. There are 22 pupils in a class. Prove that one can choose four of them that are
born on the same day of the week.

Solution: Remember from the lecture that whenever we had n items (pigeons) and
m boxes (pigeonholes), we divided n by m, obtaining a quotient and a remainder.
That is,
n = m × k + r, 0 ≤ r ≤ m − 1.
If r 6= 0, there is at least one box with at least k + 1 pigeons in it. We proved
this by contradiction. Supposing there was a way of placing the pigeons such that
there were at most k pigeons in each pigeonhole, the maximum number of the
pigeons in the pigeonholes would have been m × k. Since n > m × k, not all the
birds could have been housed in the pigeonhole, which contradicts our supposition.

1
In this problem, the pigeonholes are the days of the week and the pigeons are the
children in the class. Since we have 22 pigeons, I mean, children, and only 7 pi-
geonholes, there will be at least 4 belonging to the same box, that is, born on the
same day of the week. (22 = 7 × 3 + 1.)

3. In a soccer tournament each of the ten teams plays against all the other teams
exactly once. Prove that at every moment of the competition there are two teams
having played the same number of matches.

Solution: Assume by contradiction that there exists a moment during the compe-
tition when any two teams have played a different number of matches. As there
are 10 teams, each can play 0, 1, 2, ..., 9 matches during the tournament. Note that
if a team has played 0 matches until that moment, it didn’t played with any team
and if it had played 9 matches, then until that moment it had played with all the
other teams.
The number of matches a team could have played played until a specific moment
will represent our boxes and the teams will represent the pigeons. Since we assumed
each team had played a different number of matches, because there are 10 teams
and 10 boxes, each team will be placed in a different box. So there will be a team
which has played 0 matches at that moment, a team which has played 1 match, ...,
and a team which has played 9 matches. But here we get a contradiction, because,
if a team has played 9 matches, then it has played with all the other teams, so there
can’t exist a team which has played no matches at all. Therefore, our supposition
was false, so at any moment of the competition there are two teams which have
played the same number of matches.

4. Five equilateral triangles of equal size can cover an equilateral triangle T (the
triangles may overlap and parts of them may also fall outside the triangle T). Prove
that the triangle T can be covered by using only four of the five triangles.

Solution: Denote the side length of the equilateral triangle T with `. We shall take
as boxes our 5 equilateral triangles and as items the following 6 points: the 3 ver-
tices of T and the 3 midpoints of the sides of T. As the 5 triangles entirely cover T,
they also cover the 6 points mentioned, so, by Dirichlet’s principle, at least one of
the 5 triangles covers (at least) two of the points. Hence, the whole segment formed
by the points is contained in that triangle, so the length of its side is larger then the
`
length of the segment. As the segment’s length is (or `), the side of each of the
2
`
equilateral triangles that cover T is larger than . It is easy to see that T can be
2
`
completely covered with 4 equilateral triangles of side length . Then it can also be
2

2
`
covered with four of the five equilateral triangles given (their side is longer than ).
2
5. Let S be a subset of the set {1, 2, 3, ..., 2n}. Assume that the equation x + y =
2n + 1 does not have solutions in S (i.e., if x, y ∈ S, then x + y 6= 2n + 1). What
is the largest number of elements that S can have?

Solution: As the set S must not contain two numbers with sum 2n + 1, we shall
look first at the pairs of the numbers from S whose sum is 2n + 1. These are

(1, 2n), (2, 2n − 1), . . . , (n, n + 1).


These pairs which will represent the boxes. Also, S cannot contain both numbers
from a pair, because the sum of these numbers is 2n + 1. So S can contain at
most one of the elements of a pair. Since there are n pairs, S will have at most n
elements. On the other hand, taking in S the first element of each pair gives an
example of a set S with n elements that fulfills the conditions from the statement
(S = {1, 2, ..., n}). The fact that there are such sets S with n elements but not
with more than that, shows that the desired maximum is n.

6. Let n ≥ 1 be a positive integer. If a1 , ..., an are positive integers, prove that


it is possible to paint some of these numbers green in such a way that the sum of
green numbers is divisible by n. [Engel]

Solution: Whenever you have a combinatorics problem that asks you to prove that
at least one number from a set of numbers is divisible by n, you should think of
considering as pigeonholes the possible remainders of the division by n. That is,
the first box represents all the integers that are divisible by n, the second one all
the integers that give remainder 1 when divided with n, and so on until the last
box, which represents all the integers that give remainder n − 1 when divided with
n. When we say that a number belongs to the box i, we mean that the number
gives remainder i − 1 when divided with n.

For this reason, we need to choose n sums of some numbers from the set
{a1 , a2 , . . . , an } such that the difference of any two of them is still a sum of some
ai ’s. So we are going to choose the following sums: A1 = a1 , A2 = a1 + a2 ,
A3 = a1 + a2 + a3 , . . . , An = a1 + a2 + · · · + an . Since there are n sums and there
are exactly n possible remainders when dividing by n, we have 2 cases:

• Each Ai gives a different remainder when divided by n. This means there


is an Ai that gives remainder 0, so it is divisible by n, hence our problem is
solved. (We paint the numbers a1 , a2 , ... ai green.)

3
• There are two Ai ’s that give the same remainder when divided by n. Suppose
we have Ai and Aj that are equal modulo n. Suppose i < j. We have that
Aj −Ai is divisible by n. So a1 +a2 +. . .+ai +ai+1 +. . .+aj −(a1 +a2 +. . .+ai )
is divisible by n, which means that ai+1 + ai+2 + . . . + aj is divisible by n. So
we obtained some numbers from the initial set of ai ’s with the sum divisible
by n. (In this case we paint green the numbers ai+1 , ai+2 , ... , aj .)
7. Prove that among any six people one can choose either three such that each two
of them know each other, or three people such that in this group of three nobody
knows anybody.[Kürschak Competition 1947, Putnam 1953]

Solution: Denote the six persons by A, B, C, D, E and F . Person A has a re-


lationship with each of the remaining people, it can either know one or not know
one. Because there are five persons left and two kinds of relationships, there will
be at least three people with whom he has the same relationship. Consider the
case in which there are 3 people A knows. We look at the relationships between
(the) 3 acquaintances of A. If two of them know each other, together with A they
form a group in which everybody knows everybody, and we are done. If in this
group nobody knows anybody else, again, we are done. The case where A has
three people he does not know is similar: if in this group two people do not know
each other, together with A they form a group where nobody knows anybody else,
and we are done. If we can not find two such persons then this means that in that
group everybody knows everybody and, again, we are done.

8. On a blackboard there are 11 positive integers. Show that one can choose some
(maybe all) of these numbers and place ”+” and ” − ” in between, such that the
result is divisible by 2011.

Solution 1: Denote by S the set of the 11 integers. The first thing to observe is
that 2011 is smaller than 211 = 2048, which is the total number of subsets of S.
We will assign to each subset of S the sum of its elements. As there are 2048 sums
of the subsets and only 2011 possible remainders at the division with 2011, there
will be at least two subsets whose sums will be equal modulo 2011. Thus, their
difference will be divisible by 2011. But their difference is exactly what we need,
since it consists of some of the initial 11 integers with a + or a − between them.
Solution 2: Consider the following 211 = 2048 numbers: ±a1 ± a2 ± ... ± a11 .
Since there are more numbers then possible remainders at the division by 2011, at
least two of these numbers will give the same remainder. Then their difference is
a multiple of 2011. Their difference will be a sum of the numbers ai having coeffi-
cients −2 or 0 or 2. Since 2011 and 2 are relatively prime, half of the number we
obtained is still a multiple of 2011 and it is also a sum of some of the 11 numbers

4
with + or − in between.

9. Let S be a set of 27 distinct positive odd integers less than 100. Prove that
there exist two elements in S with sum 102.

Solution: Consider the following pairs: (3, 99), (5, 97), . . . , (49, 53). Observe that
the sum of the numbers in all these pairs is 102. We have 24 such pairs, and
the numbers 1 and 51 are not included in any of these pairs. Even if 1 and 51
are both among the 27 chosen numbers, we still need to choose at least 25 of the
48 numbers appearing in the 24 pairs. By the Pigeonhole Principle, at least one
of these pairs must be included in S, so there are two elements in S that sum to 102.

10. Among the first 2012 positive integers, 1006+n integers (n ≤ 1006) are colored
green. Prove that there are 2n green integers whose sum is divisible by 2013.

Solution: Consider the following pairs: (1, 2012), (2, 2011), . . . , (1006, 1007). The
sum of the numbers in each pair is 2013. Because we have 1006 pairs and 1006 + n
green numbers, by the Pigeonhole principle, at least n pairs will consist only of
green numbers. Therefore, the total sum of the numbers in these n pairs is 2013×n
and we get 2n green integers with their sum divisible by 2013.

11. There are 298 students at the university. Prove that 100 of these students can
be painted green such that the difference of the ID numbers of every two green
students is divisible by 3.

Solution: We shall take the ID numbers of the students modulo 3, i.e. we shall
only look at their remainder when divided by 3. Since we have 298 ID numbers
and 3 possible remainders, by Dirichlet’s principle, at least 100 of the numbers will
give the same remainder when divided by 3 (298 = 3 × 99 + 1). Then the difference
of any two of them is a multiple of 3. We choose 100 of the students possessing
these ID numbers to be painted green.

12. Does there exist a positive integer n such that the decimal representation of
3n ends in ”00001”?

Solution 1: Yes, actually there are infinitely many such numbers. Let us consider
the following numbers: 31 , 32 , . . . , 3m , with m > 105 . Because we have m ≥ 105 + 1
numbers and only 105 possible remainders upon division by 105 , at least two of the
numbers will give the same remainder. Suppose these numbers are 3i and 3j , with
i < j. Then 105 | 3j − 3i , which means that 105 | 3i (3j−i − 1). Since (10, 3) = 1,
we have 105 | 3j−i − 1, so 3j−i − 1 ends in 00000. Then 3j−i ends in 00001.

5
Solution 2: If we denote by ϕ Euler’s totient function, we have 3ϕ(100000) ≡ 1 (mod
100000), which means that 3ϕ(100000) ends in 00001.

13. Does there exist a positive integer n such that 3n has 2011 consecutive zeroes
in its decimal representation?

Solution: The same argument as for the previous problem, only with 102012 in-
stead of 105 allows us to prove that there are (infinitely many) powers of 3 ending
{z }1, that is, powers of 3 containing 2011 consecutive zeros.
in |000...00
2011 zeros

14. Five points are chosen in a 3 × 4 rectangle. Prove that there are two of them
5
whose distance is at most .
2
Solution: Let us divide the rectangle into four identical parts by two lines, a hor-
izontal one and a vertical one passing through the midpoints of the sides. Since
3
we have four small rectangles 2 × and five points, by the Pigeonhole principle,
2
two of the points will belong to the same rectangle. However, the largest distance
3 5
that can be attained in a 2 × rectangle is the size of its diagonal, which is , by
2 2
5
Pythagora’s Theorem, so we have found two points at distance at most .
2
in a 3 × 4 rectangle. Prove that there are two of them
15. Six points are chosen √
whose distance is at most 5. [Engel]

Solution: Let’s observe that 5 is the size of the diagonal of a 2 × 1 rectangle. We
shall call these rectangles dominoes. If we have two points in the same domino, √
the distance between them will be less than the size of its diagonal, which is 5.
Therefore, no matter how we tile the 3 × 4 rectangle with dominoes, we have to
have exactly one point in each domino (since there are six points and six domi-
noes), otherwise we are done. Let’s denote the columns of the 3 × 4 rectangle by
A, B, C, D (from left to right) and its rows by 1, 2, 3 (from top to bottom). By
placing a domino in B2 and C2, we must have exactly one of the six points in one
of the two unit squares. Without loss of generality suppose the point is in C2.
By looking at the domino placed on D2 and C2, we can see that no point can be
placed in D2, since otherwise we shall have two points at distance less or equal to

5. By looking at the domino placed on D2 and D1, since there is no point in D2
and there has to be a point in this domino, there will be a point in D1. By the
same argument, there will be a point in B3.√Now, the circles centered at any point
of B3 and D1, respectively, and of radius 5 completely cover the square C2, so
the point from C2 will be at a smaller distance to either the point from D1 or the

6

point from B3 than 5.

16. Let S be any subset of ten natural numbers between 1 and 100 (inclusive).
Prove that there are two disjoint non-empty subsets of S whose elements add to
the same amount. (IMO 1972)

Solution: The maximum sum that can be obtained from adding ten or less numbers
between 1 and 100 is 100 + 99 + 98 + 97 + 96 + 95 + 94 + 93 + 92 + 91 = 955 and the
minimum sum is 1. All the other sums will be in between these two. The number
of sums we can obtain from the 10 elements of S is 210 − 1 (one for each non-empty
subset), which is obviously larger than 955. Therefore, by the Pigeonhole principle,
(at least) two of the subsets will have the same sum of their elements. If they share
some common elements, we can just remove them from both sets, and we are left
with two disjoint subsets of S whose elements add up to the same value.

Practice problems

1. A drawer in a darkened room contains 100 red socks, 80 green socks, 60 blue
socks and 40 black socks. A youngster selects socks one at the time from the drawer
but is unable to see the color of the socks drawn. What is the smallest number
of socks that must be selected to guarantee that the selection contains at least 10
pairs? (A pair of socks is two socks of the same color. No sock may be counted in
more than one pair.) [AHSME 1986]

(A) 21 (B) 23 (C) 24 (D) 30 (E) 50

Solution: We prove that the desired minimum is 23. Consider the following pi-
geonholes: the box of the red socks, the box of the green socks, the box of the blue
socks and the box of the black socks. Now, you can pair up the socks in each box;
in the end you will have at most one unpaired sock in each box. Consider 23 socks.
Suppose at most 18 of them contribute to making pairs (at most 9 pairs). Then
you would have 5 unpaired socks. You only have 4 boxes, hence one box should
contain at least two unpaired socks. Pair them up and you will have at most 3
unpaired socks, hence at least 10 complete pairs. Therefore 23 socks are enough.
Next we prove that 22 or less socks are not necessarily enough. Consider 9 com-
plete pairs and 4 other socks, one of each color. We can not make the 10-th pair.
Examples for less than 22 socks are obtained by removing socks from the distribu-
tion given for 22.

2. Consider a set A with 10 elements. Prove that the intersection of any 513
subsets of A is empty.

7
Solution 1: Consider the 210 = 1024 subsets of A and pair them up into 512 pairs
(X, A\X), with X ⊆ A. Whenever your take 513 subsets of A, by Dirichlet’s princi-
ple, you will have to choose at least 2 sets from the same pair. But X∩(A \ X) = ∅,
so the whole intersection of the 513 sets will be empty. Therefore, no matter how
we choose 513 subsets of A, they will have an empty intersection.
Solution 2: Suppose the intersection is not empty. Then it contains at least
one element a. This means that a is an element of 513 of the subsets of A. But
a is an element of only 29 = 512 of the subsets of A, which leads to a contradiction.

3. In every square of a 7 × 7 board there is a bug. At one moment all the bugs
crawl into a neighboring square, that is into a square having a common side with
the initial square of the bug. Prove that at least one square will be free of bugs.

Solution: Let us color the board as a chessboard, with black and white alternately,
such that the upper left corner is black. As the board is 7 by 7, we shall have
25 black squares and 24 white squares. Whenever a bug crawls into a neighbor-
ing square (it cannot go diagonally), it switches the color of the square it moves
into. When all the bugs move, they move from 25 black squares into only 24 white
squares, so two of them will move on the same square. Therefore, at least one of
the squares will remain free.

4. Prove that 2011 has a multiple whose decimal representation contains only the
digit 1. [Engel]

Solution: Let us take the following numbers: 1, 11, 111, . . . , 111


| {z. . . 11}. Each of
2012
them gives a remainder when divided by 2011, and since there are 2012 numbers,
two of them give the same remainder. If two of these numbers are congruent
modulo 2011, then their difference is divisible by 2011. Let us say these num-
bers are a = 11 . . . 1} and b = 11
| {z . . . 1}, with i < j. Since 2011 | b − a, we get
| {z
i j
2011 | 11 . . . 1} 00
| {z . . . 0}. But (2011, 10) = 1, so 2011 | 11
| {z . . . 1}. Therefore, we found a
| {z
j−i i j−i
multiple of 2011 written only with the digit 1.

5. Prove that among any 100 integers one can select 15 integers such that the
difference between any two selected numbers is divisible by 7.

Solution: We shall look again at the remainder upon division by 7. Since there are
7 possible remainders and 100 numbers, by Dirichlet’s principle we have at least

8
15 numbers which give the same remainder, because 100 = 7 × 14 + 2. Therefore,
the difference of any two of these 15 numbers will be divisible by 7.

6. Given any 5 points on a sphere, show that some four of them must lie on a
closed hemisphere.

Solution: Let us take two of the points which are not collinear with the center of
the sphere (since there are 5 points, obviously there are not all collinear with the
center). These two points together with the center of the sphere form a plane that
cuts the sphere into two hemispheres. Since we are left with 3 points, two of them
will belong to the same hemisphere. Hence, the first two chosen points and the
last two points belong to the same hemisphere.

7. A 4 × 4 square is completely covered with 13 overlapping 2 × 1 dominoes. Prove


that one can remove one of them such that the square remains completely covered.

Solution: Suppose that each domino was essential, i.e. removing it would leave
an uncovered unit square. This means that for each domino there is a unit square
only covered by that domino. These simply covered unit squares are distinct for
different dominoes, hence there are at least 13 unit squares only covered by a single
domino. But the 13 dominoes cover together 26 unit squares, so the remaining 3
unit squares are covered in total 13 times. By the Pigeonhole Principle, one of
these unit squares will be covered ar least 5 times. As there are only 4 distinct
ways (at most) to place a domino in order to cover a given unit square, 2 of these
5 dominoes must be in the same position. But then be could remove one of them,
which contradicts our initial assumption.

You might also like