Fall 2015 COMP 2300 Discrete Structures for Computation Chapter 9.4 The Pigeonhole Principle Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University
The Pigeonhole Principle The pigeonhole principle state that 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 set to a smaller finite set cannot be one-to-one: There must be a least two elements in the domain that have the same image in the co-domain. Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Applying the Pigeonhole Principle In a group of six people, must there be at least two who were born in the same month? In a group of thirteen people, must there be at least two who were born in the same month? Why? Among the residents of New York City, must there be at least two people with the same number of hairs on their heads? Why? Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Finding the Number of Pick to Ensure a Result A drawer contains ten black and ten white socks. You reach in and pull some out without looking at them. What is the least number of socks you must pull out to be sure to get a matched pair (one black, one white)? Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Selecting a Pair of Integers with a Certain Sum Let A = {1, 2, 3, 4, 5, 6, 7, 8} If five integers are selected from A, must at least one pair of the integers have a sum of 9? If four integers are selected from A, must at least one pair of the integers have a sum of 9? Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Application to Decimal Expansions of Fractions One important consequence of the pigeon hole principle is the fact that the decimal expansion of any rational number either terminates or repeats – why? A terminating decimal is one like A repeating decimal is one like Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Generalized Pigeonhole Principle For any function f from a finite set X with n elements to a finite set Y with m elements and for any positive integer k, if k < n /m, then there is some such that y is the image of at least k +1 distinct elements of X. Example Show how the generalized pigeonhole principle implies that in a group of 85 people, at least 4 must have the same last initial. Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Generalized Pigeonhole Principle – cont’ For any function f from a finite set X with n elements to a finite set Y with m elements and for any positive integer k, if k < n /m, then there is some such that y is the image of at least k +1 distinct elements of X. Example Show how the generalized pigeonhole principle implies that in a group of 85 people, at least 4 must have the same last initial. Suppose the statement is not true. Then, we have at most 3 people have the same initials. Under this assumption, we can have at most people. Since 78 < 85, by the Pigeonhole Principle, the statement has to be true. Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Generalized Pigeonhole Principle – cont’ For any function f from a finite set X with n elements to a finite set Y with m elements and for any positive integer k, if k < n /m, then there is some such that y is the image of at least k +1 distinct elements of X. Contrapositive: For any function f from a finite set X with n elements to a finite set Y with m elements and for any positive integer k, if for each has at most k elements, then X has at most km elements; in other words, . Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University
Generalized Pigeonhole Principle – cont’ Contrapositive: For any function f from a finite set X with n elements to a finite set Y with m elements and for any positive integer k, if for each has at most k elements, then X has at most km elements; in other words, . Example 2 There are 42 students who are to share 12 computers. Each student uses exactly 1 computer, and no computer is used by more than 6 students. Show that at least 5 computers are used by 3 or more students. Fall 2015 COMP 2300 Department of Mathematics and Physics Donghyun (David) Kim North Carolina Central University