40
Chapter 5.2 The Pigeonhole Principle

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,

Embed Size (px)

Citation preview

Chapter 5.2

Chapter 5.2The Pigeonhole Principle1The pigeonhole principleSuppose a flock of pigeons fly into a set of pigeonholes to roostIf there are more pigeons than pigeonholes, then there must be at least 1 pigeonhole that has more than one pigeon in itIf k+1 or more objects are placed into k boxes, then there is at least one box containing two or more of the objects

2Pigeonhole principle examplesIn a group of 367 people, there must be two people with the same birthdayAs there are 366 possible birthdays

In a group of 27 English words, at least two words must start with the same letterAs there are only 26 letters

3Pigeonhole principle examplesShow that for every integer n there is a multiple of n that has only Os and I s in its decimal expansion.Solution: Let n be a positive integer. Consider the n + 1 integers 1, 11, 111, ... , 11 ... 1 (where the last integer in this list is the integer with n + 1 I s in its decimal expansion). There are n possible remainders when an integer is divided by n. Because there are n + 1 integers in this list, by the pigeonhole principle there must be two with the same remainder when divided by n. The larger of these integers less the smaller one is a multiple of n, which has a decimal expansion consisting entirely of Os and 1 s.Generalized pigeonhole principleIf N objects are placed into k boxes, then there is at least one box containing N/k objectsProof by contradiction: Suppose that none of the boxes contains more than N/k-1 objects. Then, the total number of objects is at most:

*

5Generalized pigeonhole principleAmong 100 people, there are at least 100/12 = 9 born on the same month

How many students in a class must there be to ensure that 6 students get the same grade (one of A, B, C, D, or F)?The boxes are the grades. Thus, k = 5Thus, we set N/5 = 6Lowest possible value for N is 266ExampleA bowl contains 10 red and 10 yellow ballsHow many balls must be selected to ensure 3 balls of the same color?One solution: consider the worst caseWe can select all yellow balls before we select a single red ballThe next two balls will be red, we may need to select 13 ballsVia generalized pigeonhole principleHow many balls are required if there are 2 colors, and one color must have 3 balls?How many pigeons are required if there are 2 pigeon holes, and one must have 3 pigeons?number of boxes: k = 2, We want N/k = 3What is the minimum N?N = 57More elegant applicationsShow that among any n+1 positive integers not exceeding 2n, there must be an integer that divides one of the other integers.Let a1, a2, , an+1 be such integers (increasing).For any j, aj could be written as 2kjqj where qj is odd.The integers q1, q2, , qn+1 are all odd positive integers less than 2n.Since there are only n odd numbers less than 2n, qi = qj by the Pigeonhole principle.Let q be qi = qj. Then ai = 2kiq and aj = 2kjq. If ki