The Pigeonhole Principle

Slides:



Advertisements
Similar presentations
The Pigeon hole problem
Advertisements

Lecture 4 4.1,4.2 Counting. 4.1 Counting Two Important Principles: Product Rule and Sum Rule. Product Rule: Assume we need to perform procedure 1 AND.
Counting. Counting = Determining the number of elements of a finite set.
The Pigeonhole Principle
COUNTING AND PROBABILITY
Application: The Pigeonhole Principle Lecture 37 Section 7.3 Wed, Apr 4, 2007.
Recursively Defined Functions
after UCI ICS/Math 6A, Summer Counting-1 Counting: Product and Sum Rules Product Rule: Assuming a)We need to.
3.3 The Characteristic function of the set  function from universal set to {0,1}  Definition 3.6: Let U be the universal set, and let A  U. The characteristic.
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
The Pigeonhole Principle
Copyright © Zeph Grunschlag, Counting Techniques Zeph Grunschlag.
CSE115/ENGR160 Discrete Mathematics 04/10/12
CSE 321 Discrete Structures Winter 2008 Lecture 16 Counting.
Pigeonhole.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
1 The Pigeonhole Principle CS/APMA 202 Rosen section 4.2 Aaron Bloomfield.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
CS100 : Discrete Structures
Combinatorics 3/15 and 3/ Counting A restaurant offers the following menu: Main CourseVegetablesBeverage BeefPotatoesMilk HamGreen BeansCoffee.
Fall 2015 COMP 2300 Discrete Structures for Computation
Counting. Product Rule Example Sum Rule Pigeonhole principle If there are more pigeons than pigeonholes, then there must be at least one pigeonhole.
Chapter The Basics of Counting 5.2 The Pigeonhole Principle
1 Lecture 3 (part 2) Functions – Pigeonhole Principle Reading: Epp Chp 7.4.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
September1999 CMSC 203 / 0201 Fall 2002 Week #8 – 14/16 October 2002 Prof. Marie desJardins.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Counting CSC-2259 Discrete Structures Konstantin Busch - LSU1.
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,
5.2 The Pigeonhole Principle
Counting.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
1 Chapter 2 Pigeonhole Principle. 2 Summary Pigeonhole principle –simple form Pigeonhole principle –strong form Ramsey’s theorem.
1 The Pigeonhole Principle CS 202 Epp section 7.3.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
Introduction Suppose that a password on a computer system consists of 6, 7, or 8 characters. Each of these characters must be a digit or a letter of the.
The Pigeonhole Principle Alan Kaylor Cline. The Pigeonhole Principle Statement Children’s Version: “If k > n, you can’t stuff k pigeons in n holes without.
1 The Pigeonhole Principle CS 202 Epp section ??? Aaron Bloomfield.
CS 104: Discrete Mathematics
The Pigeonhole Principle. Pigeonhole principle The pigeonhole principle : If k is a positive integer and k+1 or more objects are placed into k boxes,
Pigeonhole Principle – Page 1CPTR311 – Discrete Structures CPTR311 Discrete Structures Pigeonhole Principle Reading: Kolman, Section 3.3.
Pigeonhole Principle. If n pigeons fly into m pigeonholes and n > m, then at least one hole must contain two or more pigeons A function from one finite.
Discrete Mathematics. Exercises Exercise 1:  There are 18 Computer Science (CS) majors and 325 Business Administration (BA) majors at a college.
Section The Pigeonhole Principle If a flock of 20 pigeons roosts in a set of 19 pigeonholes, one of the pigeonholes must have more than 1 pigeon.
Main Menu Main Menu (Click on the topics below) Pigeonhole Principle Example Generalized Pigeonhole Principle Example Proof of Pigeonhole Principle Click.
ICS 253: Discrete Structures I Counting and Applications King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Chapter 5 Counting 歐亞書局.
Section The Product Rule  Example: How many different license plates can be made if each plate contains a sequence of three uppercase English letters.
COUNTING Discrete Math Team KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) 1.
The Pigeonhole Principle
ICS 253: Discrete Structures I
Chapter 5, Section 5.1 The Basics of Counting
Copyright © Zeph Grunschlag,
The Pigeonhole Principle
Discrete Structures for Computer Science
COCS DISCRETE STRUCTURES
The Pigeonhole Principle
Copyright © Zeph Grunschlag,
CS100: Discrete structures
COUNTING AND PROBABILITY
The Pigeonhole Principle
CS 220: Discrete Structures and their Applications
The Pigeonhole Principle
The Pigeon hole problem
Representations of Integers
The Pigeonhole Principle
Presentation transcript:

The Pigeonhole Principle 4/14/2017 Section 4.2 The Pigeonhole Principle sec4pt2

The Pigeonhole Principle … states that, if there are more pigeons than there are pigeonholes, there must be at least one pigeonhole with 2 pigeons in it More formally: if k+1 objects are placed in k boxes, there is at least one box containing 2 or more objects

Applying the pigeonhole principle to counting problems Among any group of 367 people, at least 2 must have the same birthday In any group of 27 English words, at least 2 must start with the same letter

Example 1 A drawer contains 12 black socks and 12 blue socks. Your professor takes socks out of the drawer at random, in the dark. How many must she remove to guarantee at least one matched pair? How many to guarantee at least 2 black socks? The answers are 3 and 14, respectively

Example 2 During a month with 30 days, a baseball team plays at least 1 game a day, but no more than 45 games in the month. Show that there must be a period of some number of consecutive days during which the team must play exactly 14 games

Example 2 Let aj = number of games played on or before day j (of the 30-day month) Then a1, a2, … a30 is an increasing sequence of distinct positive integers with 1<=aj<=45 (sequence 1) And a1+14, a2+14, a3+14 and so forth is also an increasing sequence of positive integers, with 15<=aj+14<=59 (sequence 2)

Example 2 The 60 integers from a1, a2, … , a30 and from a1+14, a2+14, … , a30+14 are all less than or equal to 59 (since a30 <= 45) Hence, by the pigeonhole principle, at least 2 of these integers are equal (59 pigeonholes, 60 “pigeons” Since the integers in the 2 sequences are all distinct, there must be indices i and j with ai=aj+14 - so there are exactly 14 games played from day j+1 to day i

Example 3 Show that among n+1 positive integers less than or equal to 2n, there must be an integer that divides one of the other integers The n+1 integers are: a1, a2, … an, an+1 Each of these integers can be written as a power of 2 times an odd integer (odd*2 is even; odd*20 is odd)

Example 3 So, let aj = 2kjqj for: j=1, 2, …, n+1 kj is a non-negative integer qj is an odd integer The integers q1, q2, … qn+1 are all odd positive integers <= 2n (this must be true if aj is a product of qj and some power of 2)

Example 3 Since there are only n odd positive integers less than 2n, the pigeonhole principle holds that 2 of the q’s must be equal - in other words, there are two integers i and j such that qi = qj If we represent this common value as q, then ai = 2kiq and aj = 2kjq It follows then that if ki<kj, ai divides aj, and if ki>kj, aj divides ai

Pigeonholes & subsequences Can use the pigeonhole principle to show the existence of a subsequence of a certain length within a sequence of distinct integers For a sequence of the form: a1, a2, … , aN a subsequence is a sequence of the form: ai1,ai2, … ,aim where 1<=i1< i2< … < im<=N So if we have this sequence: 2, 4, 6, 8; some subsequences are: 2,4; 4,6,8; 2,8 (we include terms in original order, but can skip terms)

Subsequences A subsequence is strictly increasing if each term is larger than the preceding term, and strictly decreasing if each is smaller than its predecessor There is a theorem which states: every sequence of n2+1 distinct real numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing

Example 4 For example, the sequence: 11, 2, 23, 14, 15, 81, 90, 4, 3, 5 has length 10, so n=3 (10 = 32+1) According to the theorem, there is a subsequence of length 4 that is either strictly increasing or decreasing There are several examples of both, including: 11, 23, 81, 90 (increasing) 23, 15, 4, 3 (decreasing)

Generalized pigeonhole principle If N objects are placed into k boxes, then there is at least one box containing at least N/k objects Examples of application of the principle: Among 100 people there are at least 100/12, or 9 people who share a birth month Minimum number of students needed to guarantee that at least 3 receive the same grade (A,B,C,D or F) would be the smallest number N such that N/5 = 3; that would be 11

Example 5 What is the least number of area codes needed to guarantee that 25 million phones in a state have distinct 10-digit numbers under the NXX-NXX-XXXX scheme? Where N = 2..9 And X = 0..9

Example 5 There are 8*10*10*10*10*10*10=8,000,000 different 7-digit numbers of the form NXX-XXXX So, for 25,000,000 telephones, at least 25,000,000/8,000,000 = 4 will have identical 7-digit numbers - therefore, 4 area codes are needed

Generalized pigeonhole principle & Ramsey Theory - example 6 Ramsey theory: in a group of 6 people, in which each pair consists of 2 friends or 2 enemies, there must be 3 mutual friends or 3 mutual enemies in the group (assuming anyone who is not a friend is an enemy) We can use the generalized pigeonhole principle to prove this theory

Example 6 Let A be one of the 6 - of the other 5, 3 or more are either friends or enemies of A (because by the generalized pigeonhole principle, when 5 objects are divided into 2 sets, one set has at least 5/2 = 3 elements) Suppose that B, C and D are friends of A If any 2 of these 3 are friends, then that pair + A make 3 mutual friends If they are not friends, then they are mutual enemies - so theory is proven

The Pigeonhole Principle - ends - Section 4.2 The Pigeonhole Principle - ends -