Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.

Slides:



Advertisements
Similar presentations
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.
Advertisements

The Pigeonhole Principle
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.
Main Menu Main Menu (Click on the topics below) Algebra of Combinations Pascal’s formula More Formulas Click on the picture Sanjay Jain, Lecturer, School.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Main Menu Main Menu (Click on the topics below) Combinations Example Theorem Click on the picture.
COUNTING AND PROBABILITY
Application: The Pigeonhole Principle Lecture 37 Section 7.3 Wed, Apr 4, 2007.
The Pigeonhole Principle
The Pigeonhole Principle
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
CSE115/ENGR160 Discrete Mathematics 04/10/12
CSE115/ENGR160 Discrete Mathematics 02/21/12
Pigeonhole.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield.
Main Menu Main Menu (Click on the topics below) Permutations with Some repetitions Example r-Combinations with Some repetitions Example Permutations and.
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.
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.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
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.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Module #15: Combinatorics Rosen 5 th ed., §§ & §6.5 Now we are moving on to Ch. 4 It is the study of arrangement of objects e.g. enumeration, counting.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
Main Menu Main Menu (Click on the topics below) Permutation Example 1 Example 2 Circular Permutation Permuting r of n objects Example 1 Example 2 Example.
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,
Math 3121 Abstract Algebra I Lecture 5 Finish Sections 6 + Review: Cyclic Groups, Review.
Discrete Structures Li Tak Sing ( 李德成 ) Lectures
Basic Structures: Sets, Functions, Sequences, and Sums.
Discrete Structures Counting (Ch. 6)
Menu Traditional Menu Other Menu Nasi LemakBeef Burger Roti Canai Potatoes Chip Capati French Bread Mee Goreng Drink : Coffee, Tea, Coke and Pepsi.
Main Menu Main Menu (Click on the topics below) Combinatorics Introduction Equally likely Probability Formula Counting elements of a list Counting elements.
Great Theoretical Ideas in Computer Science.
CS Lecture 14 Powerful Tools     !. Build your toolbox of abstract structures and concepts. Know the capacities and limits of each tool.
SECTION 9 Orbits, Cycles, and the Alternating Groups Given a set A, a relation in A is defined by : For a, b  A, let a  b if and only if b =  n (a)
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.
1 Functions CS 202 Epp section ??? Aaron Bloomfield.
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.
Equivalence Relations Lecture 45 Section 10.3 Fri, Apr 8, 2005.
1 The Pigeonhole Principle CS 202 Epp section ??? Aaron Bloomfield.
CS 104: Discrete Mathematics
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
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.
FUNCTIONS.
Copyright © Zeph Grunschlag,
COCS DISCRETE STRUCTURES
The Pigeonhole Principle
Copyright © Zeph Grunschlag,
CS100: Discrete structures
CSE15 Discrete Mathematics 02/27/17
Module #15: Combinatorics
COUNTING AND PROBABILITY
The Pigeonhole Principle
Functions.
Module #15: Combinatorics
The Pigeonhole Principle
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Representations of Integers
Discrete Mathematics and its Applications
Counting Elements of Disjoint Sets: The Addition Rule
Presentation transcript:

Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click on the picture

Pigeonhole Principle Sanjay Jain, Lecturer, School of Computing

Pigeonhole Principle If we place m balls in n boxes, m > n, then at least one box gets  2 balls. Another formulation: Consider a function f from A to B, where #(A) > #(B), and A, B are finite. Then f cannot be 1—1.

END OF SEGMENT

Example In a group of 13 people, there are at least 2 who are born in the same month. S = set of people (13 elements) M = months of the year (12 elements) f: S —> M f(x)= the month x was born. Since #(S) > #(M), by pigeonhole principle, f cannot be 1—1. That is, there exist x, y in S, x  y, such that f(x)=f(y) In other words, x and y are born in the same month.

END OF SEGMENT

Example Let A={1,2,3,…,8} If we pick 5 integers from A, then there exist 2 integers among the selected integers, which add up to 9. Proof: A 1 ={1,8}; A 2 ={2,7}; A 3 ={3,6}; A 4 ={4,5} B: set of numbers picked. C={1,2,3,4} f: B --> C, if x  B, is a member of A i then f(x)=i. Since #(B) > #(C), by pigeonhole principle, f cannot be 1 —1. Thus, there exist a, b, in B such that f(a) = f(b). But then a+b = 9

END OF SEGMENT

Example In a set of four numbers, two are same mod 3. Proof: A = Set of 4 numbers. B={0,1,2} f: A —> B where f(x)=x mod 3. Now #(A) > #(B). So f cannot be 1 —1. Thus, there exists distinct x, y in A, such that f(x) = f(y). In other words, x mod 3 = y mod 3.

END OF SEGMENT

Example There are 600 students. Each of them takes 3 compulsory modules, and 1 of 2 electives. In each module they can get a grade of A, B, C, or D. Show that there are 2 students with identical grade sheet.

Example Proof: A= set of students (600) B= set of grade sheets. How many grade sheets are there? T 1 : select the elective. T 2 : select the grade for module 1 T 3 : select the grade for module 2 T 4 : select the grade for module 3 T 5 : select the grade for module 4 T 1 can be done in two ways. Each of T 2 to T 5 can be done in four ways. Using multiplication rule, the number of elements of B = 2*4*4*4*4 = 512

Example A= set of students (600) B= set of grade sheets. (512 ) f: A —> B where f(x)=grade sheet of x. Since #(A) > #(B), f cannot be 1 — 1 Thus, there exist distinct x, y in A such that f(x) = f(y) In other words, x and y have the same grade sheets.

END OF SEGMENT

Example Suppose there are 19 people in a party. Suppose friendship relation is mutual. Show that there are 2 persons in the party with same number of friends

Example A= set of people in the party. B={0,1,2…,18} f: A —> B where f(x) = number of friends of x #(A) = 19, #(B) = 19. We cannot apply pigeonhole principle yet. Note that, either for all x, f(x)  0, or for all x, f(x)  18 Why? Suppose for all x, f(x)  0 is false. Then there is an a such that f(a)=0. Thus a has no friends. Then, a is not a friend of anyone. Thus, for all x, f(x)  18

Example A= set of people in the party. B={0,1,2…,18} f: A —> B where f(x) = number of friends of x #(A) = 19, #(B) = 19. We cannot apply pigeonhole principle yet. Note that, either for all x, f(x)  0, or for all x, f(x)  18 Let B’=B - {w}, where w = 0 or 18, based on which of above cases holds. Note that #(B’)=18. Thus f: A—> B’ cannot be 1—1. Therefore, there exist distinct x and y in A, such that f(x)=f(y). In other words, there are two people in A, with the same number of friends.

END OF SEGMENT

Example Let X={1,2,….,2n} Let S be a subset of X containing n+1 elements. Then, there exist distinct x and y in S, such that x divides y.

Example Suppose the elements of S are s 1, s 2, …,s n+1 Let s i =2 r i w i, where w i is odd. Let B= set of odd numbers  2n. Note that #(B)=n Let f:S—> B where f(s i )=w i Thus, f cannot be1— 1 (by PH principle) Thus, there exist distinct i and j, such that f(s i )= f(s j ) In other words, w i = w j. s i =2 r i w i, s j =2 r j w j Now if, r i >r j then, s j divides s i otherwise, s i divides s j.

END OF SEGMENT

Floors and Ceilings  w  denotes the largest integer  w. For example:  6.9  = 6;  -9.2  = -10;  9  = 9  w  denotes the smallest integer  w. For example:  6.9  =7;  -9.2  = -9;  9  = 9

END OF SEGMENT

Generalized Pigeonhole Principle If I place m balls in n boxes, then at least one box will get   m/n  balls. If I place m balls in n boxes, then at least one box will get   m/n  balls. For any function f from a finite set X to a finite set Y, if #(X) > k* #(Y), then there exists a y in Y such that y is the image of at least k+1 distinct elements of X.

END OF SEGMENT

Example Suppose I place 26 letters of English alphabet in a circle. Then there exists a consecutive sequence of 5 consonants. B1 B4 B5 B3 B2 21 consonants ---> balls. B1,…, B5 boxes. At least one box will get   21/5  =5 balls. Thus there are 5 consecutive consonants.

END OF SEGMENT

Proof of Pigeonhole Principle Recall the pigeonhole principle: For any function f from a finite set X to a finite set Y, if #(X) > #(Y), then f is not 1—1. Proof: Suppose f is 1—1. Let Y={y 1, y 2,…, y m } f -1 (y)={x  X | f(x)=y} f -1 (y 1 ), f -1 (y 2 ), …,f -1 (y m ) are pairwise disjoint, whose union is X. Therefore by Addition Rule, #(X) = #(f -1 (y 1 )) + #(f -1 (y 2 )) + … + #(f -1 (y m ) )  1+ 1+……+1 = m #(X)  #(Y) a contradiction. Thus f is not 1—1.

END OF SEGMENT