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,

Slides:



Advertisements
Similar presentations
The Pigeonhole Principle:
Advertisements

The Pigeon hole problem
Tutorial 2: First Order Logic and Methods of Proofs
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. Counting = Determining the number of elements of a finite set.
The Pigeonhole Principle College of Information Technology & Design
PROOF BY CONTRADICTION
Chapter 5 Relations and Functions
COUNTING AND PROBABILITY
Application: The Pigeonhole Principle Lecture 37 Section 7.3 Wed, Apr 4, 2007.
Recursively Defined Functions
The Pigeonhole Principle
3.5 Paradox  1.Russell’s paradox  A  A, A  A 。  Russell’s paradox: Let S={A|A  A}. The question is, does S  S?  i.e. S  S or S  S?  If S  S,
3.3 The Characteristic function of the set  function from universal set to {0,1}  Definition 3.6: Let U be the universal set, and let A  U. The characteristic.
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.
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
The Pigeonhole Principle
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
CSE115/ENGR160 Discrete Mathematics 04/10/12
Pigeonhole.
Proof Methods & Strategy
1 Non-regular languages. 2 Regular languages Non-regular languages.
4. There once lived a king, named Hagar, who had thousands of sons and daughters, still giving more births to his wives. One of his serious problems was.
1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield.
Fall 2015 COMP 2300 Discrete Structures for Computation
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
1 Lecture 3 (part 2) Functions – Pigeonhole Principle Reading: Epp Chp 7.4.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Math 170 Project #11 Part 2 Jeffrey Martinez Bianca Orozco Omar Monroy.
CS201: Data Structures and Discrete Mathematics I
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,
Deterministic Finite Automata (DFA) - 1 q0q0q0q0 q1q1q1q strings that do not end with "1". Build an automaton to identify strings that end with.
5.2 The Pigeonhole Principle
1 Algorithms CSCI 235, Fall 2015 Lecture 17 Linear Sorting.
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.
Models of Computation: Automata and Formal Languages Sam M. Kim.
1 The Pigeonhole Principle CS 202 Epp section 7.3.
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.
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.
1 The Pigeonhole Principle CS 202 Epp section ??? Aaron Bloomfield.
5-5 Indirect Proof. Indirect Reasoning: all possibilities are considered and then all but one are proved false. The remaining possibility must be true.
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.
Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.
EXAMPLE 3 Write an indirect proof Write an indirect proof that an odd number is not divisible by 4. GIVEN : x is an odd number. PROVE : x is not divisible.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
The Pigeonhole Principle
Copyright © Zeph Grunschlag,
PIGEONHOLE PRINCIPLE.
Standard Representations of Regular Languages
Discrete Structures for Computer Science
CSE322 PUMPING LEMMA FOR REGULAR SETS AND ITS APPLICATIONS
COCS DISCRETE STRUCTURES
CSC 321: Data Structures Fall 2016 Counting and proofs
The Pigeonhole Principle
Copyright © Zeph Grunschlag,
PIGEONHOLE PRINCIPLE.
PIGEONHOLE PRINCIPLE.
COUNTING AND PROBABILITY
The Pigeonhole Principle
CS 220: Discrete Structures and their Applications
PIGEONHOLE PRINCIPLE.
The Pigeonhole Principle
The Pigeon hole problem
Representations of Integers
5.6 Inequalities in Two Triangles and Indirect Proof
Pigeon-Hole Principle ( PHP )
Presentation transcript:

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, then there is at least one box containing two or more of the objects. A common way to illustrate this principle is by assuming that k+1 pigeons fly to k pigeonholes. Then, there must be at least one pigeonhole containing at least two pigeons. The pigeonhole principle is a trivial observation, which however can be used to prove many results.

Example 1 In a room of 13 people, 2 or more people have their birthday in the same month. Proof: (by contradiction) 1. Assume the room has 13 people and no 2 people have their birthday in the same month. 2. There must be at least 13 different months. 3. Statement 2. is false, so the assumption is false.

The pigeonhole principle Let m 1, m 2, …, m n be positive integers. If m 1 + m m n - n + 1 objects are put into n boxes, Then either the 1st box has at least m 1, or the 2nd box has at least m 2, or …, or the nth box has at least m n objects.

Proof by Contradiction Assume m 1 + m m n - n + 1 objects are put into n boxes, and the 1st box has at most m 1 - 1, and the 2nd box has at most m 2 - 1, and …, and the nth box has at most m n - 1 objects. Then, at most m 1 + m m n - n objects are in the boxes, a contradiction.

Another Form of Pigeonhole Principle If A is the average number of pigeons/hole, then some hole contains at least  A  pigeons and some hole contains at most  A  pigeons.

Intuition A AA AA Cannot have all holes contain less than the average. Cannot have all holes contain more than the average.

Proof of Alternate Principle By contradiction: 1.Assume A is the average number of pigeons/hole. 2.Assume every hole contains at most  A  - 1 pigeons or every hole contains at least  A  + 1 pigeons. 3. Let n denote the number of holes. 4. Assume every hole contains at most  A  - 1 pigeons. 5. All holes contain at most n(  A  - 1 ) < nA pigeons, a contradiction.

5. Assume every hole contains at least  A  + 1 pigeons. 6. All holes contain at least n(  A  + 1) > nA pigeons, a contradiction. 7. Therefore, some hole contains at least  A  pigeons and some hole contains at most  A  pigeons.

Applications of pigeonhole principle If n + 1 pigeons are distributed among n holes, then some hole contains at least 2 pigeons. If 2n + 1 pigeons are distributed among n holes, then some hole contains at least 3 pigeons. If kn + 1 pigeons are distributed among n holes, then some hole contains at least k + 1 pigeons. The average number of pigeons/hole = k + 1/n and  k + 1/n  = k + 1.

Applications... In any group of 367 people, there must be at least 1 pair with the same birthday. If 4 different pairs of socks are scrambled in the drawer, only 5 socks need to be selected to guarantee finding a matching pair. In a group of 61 people, at least 6 were born in the same month.

Applications... If 401 letters were delivered to 50 houses, then some house received at most 8 letters. If x 1, x 2, …, x 8 are distinct integers, then some pair of these have the same remainder when divided by 7.

Applications... Given a set of 7 distinct integers, there are 2 whose sum or difference is divisible by 10. Set this up so that there are 6 pigeon holes. Partitioning the integers into equivalence classes according to their remainder when divided by 10 yields too many classes. Consider: {[0]}, {[1],[9]}, {[2],[8]}, {[3],[7]}, {[4],[6]}, {[5]}. If 2 integers are in the same set either their difference is divisible by 10 or their sum is divisible by 10.

Applications... Suppose 50 chairs are arranged in a rectangular array of 5 rows and 10 columns. 41 students are seated randomly in the chairs (1 student/chair). Then, some row contains at least 9 students some row contains at most 8 students some column contains at least 5 students some column contains at most 4 students.

Applications... A patient has 45 pills, with instructions to take at least 1 pill/day for 30 days. Prove: there is a period of consecutive days in which the patient takes a total of 14 pills. 1. Let a i be the number of pills taken through the end of the ith day  a 1 < a 2 <... < a 30  a < a <... < a  = 59

4. We have: 60 integers: a 1, a 2,..., a 30, a 1 +14, a 2 +14,..., a holes of these integers must be the same. 6. They cannot both be in a 1, a 2,..., a They cannot both be in a 1 +14, a 2 +14,..., a One is in each: a i = a j + 14, for some i and j. 9. For that i and j, a i - a j = That is, a j+1 +a j a i = 14.