1 CSE 20 Lecture 13 Analysis: Counting with Pigeonhole Principle CK Cheng, May 17, 2011.

Slides:



Advertisements
Similar presentations
The Pigeon hole problem
Advertisements

22C:19 Discrete Math Counting Fall 2011 Sukumar Ghosh.
The Pigeonhole Principle
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.
Lecture 4 4.1,4.2 Counting. 4.1 Counting Two Important Principles: Product Rule and Sum Rule. Product Rule: Assume we need to perform procedure 1 AND.
COUNTING AND PROBABILITY
The Pigeonhole Principle
Quiz highlights Probability of the song coming up after one press: 1/N. Two times? Gets difficult. The first or second? Or both? USE THE MAIN HEURISTICS:
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
PIGEONHOLE PRINCIPLE. Socks You have a drawer full of black and white socks. Without looking in the drawer, how many socks must you pull out to be sure.
Welcome to MATH 302A Please find the index card with your name on it and sit there. On the other side of the index card, write: Name as you wish to be.
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
The Pigeonhole Principle
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
CSE115/ENGR160 Discrete Mathematics 04/10/12
Pigeonhole.
Lecture 8 Sept 29, 2011 Regular expressions – examples Converting DFA to regular expression. (same works for NFA to r.e. conversion.) Converting R.E. to.
© J. Christopher Beck Lecture 22: Local Search for Sports Scheduling.
1 Non-regular languages. 2 Regular languages Non-regular languages.
1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield.
Strong Induction 2/27/121. Induction Rule 2/27/122.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
Fall 2015 COMP 2300 Discrete Structures for Computation
The Pigeonhole (Dirichlet’s box) Principle
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
1 Lecture 3 (part 2) Functions – Pigeonhole Principle Reading: Epp Chp 7.4.
1 Relations and Functions Chapter 5 1 to many 1 to 1 many to many.
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.
Symmetry Problem What is the sum of the values 1 to 100? Hint: Look for the symmetry!
1 CSE 20 Lecture 11 Function, Recursion & Analysis CK Cheng UC San Diego.
CS201: Data Structures and Discrete Mathematics I
CSNB143 – Discrete Structure
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
5.2 The Pigeonhole Principle
Comparing Numbers Greater than Less than Equal to.
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.
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.
1 The Pigeonhole Principle CS 202 Epp section 7.3.
Introduction Suppose that a password on a computer system consists of 6, 7, or 8 characters. Each of these characters must be a digit or a letter of the.
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.
1 The Pigeonhole Principle CS 202 Epp section ??? Aaron Bloomfield.
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,
Activity 1-12 : Multiple-free sets
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.
Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly.
Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
Counting by Complement and the Inclusion/Exclusion Principle
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
The Pigeonhole Principle
CS 2210 Discrete Structures Counting
Pigeonhole Principle and Ramsey’s Theorem
Mathematics for Computer Science MIT 6.042J/18.062J
Basic Counting.
The Pigeonhole Principle
The Pigeonhole (Dirichlet’s box) Principle
The Pigeonhole Principle
The Pigeon hole problem
Four seasons T T P 2012.
Miniconference on the Mathematics of Computation
Counting Elements of Disjoint Sets: The Addition Rule
Pigeon-Hole Principle ( PHP )
The Pigeonhole Principle
Presentation transcript:

1 CSE 20 Lecture 13 Analysis: Counting with Pigeonhole Principle CK Cheng, May 17, 2011

2 Pigeonhole Principle 5.6, 6.5 Schaum’s Motivation: The mapping of n objects to m buckets E.g. Hashing. The principle is used for proofs of certain complexity derivation.

3 Pigeonhole Principle Pigeonhole Principle: If n pigeonholes are occupied by n + 1 or more pigeons, then at least one pigeonhole is occupied by more than one pigeon. Remark: The principle is obvious. No simpler fact or rule to support or prove it. Generalized Pigeonhole Principle: If n pigeonholes are occupied by kn + 1 pigeons, then at least one pigeonhole is occupied by k + 1 or more pigeons.

4 Example 1: Birthmonth In a group of 13 people, we have 2 or more who are born in the same month. # pigeons# holesAt least # born in the same month or more or more or more or more or more ≥kn+1nk+1 or more

5 Example 2: Handshaking Given a group of n people (n>1), each shakes hands with some (a nonzero number of) people in the group. We can find at least two who shake hands with the same number of people. Proof: Number of pigeons (number of people): n Number of pigeonholes (range of number of handshakes): n-1

6 Example 3: Cast in theater A theater performs 7 plays in one season. Five women are each cast in 3 of the plays. Then some play has at least 3 women in its cast. Number of pigeons (5*3): 15 Number of pigeonholes: 7 k*n+1=2*7+1 3 or more pigeons in the same pigeonhole

7 Example 4: Pairwise difference Given 8 different natural numbers, none greater than 14. Show that at least three pairs of them have the same difference. Try a set: 1, 2, 3, 7, 9, 11, 12, 14 Difference of 12 and 14 = 2. Same for 9 and 11; 7 and 9; 1 and 3. In this set, there are four pairs that all have the same difference.

Example 4: Pairwise difference Given 8 different natural numbers, none greater than 14. Show that at least three pairs of them have the same difference. Try a set: 1, 2, 3, 7, 9, 11, 12, 14 Difference of 12 and 14 = 2. Same for 9 and 11; 7 and 9; 1 and 3. In this set, there are four pairs that all have the same difference. Proof: # pigeons (different pairs: C(8,2) = 8*7/2): 28 # pigeonholes (14-1): 13 Since 28≥k*n+1=2*13+1, we have 3 or more pigeons in the same pigeonhole.

9 Example 5: Consecutive game plays A team plays 12 (g) games in a 10 (n)-day period and at least one game a day. We can always find a period of days in which exactly 8 (m) games are played. Eg: s i = # games played from day 1 to day i. t i = s i +m= s i +8, where s i ≠s j, ∀ i≠j; t i ≠t j, ∀ i≠j. days games sisi titi

10 Example 5: Consecutive game plays A team plays 12 (g) games in a 10 (n)-day period and at least one game a day. We can always find a period of days in which exactly 8 (m) games are played. Eg: s i = # games played from day 1 to day i. t i = s i +m= s i +8, where s i ≠s j, ∀ i≠j; t i ≠t j, ∀ i≠j. # pigeons (# symbols, 2n+2): 22 # pigeonholes (range, g+m+1): 21 (from 0 to 20) 2 or more pigeons in the same pigeon hole. s i =t j =s i +8, so s i –s j =8, 8 games during day j+1 to i. days games sisi titi

Conclusion Pigeonhole principle has applications to assignment and counting. The usage of the principle relies on the identification of the pigeons and the pigeonholes. 11