2x4a64 pigeonhole principle
TRANSCRIPT
-
7/24/2019 2x4a64 Pigeonhole Principle
1/14
11
The PigeonholeThe Pigeonhole
PrinciplePrincipleCS/APMA 202CS/APMA 202
Rosen section 4.2Rosen section 4.2Aaron BloomfieldAaron Bloomfield
-
7/24/2019 2x4a64 Pigeonhole Principle
2/14
2
The pigeonhole principleThe pigeonhole principle
Suppose a floc of pigeons fl! into a set ofSuppose a floc of pigeons fl! into a set ofpigeonholes to roostpigeonholes to roost
"f there are more pigeons than pigeonholes# then"f there are more pigeons than pigeonholes# thenthere must $e at least % pigeonhole that hasthere must $e at least % pigeonhole that hasmore than one pigeon in itmore than one pigeon in it
"f"f kk&% or more o$'ects are placed into&% or more o$'ects are placed into kk$o(es#$o(es#then there is at least one $o( containing t)o orthen there is at least one $o( containing t)o ormore of the o$'ectsmore of the o$'ects This is Theorem %This is Theorem %
-
7/24/2019 2x4a64 Pigeonhole Principle
3/14
*
Pigeonhole principle e(amplesPigeonhole principle e(amples
"n a group of *+, people# there must $e"n a group of *+, people# there must $e
t)o people )ith the same $irthda!t)o people )ith the same $irthda! As there are *++ possi$le $irthda!sAs there are *++ possi$le $irthda!s
"n a group of 2, -nglish )ords# at least"n a group of 2, -nglish )ords# at least
t)o )ords must start )ith the same lettert)o )ords must start )ith the same letter As there are onl! 2+ lettersAs there are onl! 2+ letters
-
7/24/2019 2x4a64 Pigeonhole Principle
4/14
4
eneralied pigeonhole principleeneralied pigeonhole principle
"f"f NNo$'ects are placed intoo$'ects are placed into kk$o(es# then$o(es# then
there is at least one $o( containingthere is at least one $o( containing NN//kko$'ectso$'ects This is Theorem 2This is Theorem 2
-
7/24/2019 2x4a64 Pigeonhole Principle
5/14
eneralied pigeonhole principleeneralied pigeonhole principle
e(amplese(amples
Among %00 people# there are at leastAmong %00 people# there are at least
%00/%2%00/%21 $orn on the same month1 $orn on the same month
3o) man! students in a class must there3o) man! students in a class must there
$e to ensure that + students get the same$e to ensure that + students get the same
grade one of A# B# C# 5# or 678grade one of A# B# C# 5# or 678 The 9$o(es: are the grades. Thus#The 9$o(es: are the grades. Thus# kk1 1
Thus# )e setThus# )e set NN//1 +1 + ;o)est possi$le
-
7/24/2019 2x4a64 Pigeonhole Principle
6/14
+
Rosen# section 4.2# =uestion 4Rosen# section 4.2# =uestion 4
A $o)l contains %0 red and %0 !ello) $allsA $o)l contains %0 red and %0 !ello) $alls
a7a7 3o) man! $alls must $e selected to ensure * $alls of3o) man! $alls must $e selected to ensure * $alls ofthe same color8the same color8
>ne solution? consider the 9)orst: case>ne solution? consider the 9)orst: case
Consider 2 $alls of each colorConsider 2 $alls of each color@ou cant tae another $all )ithout hitting *@ou cant tae another $all )ithout hitting *
Thus# the ans)er is Thus# the ans)er is
ia generalied pigeonhole principleia generalied pigeonhole principle
3o) man! $alls are re=uired if there are 2 colors# and one color3o) man! $alls are re=uired if there are 2 colors# and one color
must ha
-
7/24/2019 2x4a64 Pigeonhole Principle
7/14
,
Rosen# section 4.2# =uestion 4Rosen# section 4.2# =uestion 4
A $o)l contains %0 red and %0 !ello)A $o)l contains %0 red and %0 !ello)
$alls$alls
$7$7 3o) man! $alls must $e selected to3o) man! $alls must $e selected toensure * !ello) $alls8ensure * !ello) $alls8 Consider the 9)orst: caseConsider the 9)orst: case
Consider %0 red $alls and 2 !ello) $allsConsider %0 red $alls and 2 !ello) $alls
@ou cant tae another $all )ithout hitting *@ou cant tae another $all )ithout hitting *
!ello) $alls!ello) $alls
Thus# the ans)er is %*Thus# the ans)er is %*
-
7/24/2019 2x4a64 Pigeonhole Principle
8/14
D
Rosen# section 4.2# =uestion *2Rosen# section 4.2# =uestion *2
+ computers on a net)or are connected to at least %+ computers on a net)or are connected to at least %other computerother computer
Sho) there are at least t)o computers that are ha
-
7/24/2019 2x4a64 Pigeonhole Principle
9/14
Rosen# section 4.2# =uestion %0Rosen# section 4.2# =uestion %0
Consider distinct points Consider distinct points xxii## yyii7 )ith integer
-
7/24/2019 2x4a64 Pigeonhole Principle
10/14
%0
More elegant applicationsMore elegant applications
Eot going o
-
7/24/2019 2x4a64 Pigeonhole Principle
11/14
11
Quick surveyQuick survey
I felt I understood the material in thisI felt I understood the material in this
slide setslide set
a)a)
Very wellVery well
b)b) With some review, Ill be goodWith some review, Ill be good
c)c) Not reallyNot really
d)d) Not at allNot at all
-
7/24/2019 2x4a64 Pigeonhole Principle
12/14
12
Quick surveyQuick survey
The pace of the lecture for thisThe pace of the lecture for this
slide set wasslide set was
a)a)
astast
b)b) !bout right!bout right
c)c) ! little slow! little slow
d)d) Too slowToo slow
-
7/24/2019 2x4a64 Pigeonhole Principle
13/14
13
Quick surveyQuick survey
"ow interesting was the material in"ow interesting was the material in
this slide set# $e honest%this slide set# $e honest%
a)a)
Wow% That was &'''''' cool%Wow% That was &'''''' cool%
b)b) &omewhat interesting&omewhat interesting
c)c) (ather borting(ather borting
d)d) ********************
-
7/24/2019 2x4a64 Pigeonhole Principle
14/14
1414
Todays demotivatorsTodays demotivators