SlideShare a Scribd company logo
1 of 14
1
The Pigeonhole
Principle
CS/APMA 202
Rosen section 4.2
Aaron Bloomfield
2
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
3
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
4
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
5
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
6
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
7
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
8
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
9
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
10
More elegant applications
Not going over…
11
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
12
Quick survey
 The pace of the lecture for this slide set was…
a) Fast
b) About right
c) A little slow
d) Too slow
13
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
14
Today’s demotivators

More Related Content

What's hot

Section 1.2 graphs of equations in two variables;intercepts; symmetry
Section 1.2 graphs of equations in two variables;intercepts; symmetry Section 1.2 graphs of equations in two variables;intercepts; symmetry
Section 1.2 graphs of equations in two variables;intercepts; symmetry Wong Hsiung
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principlenielsoli
 
Section 1.1 the distance and midpoint formulas
Section 1.1 the distance and midpoint formulas Section 1.1 the distance and midpoint formulas
Section 1.1 the distance and midpoint formulas Wong Hsiung
 
Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Wong Hsiung
 
11.5 Independent and Dependent Events
11.5 Independent and Dependent Events11.5 Independent and Dependent Events
11.5 Independent and Dependent Eventssmiller5
 
Rough sets and fuzzy rough sets in Decision Making
Rough sets and  fuzzy rough sets in Decision MakingRough sets and  fuzzy rough sets in Decision Making
Rough sets and fuzzy rough sets in Decision MakingDrATAMILARASIMCA
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityKiran Munir
 
SAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptxSAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptxvictormiralles2
 
quadraticequations-111211090004-phpapp02 (2).pdf
quadraticequations-111211090004-phpapp02 (2).pdfquadraticequations-111211090004-phpapp02 (2).pdf
quadraticequations-111211090004-phpapp02 (2).pdfAngelle Pantig
 
Group homomorphism
Group homomorphismGroup homomorphism
Group homomorphismNaliniSPatil
 
Chapter 4 260110 044531
Chapter 4 260110 044531Chapter 4 260110 044531
Chapter 4 260110 044531guest25d353
 
Onto Functions
Onto FunctionsOnto Functions
Onto Functions2IIM
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & DimensionManikanta satyala
 
Liner algebra-vector space-1 introduction to vector space and subspace
Liner algebra-vector space-1   introduction to vector space and subspace Liner algebra-vector space-1   introduction to vector space and subspace
Liner algebra-vector space-1 introduction to vector space and subspace Manikanta satyala
 
Integer multiplication puzzles
Integer multiplication puzzlesInteger multiplication puzzles
Integer multiplication puzzlesDavid Radcliffe
 

What's hot (20)

Section 1.2 graphs of equations in two variables;intercepts; symmetry
Section 1.2 graphs of equations in two variables;intercepts; symmetry Section 1.2 graphs of equations in two variables;intercepts; symmetry
Section 1.2 graphs of equations in two variables;intercepts; symmetry
 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principle
 
Section 1.1 the distance and midpoint formulas
Section 1.1 the distance and midpoint formulas Section 1.1 the distance and midpoint formulas
Section 1.1 the distance and midpoint formulas
 
Section 4.2 properties of rational functions
Section 4.2 properties of rational functions Section 4.2 properties of rational functions
Section 4.2 properties of rational functions
 
11.5 Independent and Dependent Events
11.5 Independent and Dependent Events11.5 Independent and Dependent Events
11.5 Independent and Dependent Events
 
Rough sets and fuzzy rough sets in Decision Making
Rough sets and  fuzzy rough sets in Decision MakingRough sets and  fuzzy rough sets in Decision Making
Rough sets and fuzzy rough sets in Decision Making
 
Combinations
CombinationsCombinations
Combinations
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,Countability
 
SAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptxSAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptx
 
quadraticequations-111211090004-phpapp02 (2).pdf
quadraticequations-111211090004-phpapp02 (2).pdfquadraticequations-111211090004-phpapp02 (2).pdf
quadraticequations-111211090004-phpapp02 (2).pdf
 
Group homomorphism
Group homomorphismGroup homomorphism
Group homomorphism
 
Chapter 4 260110 044531
Chapter 4 260110 044531Chapter 4 260110 044531
Chapter 4 260110 044531
 
Rsh qam11 ch02
Rsh qam11 ch02Rsh qam11 ch02
Rsh qam11 ch02
 
Vector spaces
Vector spaces Vector spaces
Vector spaces
 
Number theory lecture (part 1)
Number theory lecture (part 1)Number theory lecture (part 1)
Number theory lecture (part 1)
 
Onto Functions
Onto FunctionsOnto Functions
Onto Functions
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
 
Liner algebra-vector space-1 introduction to vector space and subspace
Liner algebra-vector space-1   introduction to vector space and subspace Liner algebra-vector space-1   introduction to vector space and subspace
Liner algebra-vector space-1 introduction to vector space and subspace
 
Integer multiplication puzzles
Integer multiplication puzzlesInteger multiplication puzzles
Integer multiplication puzzles
 
Polynomial Matrix Decompositions
Polynomial Matrix DecompositionsPolynomial Matrix Decompositions
Polynomial Matrix Decompositions
 

Similar to 20 pigeonhole-principle

THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION
THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION
THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION Alvin Obligacion
 
Simple probability
Simple probabilitySimple probability
Simple probability06426345
 
powerpoints probability.pptx
powerpoints probability.pptxpowerpoints probability.pptx
powerpoints probability.pptxcarrie mixto
 
Permutation Combination
Permutation Combination Permutation Combination
Permutation Combination RizwanManzoor15
 
Int Math 2 Section 4-4 1011
Int Math 2 Section 4-4 1011Int Math 2 Section 4-4 1011
Int Math 2 Section 4-4 1011Jimbo Lamb
 
Lesson 2.3 Mathematical Reasoning and Logic
Lesson 2.3 Mathematical Reasoning and LogicLesson 2.3 Mathematical Reasoning and Logic
Lesson 2.3 Mathematical Reasoning and LogicLanceAdrianBengalan
 
X12bPigeonHole.ppt
X12bPigeonHole.pptX12bPigeonHole.ppt
X12bPigeonHole.pptVishva4
 
Permutation and combinations
Permutation and combinationsPermutation and combinations
Permutation and combinationsRushabh Vora
 
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...SOURAV DAS
 
Aptitude Training - NUMBERS
Aptitude Training - NUMBERSAptitude Training - NUMBERS
Aptitude Training - NUMBERSAjay Chimmani
 
(7) Lesson 9.2
(7) Lesson 9.2(7) Lesson 9.2
(7) Lesson 9.2wzuri
 
Fine Tune Your Quantitative Skills
Fine Tune Your Quantitative SkillsFine Tune Your Quantitative Skills
Fine Tune Your Quantitative Skillsankits11
 
Combined topic 4
Combined topic 4Combined topic 4
Combined topic 4David Ramos
 
Basic Counting Law Discrete Math Power Point Presentaton
Basic Counting Law Discrete Math Power Point PresentatonBasic Counting Law Discrete Math Power Point Presentaton
Basic Counting Law Discrete Math Power Point Presentatonedzhoroevastudy
 
Day 1 - Law of Large Numbers and Probability (1).ppt
Day 1 - Law of Large Numbers and Probability (1).pptDay 1 - Law of Large Numbers and Probability (1).ppt
Day 1 - Law of Large Numbers and Probability (1).pptHayaaKhan8
 
Pigeonhole principle
Pigeonhole principlePigeonhole principle
Pigeonhole principleNivegeetha
 

Similar to 20 pigeonhole-principle (20)

Pigeon hole principle
Pigeon hole principlePigeon hole principle
Pigeon hole principle
 
Pigeon hole principle
Pigeon hole principlePigeon hole principle
Pigeon hole principle
 
THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION
THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION
THE PIGEON HOLE PRINCIPLE or also known as DRAWER PRINCIPLE BY ALVIN OBLIGACION
 
Simple probability
Simple probabilitySimple probability
Simple probability
 
powerpoints probability.pptx
powerpoints probability.pptxpowerpoints probability.pptx
powerpoints probability.pptx
 
Permutation Combination
Permutation Combination Permutation Combination
Permutation Combination
 
Int Math 2 Section 4-4 1011
Int Math 2 Section 4-4 1011Int Math 2 Section 4-4 1011
Int Math 2 Section 4-4 1011
 
Lesson 2.3 Mathematical Reasoning and Logic
Lesson 2.3 Mathematical Reasoning and LogicLesson 2.3 Mathematical Reasoning and Logic
Lesson 2.3 Mathematical Reasoning and Logic
 
X12bPigeonHole.ppt
X12bPigeonHole.pptX12bPigeonHole.ppt
X12bPigeonHole.ppt
 
Permutation and combinations
Permutation and combinationsPermutation and combinations
Permutation and combinations
 
Mat cat que
Mat cat queMat cat que
Mat cat que
 
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...
ISI CMI IMPORTANT AND COMPLICATED QUESTION WITH SOLUTION BY SOURAV SIR'S CLAS...
 
Cat,mat,gmat, questions
Cat,mat,gmat, questions Cat,mat,gmat, questions
Cat,mat,gmat, questions
 
Aptitude Training - NUMBERS
Aptitude Training - NUMBERSAptitude Training - NUMBERS
Aptitude Training - NUMBERS
 
(7) Lesson 9.2
(7) Lesson 9.2(7) Lesson 9.2
(7) Lesson 9.2
 
Fine Tune Your Quantitative Skills
Fine Tune Your Quantitative SkillsFine Tune Your Quantitative Skills
Fine Tune Your Quantitative Skills
 
Combined topic 4
Combined topic 4Combined topic 4
Combined topic 4
 
Basic Counting Law Discrete Math Power Point Presentaton
Basic Counting Law Discrete Math Power Point PresentatonBasic Counting Law Discrete Math Power Point Presentaton
Basic Counting Law Discrete Math Power Point Presentaton
 
Day 1 - Law of Large Numbers and Probability (1).ppt
Day 1 - Law of Large Numbers and Probability (1).pptDay 1 - Law of Large Numbers and Probability (1).ppt
Day 1 - Law of Large Numbers and Probability (1).ppt
 
Pigeonhole principle
Pigeonhole principlePigeonhole principle
Pigeonhole principle
 

Recently uploaded

Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightDelhi Call girls
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlkumarajju5765
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxolyaivanovalion
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 

Recently uploaded (20)

Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Punjabi Bagh 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girlCall Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
Call Girls 🫤 Dwarka ➡️ 9711199171 ➡️ Delhi 🫦 Two shot with one girl
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Carero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptxCarero dropshipping via API with DroFx.pptx
Carero dropshipping via API with DroFx.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 

20 pigeonhole-principle

  • 1. 1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield
  • 2. 2 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
  • 3. 3 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
  • 4. 4 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
  • 5. 5 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
  • 6. 6 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
  • 7. 7 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
  • 8. 8 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
  • 9. 9 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
  • 11. 11 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
  • 12. 12 Quick survey  The pace of the lecture for this slide set was… a) Fast b) About right c) A little slow d) Too slow
  • 13. 13 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