0% found this document useful (0 votes)
512 views14 pages

20 Pigeonhole Principle

The document explains the pigeonhole principle through examples. It begins by introducing the principle - if more objects are placed in boxes than the number of boxes, then at least one box must contain multiple objects. It then provides examples of applying the principle to birthdays, letters in words, and ensuring a minimum number of objects in a box. The document concludes by working through practice problems applying the generalized pigeonhole principle.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
512 views14 pages

20 Pigeonhole Principle

The document explains the pigeonhole principle through examples. It begins by introducing the principle - if more objects are placed in boxes than the number of boxes, then at least one box must contain multiple objects. It then provides examples of applying the principle to birthdays, letters in words, and ensuring a minimum number of objects in a box. The document concludes by working through practice problems applying the generalized pigeonhole principle.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

The Pigeonhole

Principle
CS/APMA 202
Rosen section 4.2
Aaron Bloomfield

1
The pigeonhole principle
Suppose a flock of pigeons fly into a set of
pigeonholes to roost

If there are more pigeons than pigeonholes, then


there must be at least 1 pigeonhole that has
more than one pigeon in it

If k+1 or more objects are placed into k boxes,


then there is at least one box containing two or
more of the objects
 This is Theorem 1
2
Pigeonhole principle examples
In a group of 367 people, there must be
two people with the same birthday
 As there are 366 possible birthdays

In a group of 27 English words, at least


two words must start with the same letter
 As there are only 26 letters

3
Generalized pigeonhole principle
If N objects are placed into k boxes, then
there is at least one box containing N/k
objects
 This is Theorem 2

4
Generalized pigeonhole principle
examples
Among 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 = 5
 Thus, we set N/5 = 6
 Lowest possible value for N is 26
5
Rosen, section 4.2, question 4
A bowl contains 10 red and 10 yellow balls
a) How many balls must be selected to ensure 3 balls of
the same color?
 One solution: consider the “worst” case
Consider 2 balls of each color
You can’t take another ball without hitting 3
Thus, the answer is 5
 Via generalized pigeonhole principle
How 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 = 3
What is the minimum N?
N=5 6
Rosen, section 4.2, question 4
A bowl contains 10 red and 10 yellow
balls
b) How many balls must be selected to
ensure 3 yellow balls?
 Consider the “worst” case
Consider 10 red balls and 2 yellow balls
You can’t take another ball without hitting 3
yellow balls
Thus, the answer is 13

7
Rosen, section 4.2, question 32
6 computers on a network are connected to at least 1
other computer
Show there are at least two computers that are have
the same number of connections

The number of boxes, k, is the number of computer


connections
 This can be 1, 2, 3, 4, or 5
The number of pigeons, N, is the number of computers
 That’s 6
By the generalized pigeonhole principle, at least one
box must have N/k objects
 6/5 = 2
 In other words, at least two computers must have the same
number of connections
8
Rosen, section 4.2, question 10
Consider 5 distinct points (xi, yi) with integer values, where i = 1,
2, 3, 4, 5
Show that the midpoint of at least one pair of these five points
also has integer coordinates

Thus, we are looking for the midpoint of a segment from (a,b) to


(c,d)
 The midpoint is ( (a+c)/2, (b+d)/2 )
Note that the midpoint will be integers if a and c have the same
parity: are either both even or both odd
 Same for b and d
There are four parity possibilities
 (even, even), (even, odd), (odd, even), (odd, odd)
Since we have 5 points, by the pigeonhole principle, there must
be two points that have the same parity possibility
 Thus, the midpoint of those two points will have integer coordinates

9
More elegant applications
Not going over…

10
Quick survey
 I felt I understood the material in this
slide set…
a) Very well
b) With some review, I’ll be good
c) Not really
d) Not at all

11
Quick survey
 The pace of the lecture for this
slide set was…
a) Fast
b) About right
c) A little slow
d) Too slow

12
Quick survey
 How interesting was the material in
this slide set? Be honest!
a) Wow! That was SOOOOOO cool!
b) Somewhat interesting
c) Rather borting
d) Zzzzzzzzzzz

13
Today’s demotivators

14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy