1 / 20

# Application: The Pigeonhole Principle - PowerPoint PPT Presentation

Application: The Pigeonhole Principle. Lecture 37 Section 7.3 Wed, Apr 4, 2007. The Pigeonhole Principle. Pigeon version: If you put n pigeons into m pigeonholes, and n > m , then at least at least two pigeons are in the same pigeonhole.

Related searches for Application: The Pigeonhole Principle

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Application: The Pigeonhole Principle' - minor

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Application: The Pigeonhole Principle

Lecture 37

Section 7.3

Wed, Apr 4, 2007

• Pigeon version: If you put n pigeons into m pigeonholes, and n > m, then at least at least two pigeons are in the same pigeonhole.

• Mathematical version: If A and B are finite sets and |A| > |B| and f : AB, then f is not one-to-one.

• If a drawer contains 10 black socks and 12 blue socks, how many socks must you draw at random in order to guarantee that you have two socks of the same color?

• A bag of jellybeans contains dozens of jelly beans of each of 8 different colors. How many jellybeans must we choose in order to guarantee that we have at least two jellybeans of the same color?

• To guarantee three of the same color?

• To guarantee four of the same color?

• Define the PowerMod() function as

PowerMod(n, a, m) = na mod m.

• Then the sequence of numbers

PowerMod(3, i, 7), 0  i 10,

must contain at least one repeated value.

• If we choose 6 distinct integers from 1 to 9, at least one pair of them adds to 10.

• Why?

• If we choose 6 distinct integers from 1 to 9, at least two pairs of the chosen integers have the same total.

• Why?

• How many integers must we choose from 1 to 99 in order to guarantee that at least two distinct pairs of them will have the same total?

• Theorem: Let A and B be finite sets with |A| = |B| and let f : AB. Then f is one-to-one if and only if f is onto.

• Proof:

• Suppose that f is not onto.

• Let f(A) be the set {f(a) | aA}.

• Then f : Af(A) and |f(A)| < |A|.

• By the mathematical version of the pigeonhole principle, there are at least two distinct members a1, a2A with the same image in f(A).

• That is, f(a1) = f(a2) for some a1 a2.

• Thus, f is not one-to-one.

• By the contrapositive, if f is one-to-one, then f is onto.

• We also need to prove that if f is onto, then f is one-to-one. (Exercise)

• A hallway has 1000 lockers, numbered 1 through 1000.

• We have 1000 students, numbered 1 through 1000.

• For each k from 1 to 1000, we send student #k down the hallway, with instructions to reverse the open/closed status every kth locker door, beginning with locker #k.

• After all the students are done, which lockers doors will be open?

• Did it matter in which order the students were dispatched?

• Suppose we have only 10 doors and 10 students.

• We wish to leave open doors 2, 4, 5, 8, 9, and no others.

• Which students do we send down the hallway so that in the end only doors 2, 4, 5, 8, and 9 are open?

• Clearly, we must not send student #1 down the hallway.

• Thus, clearly, we must send student #2 down the hallway.

• That will leave open doors 2, 4, 6, 8, 10.

• Thus, clearly, we must not send student #3 down the hallway.

• Thus, clearly, neither should we send student #4 down the hallway.

• Thus, clearly, we must send student #5 down the hallway.

• That will leave open doors 2, 4, 5, 6, 8.

• Thus, clearly, we must send student #6 down the hallway.

• Thus, clearly, we must not send students #7 or #8 down the hallway.

• Thus, clearly, we must send student #9 down the hallway and we must not send student #10 down the hallway.

• Given an arbitrary subset D of the 1000 locker doors, is it possible to send some subset S of the 1000 students down the hallway with their instructions such that in the end, only the doors in set D are open?

• Let A be the set of choices of which students to send down the hallway.

• Let B be the set of choices of which locker doors to be left open in the end.

• How many elements are in A and B?

• Let f : AB by defining f(A) = the set of doors left open when the students in A are sent down the hallway.

• If we can show that f is one-to-one, then it follows that it is onto.

• How can we show that f is one-to-one?