The Pigeonhole Principle

Textbook
Rosen 8e, Section 6.2
Study day
Sunday, Nov 8
Homework
Written HW 8: 1–21 odd, 33–47 odd
Progress
Notes not read 0 / 21 problems graded
Work each problem on paper before opening its solution, then mark it Got it or Review. Do the Core problems first if you're short on time.
6.2 #1 Core Pigeonhole proof

Show that in any set of six classes, each meeting regularly once a week on a particular day of the week, there must be two that meet on the same day, assuming that no classes are held on weekends.

Show solution

Pigeons: the 6 classes. Holes: the 5 weekdays (Mon–Fri). Each class meets on exactly one weekday. Since , by the pigeonhole principle two classes meet on the same day. ∎

6.2 #3 Core Worst case

A drawer contains a dozen brown socks and a dozen black socks, all unmatched. A man takes socks out at random in the dark.

a) How many socks must he take out to be sure that he has at least two socks of the same color?
b) How many socks must he take out to be sure that he has at least two black socks?

Show solution
Answer

a) 3 b) 14

a) 2 colors (holes); to guarantee 2 in one hole: socks.

b) Specific color, so think worst case: all 12 brown come out first, then 2 black: .

6.2 #5 Core Pigeonhole count

Undergraduate students at a college belong to one of four groups depending on the year in which they are expected to graduate. Each student must choose one of 21 different majors. How many students are needed to assure that there are two students expected to graduate in the same year who have the same major?

Show solution
Answer

85

Holes: (graduation year, major) pairs: . To force two students into the same hole you need .

6.2 #7 Core Pigeonhole proof

Show that among any group of five (not necessarily consecutive) integers, there are two with the same remainder when divided by 4.

Show solution

Pigeons: the 5 integers. Holes: the possible remainders mod 4: , which is 4 holes. Each integer has exactly one remainder. Since , two of the integers have the same remainder when divided by 4. ∎

6.2 #9 Core Pigeonhole proof

Let be a positive integer. Show that in any set of consecutive integers there is exactly one divisible by .

Show solution

Let the integers be .

Their remainders mod are all different: if with , then . But , which is impossible.

So the integers have distinct remainders, drawn from the possible values . Hence every remainder occurs exactly once. In particular remainder occurs exactly once: exactly one of the integers is divisible by . ∎

6.2 #11 Core Generalized pigeonhole

What is the minimum number of students, each of whom comes from one of the 50 states, who must be enrolled in a university to guarantee that there are at least 100 who come from the same state?

Show solution
Answer

4951

boxes, want : .

(With 4950 students, each state could have exactly 99.)

6.2 #13 Challenge Parity holes

Let , , be a set of nine distinct points with integer coordinates in space. Show that the midpoint of at least one pair of these points has integer coordinates.

Show solution

The midpoint of and is . It has integer coordinates exactly when have the same parity, have the same parity, and have the same parity.

Holes: parity patterns (even/odd for each coordinate): patterns. Pigeons: 9 points. By pigeonhole, two points share a parity pattern, and their midpoint has integer coordinates. ∎

6.2 #15 Core Pair holes

a) Show that if five integers are selected from the first eight positive integers, there must be a pair of these integers with a sum equal to 9.
b) Is the conclusion in part (a) true if four integers are selected rather than five?

Show solution

a) Group into 4 pairs that each sum to 9: . These are the holes. Choosing 5 integers (pigeons) puts two in the same pair, and those two sum to 9. ∎

b) No. Counterexample: (one from each pair) has no two summing to 9.

6.2 #17 Core Pair holes

How many numbers must be selected from the set to guarantee that at least one pair of these numbers add up to 7?

Show solution
Answer

4

Pairs summing to 7: , so 3 holes. Choosing 4 numbers forces two from the same pair. With only 3, you could pick and avoid it. Answer: 4.

6.2 #19 Core Pigeonhole count

A warehouse has 50 aisles, 85 horizontal locations in each aisle, and 5 shelves throughout. What is the least number of products the company can have so that at least two products must be stored in the same bin?

Show solution
Answer

21,251

Bins: . To force two products into one bin: .

6.2 #21 Core Generalized pigeonhole proof

Suppose that every student in a discrete mathematics class of 25 students is a freshman, a sophomore, or a junior.

a) Show that there are at least nine freshmen, at least nine sophomores, or at least nine juniors in the class.
b) Show that there are either at least three freshmen, at least 19 sophomores, or at least five juniors in the class.

Show solution

a) Generalized pigeonhole: 25 students in 3 classes, so some class has at least . ∎

(By contradiction: if each had at most 8, the total would be at most .)

b) Suppose not: at most 2 freshmen, at most 18 sophomores, and at most 4 juniors. Then there are at most students, contradicting 25. So at least one of the three conditions holds. ∎

6.2 #33 Core Generalized pigeonhole

Show that there are at least six people in California (population: 39 million) with the same three initials who were born on the same day of the year (but not necessarily in the same year). Assume that everyone has three initials.

Show solution

Holes: (three initials, birthday) combinations: .
Pigeons: 39,000,000 people.

Some hole contains at least

people, since . So at least six (in fact seven) people share initials and birthday. ∎

6.2 #35 Core Generalized pigeonhole

In the 17th century there were more than 800,000 inhabitants of Paris. Assume no one had more than 200,000 hairs on their head and everyone had at least one. Show there had to be two Parisians with the same number of hairs. Then show there had to be at least five Parisians with the same number of hairs.

Show solution

Holes: possible hair counts : 200,000 holes. Pigeons: at least 800,001 people.

  • Since , the pigeonhole principle gives two people with the same count.
  • Generalized: some hole has at least people. ∎
6.2 #37 Core Generalized pigeonhole

There are 38 different time periods during which classes at a university can be scheduled. If there are 677 different classes, how many different rooms will be needed?

Show solution
Answer

18

Some time period must hold at least classes, and each needs its own room.
, so .

So at least 18 rooms are needed, and 18 suffice (spread the classes evenly, at most 18 per period).

6.2 #39 Core Pigeonhole proof

A computer network consists of six computers. Each computer is directly connected to zero or more of the other computers. Show that there are at least two computers in the network that are directly connected to the same number of other computers.

Show solution

Each computer is connected to between 0 and 5 others: six possible values. But 0 and 5 can't both occur: if some computer is connected to all 5 others, then no computer is connected to 0 others, and vice versa.

So the six computers (pigeons) take at most 5 distinct connection counts (holes). By pigeonhole, two computers have the same number of connections. ∎

6.2 #41 Extra Pigeonhole + construction

Find the least number of cables required to connect 100 computers to 20 printers to guarantee that every subset of 20 computers can directly access 20 different printers. Justify your answer.

Show solution
Answer

1620

1620 suffice. Connect computer to printer for , and connect each of to all 20 printers: cables. For any 20 computers, the ones among use their own printers, and each of the others (connected to everything) takes one of the unused printers.

1619 do not suffice. With 1619 cables and 20 printers, some printer has at most cables (if all had , there would be cables). That leaves at least 20 computers not connected to it. Those 20 computers can reach at most the other 19 printers, so they can't all print at once.

6.2 #43 Challenge Clever pigeonhole

An arm wrestler is the champion for 75 hours. The wrestler had at least one match each hour, but no more than 125 total matches. Show that there is a period of consecutive hours during which the arm wrestler had exactly 24 matches.

Show solution

Let = total matches completed by the end of hour . Since there's at least one match per hour,

and therefore

That's numbers , all in . By pigeonhole two are equal. The are distinct from each other, and so are the . So for some . Then during hours through there were exactly matches. ∎

6.2 #45 Core Generalized pigeonhole

Show that if is a function from to , where and are nonempty finite sets and , then there are at least elements of mapped to the same value of .

Show solution

Pigeons: the elements of . Holes: the elements of . Place each into the hole . By the generalized pigeonhole principle, some hole receives at least elements, i.e. there are distinct with . ∎

6.2 #47 Challenge Clever pigeonhole

Let be an irrational number. Show that for some positive integer not exceeding the positive integer , the absolute value of the difference between and the nearest integer to is less than .

Show solution

Let be the fractional part. Consider the numbers

Split into boxes , . With numbers in boxes, two land in the same box: and with , and .

Now , an integer plus something of absolute value . So is within of an integer, and hence its nearest integer is within too. Take , which satisfies . ∎

Custom (from lecture) Core Worst case Not from HW

How many cards must be drawn from a standard 52-card deck to guarantee

a) at least three cards of the same suit?
b) at least three clubs?
c) at least two cards of the same rank (A, 2, …, K)?

Show solution
Answer

a) 9 b) 42 c) 14

a) 4 suits, want 3 in one: . (8 cards could be 2 of each suit.)

b) Specific suit, so worst case: all non-clubs first, then 3 clubs: .

c) 13 ranks: .

Custom (from lecture) Core Pigeonhole proof Not from HW

Show that among any positive integers not exceeding , there is an integer that divides one of the others.

Show solution

Write each chosen integer as with odd (factor out all 2s). Since , the odd part is one of : only possible values (holes).

With integers (pigeons), two have the same odd part: and with (the integers are distinct). If , then , so . ∎