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

Slides:



Advertisements
Similar presentations
COUNTING AND PROBABILITY
Advertisements

The Pigeonhole Principle
Copyright © Cengage Learning. All rights reserved.
Section 7.4: Closures of Relations Let R be a relation on a set A. We have talked about 6 properties that a relation on a set may or may not possess: reflexive,
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Chapter 7 Logic, Sets, and Counting Section 3 Basic Counting Principles.
The Pigeonhole Principle 6/11/ The Pigeonhole Principle In words: –If n pigeons are in fewer than n pigeonholes, some pigeonhole must contain at.
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
The Pigeonhole Principle
Counting I: One To One Correspondence and Choice Trees Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 9Feb 10,
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
CSE115/ENGR160 Discrete Mathematics 04/10/12
Functions f( ) = A B Lecture 15: Nov 4.
Pigeonhole.
Discrete Mathematics Lecture 7 Harper Langston New York University.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
Counting Chapter 6 With Question/Answer Animations.
Fall 2015 COMP 2300 Discrete Structures for Computation
1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 5 School of Innovation, Design and Engineering Mälardalen University 2012.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Counting Subsets of a Set: Combinations Lecture 31 Section 6.4 Wed, Mar 21, 2007.
Math 170 Project #11 Part 2 Jeffrey Martinez Bianca Orozco Omar Monroy.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
The Basics of Counting Section 6.1.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.1 and 7.2.
Mathematical Notions and Terminology Lecture 2 Section 0.2 Fri, Aug 24, 2007.
CS201: Data Structures and Discrete Mathematics I
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Cardinality with Applications to Computability Lecture 33 Section 7.5 Wed, Apr 12, 2006.
5.2 The Pigeonhole Principle
Discrete Structures Counting (Ch. 6)
Functions (Mappings). Definitions A function (or mapping)  from a set A to a set B is a rule that assigns to each element a of A exactly one element.
Types of Proof Lecture 4 Sections 0.4 Wed, Aug 29, 2007.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
Section 1.3 Each arrangement (ordering) of n distinguishable objects is called a permutation, and the number of permutations of n distinguishable objects.
Chapter 7 – Counting Techniques CSNB 143 Discrete Mathematical Structures.
CS Lecture 26 Monochrome Despite Himself. Pigeonhole Principle: If we put n+1 pigeons into n holes, some hole must receive at least 2 pigeons.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
Section 7.1. Probability of an Event We first define these key terms: An experiment is a procedure that yields one of a given set of possible outcomes.
 2. Inverse functions  Inverse relation,  Function is a relation  Is the function’s inverse relation a function? No  Example: A={1,2,3},B={a,b}, f:A→B,
The Pigeonhole Principle. Pigeonhole principle The pigeonhole principle : If k is a positive integer and k+1 or more objects are placed into k boxes,
Nonregular Languages How do you prove a language to be regular? How do you prove a language to be nonregular? A Pumping Lemma.
Pigeonhole Principle – Page 1CPTR311 – Discrete Structures CPTR311 Discrete Structures Pigeonhole Principle Reading: Kolman, Section 3.3.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Discrete Mathematics. Exercises Exercise 1:  There are 18 Computer Science (CS) majors and 325 Business Administration (BA) majors at a college.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
Discrete Mathematics Lecture 6
The Pigeonhole Principle
CSNB 143 Discrete Mathematical Structures
Monochrome Despite Himself
The Pigeonhole Principle
9. Counting and Probability 1 Summary
Mathematical Notions and Terminology
Counting Chapter 6 With Question/Answer Animations
Xuan Guo Lab 9 Xuan Guo
COUNTING AND PROBABILITY
Lecture 43 Section 10.1 Wed, Apr 6, 2005
The Pigeonhole Principle
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
One-to-One and Onto, Inverse Functions
One-to-One and Onto, Inverse Functions
Counting Elements of Disjoint Sets: The Addition Rule
Presentation transcript:

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

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?

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

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

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

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

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

The Locker Problem A hallway has 1000 lockers, numbered 1 through We have 1000 students, numbered 1 through 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.

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