Discete M athematic Chapte 3: Coutig 3. The Pigeohole Piciple 3.4 Biomial Coefficiets D Patic Cha School of Compute Sciece ad Egieeig South Chia Uivesity of Techology Ageda Ch 3. The Pigeohole Piciple Pigeohole Piciple Geealized Pigeohole Piciple Applicatios Ch 3.4 Biomial Coefficiets Biomial Theoem Pascal's Idetity ad Tiagle Theoem elated to Biomial Coefficiets
Pigeohole Piciple Suppose that a floc of 6 pigeos flies ito a set of 5 pigeoholes to oost What ca we coclude? 3 Pigeohole Piciple A least oe of these 5 pigeoholes must have at least two pigeos i it Because thee ae 6 pigeos but oly 5 pigeoholes This is Pigeohole Piciple 4
Pigeohole Piciple Pigeohole Piciple If is a positive itege ad + 1 o moe objects ae placed ito boxes, the thee is at least oe box cotaiig two o moe of the objects Also called the Diichlet Dawe Piciple the ieteeth-cetuy Gema mathematicia Diichlet Poof by cotapositio (p q q p) Suppose that oe of the boxes cotais moe tha oe object The the total umbe of objects would be at most This is a cotadictio 5 Pigeohole Piciple Coollay A fuctio f fom a set with + 1 o moe elemets to a set with elemets is ot oeto-oe a b c d 1 3 6
Pigeohole Piciple Example 1 How may wods we should have if thee must be at least two that begi with the same lette? 7 Eglish wods, because 6 lettes i the Eglish alphabet Example How may people we should have if thee must be at least two with the same bithday? 367 people because 366 possible bithdays 7 Geealized Pigeohole Piciple Pigeohole Piciple states that if + 1 o moe objects ae placed ito boxes, the thee is at least oe box cotaiig two o moe of the objects How about if we have + 1 objects? 3 + object? + 1 object? 8
Geealized Pigeohole Piciple Geealized Pigeohole Piciple If N objects ae placed ito boxes, the thee is at least oe box cotaiig at least N/ objects Poof by Cotadictio Suppose that oe of the boxes cotais moe tha N/ - 1 objects The total umbe of objects is at most N 1 N < + 11 N N/ < (N/) + 1 This is a cotadictio because thee ae a total of N objects 9 Geealized Pigeohole Piciple A commo type of poblem ass fo the miimum umbe of objects such that at least of these objects must be i oe of boxes whe these objects ae distibuted amog the boxes? 1
Geealized Pigeohole Piciple Accodig to geealized pigeohole piciple, whe we have N objects, thee must be at least objects i oe of the boxes as log as N/ N, whee N ( - 1) + 1, is the smallest itege satisfyig N/ N? 11 Geealized Pigeohole Piciple N/, N ( - 1) + 1, is the smallest itege satisfyig N/ Could a smalle value of N suffice? No If ( - 1) objects We could put - 1 of them i each of the boxes No box would have at least objects 1
Geealized Pigeohole Piciple Example 1 N/ N ( - 1) + 1 How may people out of 1 people wee bo i the same moth? N 1 1? 1/1 9 who wee bo i the same moth 13 Geealized Pigeohole Piciple Example What is the least umbe of aea codes eeded to guaatee that the 5 millio phoes i a state ca be assiged distict 1-digit telephoe umbes? Assume that telephoe umbes ae of the fom NXX-NXX- XXXX, whee the fist thee digits fom the aea code, N epesets a digit fom to 9 iclusive, ad X epesets ay digit. Diffeet phoe umbes fo NXX-XXXX is 8 x 1 6 8,, N 5,,, 8,, At least 5,, / 8,, 4 of them must have idetical phoe umbes Hece, at least fou aea codes ae equied N/ N ( - 1) + 1 14
Geealized Pigeohole Piciple Example 3 Show that amog ay + 1 positive iteges ot exceedig thee must be a itege that divides oe of the othe iteges Assume we have + 1 iteges a 1, a,..., a +1 j Let a j q fo j 1,,..., + 1, j whee j is a oegative itege ad q 1, q,..., q +1 ae all odd positive iteges less tha Accodig to pigeohole piciple, because oly odd positive iteges less tha, two of the iteges q 1, q,..., q +1 must be equal Let q be the commo value of q i ad q j, the, j a q j It follows that if i < j, the a i divides a j ; othewise a j divides a i N/ N ( - 1) + 1 a j a i a i j i i q q q ad j i 15 Applicatios: Subsequece Suppose that a 1, a,..., a N is a sequece of eal umbes. A subsequece of this sequece is a sequece of the fom a i, ai,..., a 1 i m whee 1 < i 1 < i <... < i m < N 16
Applicatios: Subsequece Example Example: a 1, a,..., a 5 5, 8,, 3, 1 5, 3, 1 is a subsequece? 8, 1 is a subsequece?, 3, 5, 8 is a subsequece? a 1, a 4, a 5 a, a 5 a 3, a 4, a 1, a 17 Applicatios: Subsequece A sequece is called stictly iceasig if each tem is lage tha the oe that pecedes it A sequece is called stictly deceasig if each tem is smalle tha the oe that pecedes it 18
Applicatios: Subsequece Theoem Evey sequece of + 1 distict eal umbes cotais a subsequece of legth + 1 that is eithe stictly iceasig o stictly deceasig Example Give a sequece: 8, 11, 9, 1, 4, 6, 1, 1, 5, 7 1 tem 3 + 1 What is the legth of the logest i / deceasig subsequeces? +1 4 Iceasig sequece 1, 4, 6, 1 1, 4, 6, 7 1, 4, 6, 1 1, 4, 5, 7 Deceasig sequece 11, 9, 6,5 19 Applicatios: Subsequece Poof Let a a,..., eal umbes, a + 1 1 be a sequece of + 1 distict Associate a odeed pai (i, d ) to the tem a, whee i is the legth of the logest iceasig subsequece statig at a d is the legth of the logest deceasig subsequece statig at a 5, 8,, 3, 1 (i 1, d 1 ) (, 3) (i 4, d 4 ) (1, )
Applicatios: Subsequece Poof Suppose o iceasig o deceasig subsequeces is loge tha i ad d ae both positive iteges less tha o equal to, fo 1,,..., + 1 By the poduct ule, possible odeed pais fo (i, d ) By the pigeohole piciple two of + 1 odeed pais ae equal Theefoe, thee exist tems a s ad a t, with s < t such that i s i t ad d s d t 1 Applicatios: Subsequece Poof Thee exist tems a s ad a t, with s < t such that i s i t ad d s d t We will show that this is impossible Because the tems of the sequece ae distict, eithe a s < a t o a s > a t If a s < a t, the, because i s i t, a iceasig subsequece of legth i t + 1 ca be built statig at a s, by taig as followed by a iceasig subsequece of legth it begiig at a t This is a cotadictio, a s,, a t, 5, 8,, 3, 1 (, 3) (1, ) Similaly, if a s > a t, it ca be show that d s must be geate tha d t, which is a cotadictio
Applicatios: Ramsey Theoy Ramsey theoy, afte the Eglish mathematicia F. Ramsey, deals with the distibutio of subsets of elemets of sets Two people eithe fieds o eemies A B A B Fieds Eemies Mutual Fied/Eemies A B A B A B C D ae mutual fieds/eemies C D C D 3 Applicatios: Ramsey Theoy Example 1 Assume that i a goup of six people Show that thee ae eithe thee mutual fieds o thee mutual eemies i the goup A B C D E F 4
Applicatios: Ramsey Theoy Example 1 Let A be oe of the six people Accodig to pigeohole piciple ( 5/ 3), A at least has thee fieds, o thee eemies Fome Case: suppose that B, C, ad D ae fieds If ay two of these thee people ae fieds, the these two ad A fom a goup of thee mutual fieds Othewise, B, C, ad D fom a set of thee mutual eemies Simila to the latte case A B C D E F 5 Applicatios: Ramsey Theoy Ramsey umbe R(m, ) The miimum umbe of people at a paty such that thee ae eithe m mutual fieds o mutual eemies, assumig that evey pai of people at the paty ae fieds o eemies m ad ae positive iteges geate tha o equal to Example What is R(3, 3)? Aswe should be 6 I a goup of five people whee evey two people ae fieds o eemies, thee may ot be thee mutual fieds o thee mutual eemies 6
7 Applicatios: Ramsey Theoy 5 people caot guaatee havig 3 mutual fieds/eemies C B A D E 8 Biomial Theoem Let x ad y be vaiables, ad let be a oegative itege The Biomial Theoem shows: ( ) y x+ j j j y x j y x y x y x + + +... 1 1 1
Biomial Theoem Example What is the coefficiet of x 1 y 13 i the expasio of (x - 3y) 5? ( x+ ( 3y) ) 5 ( x) j ( 3y) j 5, -1 13 5 j 5 5 j 5 13 ( ) 1 ( 3) 13 5! 1 3 13 13! 1! 9 Biomial Theoem Coollay 1 Let be a oegative itege. The Poof ( 1+ 1) 1 1 3
31 Biomial Theoem Coollay Let be a positive itege. The Poof It implies that 1) ( ( ) 1 1) ( + 1 1) ( 1) (... 5 3 1... 4 + + + + + + 3 Biomial Theoem Coollay 3 Let be a oegative itege. The Poof 3 1 ) 1 ( + (3)
Pascal's Idetity ad Tiagle Pascal s Idetity Let ad be positive iteges with. The + 1 + 1 Pascal's tiagle A geometic aagemet of the biomial coefficiets i a tiagle biomial coefficiet is the sum of two adjacet biomial coefficiets i the pevious ow 1C C 1 1 1 C 1 1 1 1 1 1 3 3 1 1 4 6 4 1 1 5 1 1 5 1 33 Pascal's Idetity ad Tiagle Poof +1C C -1 + C Suppose T is a set cotaiig + 1 elemets Let a be a elemet i T, ad let S T - {a} Thee ae +1 C subsets of T cotaiig elemets +1 C subsets cotais eithe ( C -1 ) - 1 elemets of S ad a, o ( C ) elemets of S ad ot a Theefoe, +1 C C -1 + C a +1 C C -1 T a S C 34
Theoem elated to Biomial Coefficiets Vademode s Idetity Theoem: Vademode s Idetity Let m,, ad be oegative iteges with ot exceedig eithe m o. The m+ m 35 Theoem elated to Biomial Coefficiets Vademode s Idetity m+ Poof Suppose: m items i a fist set ad items i a secod set The total umbe of ways to pic elemets fom the uio of these sets is m+ C Aothe way is to pic elemets fom the fist set ad the - elemets fom the secod set, whee is a itege with Thee ae m C C - ways +3 C Theefoe, m+ m m C - C m C C m m C 1 C 1 mc C 36
37 Theoem elated to Biomial Coefficiets Vademode s Idetity Coollay If is a oegative itege, the 38 Theoem elated to Biomial Coefficiets Vademode s Idetity Poof Recall, Theefoe,
Theoem elated to Biomial Coefficiets Theoem Let ad be oegative iteges with. The 1 + 1 + j j Theoem elated to Biomial Coefficiets Poof: Coside +1 C +1 couts the bit stigs of legth + 1 cotaiig + 1 oes 1111... +1 bits cotai +1 1s Aothe coutig way is to coside the possible locatios, amed, of the fial 1 should equal to + 1, +,..., o + 1 +1 +1 111...11-1 bits cotai 1s 1 + 1 + j 39 j 4
Theoem elated to Biomial Coefficiets Coside the fist -1 bits I this -1 bits, thee should be 1s Thee ae -1 C ways 111...11-1 bits cotai 1s Recall, +1 +1 + 1 + 1 1 j j 1 + 1 + j By the chage of vaiables j - 1 j 41