Week05Lecture Pigeonhole Principle
Week05Lecture Pigeonhole Principle
Dr Aamir Hashmi
Email: [email protected]
Office Hours:
-My office:
Tuesday: 14:00 – 15:30
Cabin-3, F-102, B-Building
Wednesday: 1230 – 1400
Thursday: 14:00 – 15:30
Friday: 15:00 – 17:00
or by appointment (email)
Announcements
• Assignment-1 due on Wednesday (Nov 18)
• Help videos are there on YouTube
• Instructions for Assignment Submission:
Submit hand-written assignments only (you will get ZERO for types assignment)
All pages/Questions are in order (10 marks will be deducted if not in order)
No Late submission. STRICTLY
Submission in Class ONLY – NO SUBMISSION in OFFICE
(if you do not have class on Wednesday, submit on Thursday)
If your Assignment is found copied (even some parts of it), you will get ZERO marks
--------------
There will be Quiz -3 in next class (on Combination, Permutation, PIE)
Recap
Principle of Inclusion-Exclusion (PIE)
Pigeonhole Principle
PHP
Let us try to solve the simpler ones?
You have one minute to answer
A Pair of Socks
Assume you have 10 orange socks and 10 blue socks
and you want to find a matching pair of socks from a
random pick. You will only need to pick three socks.
Let us try to solve the simpler ones?
You have one minute to answer
A Suit of Cards
Pick 5 cards from a standard deck of 52 cards, and at least two
cards will be of the same suit.
Let us try to solve the simpler ones?
You have one minute to answer
Hair: Two or more people in Lahore have
the same number of hair on their heads
At any given time in Lahore City there live at least two
people who have the same amount of hairs on their head
Let us try to solve the simpler ones?
You have one minute to answer
• and so on.
Pigeonhole Principle---
(Section 2.4 of textbook)
Imagine 500,001 enormous boxes (or pigeon holes)
The first one is labeled “Lahoris having 0 strands of hair,”
• and so on.
• and so on.
How many students to guarantee that at least 3 should receive the same score?
0 - 1 – 2 – 3 – 4 …. – 100 – 0 – 1 – 2 – 3 – 4 … – 100 – x
Examples: PHP --- Do it by yourself
• EXAMPLE 4
• How many students must be in a class to guarantee that at least 5 students
receive the same score on the final exam, if the exam is graded on a scale
from 0 to 100 points?
4*101 + 1 = 405
Examples: PHP --- Do it by yourself
•
EXAMPLE 5
How many people should be there to guarantee that 9 people are born in
same month?
12*8 + 1 = 97
============================================================
Among 100 people there are at least who were born in the same month.
Examples: PHP --- Do it by yourself
•
EXAMPLE 6
What is the minimum number of students required in a discrete mathematics
class to be sure that at least six will receive the same grade, if there are five
possible grades A, B, C, D, and F?
b) How many must be selected to guarantee that at least three hearts are
selected?
Examples: PHP --- Do it by yourself
•
EXAMPLE 7
a) How many cards must be selected from a standard deck of 52 cards to
guarantee that at least three cards of the same suit are chosen?
b) How many must be selected to guarantee that at least three hearts are
selected?
We come across problems like these?
(We shall find the solution at the end of the lecture)
If you pick 5 integers from 1 to 8, you will definitely find two of
them must add up to 9.
Pythagorous
theorem:
YouTube Videos: (to help you in lecture slides and book–reading)
• Click here: YouTube Playlist
• Stay Safe and Healthy
Xie Xie!!!
Note:
Assignment-1 Deadline: Wednesday – in class
Quiz: 1st class of next week (Combinations, Permutations, PIE)
MORE PRACTICE
PROBLEMS
Do it by yourself
Try to solve this one?
•
EXAMPLE 8
What is the least number of area codes needed to guarantee that the 25
million phones in a state can be assigned distinct 10-digit telephone
numbers?
(Assume that telephone numbers are of the form NXX-NXX-XXXX, where the
first three digits form the area code, N represents a digit from 2 to 9 inclusive,
and X represents any digit.)
NXX-XXXX
Examples: PHP --- Do it by yourself
Examples: PHP --- Do it by yourself
Examples: PHP --- Do it by yourself
Try it at your own:
Pigeonhole Principle
Try it at your own:
Pigeonhole Principle
Try it at your own:
Pigeonhole Principle
Try it at your own:
Pigeonhole Principle
Try it at your own:
Pigeonhole Principle
If you pick 5 integers from 1 to 8, you will definitely find two
of them must add up to 9.
1,8
2,7
3,6
4,5
Try it at your own:
Pigeonhole Principle
If you pick 5 integers from 1 to 8, you will definitely find two
of them must add up to 9.
No matter which integer you choose, you can always pair it with another integer from 1 to 8 to sum to 9.
Thus, there are four such pairs overall:
We are going to stuff five pigeons (chosen integers) into four pigeonholes (pairs).
Shaking Hands
There are n people in a party and n is more than 1 so they
can shake hands with one another at will.
You will always find two people who shake hands with the
same number of people.
Try it at your own:
Pigeonhole Principle
Do I Know You?
• In a room with n people in it, there must be at least two
people who know the same number of people.