Download presentation

Presentation is loading. Please wait.

Published byErin Lipscomb Modified over 2 years ago

1
Application: The Pigeonhole Principle Lecture 37 Section 7.3 Wed, Apr 4, 2007

2
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. Mathematical version: If A and B are finite sets and |A| > |B| and f : A B, then f is not one-to-one.

3
Example 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?

4
Example 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?

5
The PowerMod function Define the PowerMod() function as PowerMod(n, a, m) = n a mod m. Then the sequence of numbers PowerMod(3, i, 7), 0 i 10, must contain at least one repeated value.

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

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

8
Example 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?

9
Functions of Finite Sets 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|.

10
Functions of Finite Sets By the mathematical version of the pigeonhole principle, there are at least two distinct members a 1, a 2 A with the same image in f(A). That is, f(a 1 ) = f(a 2 ) for some a 1 a 2. Thus, f is not one-to-one. By the contrapositive, if f is one-to-one, then f is onto.

11
Functions of Finite Sets We also need to prove that if f is onto, then f is one-to-one. (Exercise)

12
The Locker Problem 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 k th locker door, beginning with locker #k.

13
The Locker Problem After all the students are done, which lockers doors will be open? Did it matter in which order the students were dispatched?

14
The Locker Problem 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?

15
The Locker Problem 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.

16
The Locker Problem 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.

17
The Locker Problem 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.

18
The Locker Problem 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?

19
The Locker Problem 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?

20
The Locker Problem 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?

Similar presentations

OK

The Pigeonhole Principle 6/11/20151. The Pigeonhole Principle In words: –If n pigeons are in fewer than n pigeonholes, some pigeonhole must contain at.

The Pigeonhole Principle 6/11/20151. The Pigeonhole Principle In words: –If n pigeons are in fewer than n pigeonholes, some pigeonhole must contain at.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on four stroke diesel engine Ppt on power grid failure 1965 Ppt on chapter 3 atoms and molecules elements Ppt on javascript events mouse Ppt on european central bank Ppt on automobile related topics in economics Ppt on google file system Ppt on solar energy and wind energy Ppt on save water save energy Ppt on product specification for food