Application the pigeonhole principle
Download
1 / 20

Application: The Pigeonhole Principle - PowerPoint PPT Presentation


  • 186 Views
  • Updated On :

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.

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

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


An Image/Link below is provided (as is) to download presentation

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 l.jpg

Application: The Pigeonhole Principle

Lecture 37

Section 7.3

Wed, Apr 4, 2007


The pigeonhole principle l.jpg
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.


Example l.jpg
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?


Example4 l.jpg
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?


The powermod function l.jpg
The PowerMod function

  • 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.


Example6 l.jpg
Example

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

  • Why?


Example7 l.jpg
Example

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

  • Why?


Example8 l.jpg
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?


Functions of finite sets l.jpg
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|.


Functions of finite sets10 l.jpg
Functions of Finite Sets

  • 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.


Functions of finite sets11 l.jpg
Functions of Finite Sets

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


The locker problem l.jpg
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 kth locker door, beginning with locker #k.


The locker problem13 l.jpg
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?


The locker problem14 l.jpg
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?


The locker problem15 l.jpg
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.


The locker problem16 l.jpg
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.


The locker problem17 l.jpg
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.


The locker problem18 l.jpg
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?


The locker problem19 l.jpg
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?


The locker problem20 l.jpg
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?


ad