MATH4455 Module 10 Even, Odd nd End Min Mth Conept: Prity, Ple Vlue Nottion, Enumertion, Story Prolem Auxiliry Ide: Tournment, Undireted grph I. The Mind-Reding Clultor Prolem. How doe the mind-reding lultor do the following trik: Pik eret polynomil p(x) with non-negtive integer oeffiient. Chooe integer > p(1) nd ompute m = p(). You tell me nd m, whih I enter into my lultor nd the lultor then determine your ext polynomil. How doe the lultor do it? Solution. Sine > p(1) = (um of the oeffiient), then i igger thn ll of the oeffiient. If m = f(), it follow tht the oeffiient of p(x) re the digit in the e repreenttion of m. For exmple, if = 10, then knowing tht p(10) = 30213 = (3)10 4 + 2(10 2 ) + 1(10 1 ) + 3 nd tht ll the oeffiient re le thn 10, implie the only poile polynomil i p(x) = 3x 4 + 2x 2 + x + 3. For nother exmple not uing 10, uppoe = 20 nd M = f(20) = 49665 = 0 + 20 1 + 20 2 2 +... + 20 k k nd thu the digit of 49665 in e 20 re k k 1... 1 0. In order to find the digit of 49665 in e 20 we do ueive diviion 49665 = 20 * 2483 + 5 o 0 = 5 2483 = 20 *124 + 3 o 1 = 3 124 = 20 * 6 + 4 o 2 = 4 6 = 20 * 0 + 6 o 3 = 6 Thu the integer 49665 written in e 20 i 6 4 3 5 nd o f ( x ) = 6x 3 + 4x 2 + 3x + 5. In other word, the only polynomil, with non-negtive integer oeffiient le thn 20, for whih f(20) = 49665, i 6x 3 + 4x 2 + 3x + 5 Of oure the mind-reding lultor i jut running progrm whih tke input nd m nd then ompute the e digit of m, y ueive diviion. A verion of thi trik for younger tudent might retrit the oeffiient to ingle digit, in whih e the polynomil ould e determined from only f(10), nd in n oviou wy, without uing lultor. Notie tht the requirement for > p(1) nnot e omitted, ine without it there ould e more thn one polynomil tht work, e.g. we ould hve p (10) = 6435 with p(x) = 6x 3 + 4x 2 + 3x + 5 ut lo with p(x) = 64x 2 + 35 nd mny other. A prolem on the finl explore thi little more. II. April Mdne A ingle elimintion tournment men tournment in whih ny plyer (or tem) who loe one i eliminted, nd one hmpion i rowned t the end. For exmple, the NCAA ketll tournment i ingle elimintion tournment in whih eh gme h k = 2 plyer (tem), with one winner nd 2 1 = 1 loer. In generl, we let k denote the numer of plyer per gme, of whih 1 i winner nd (k-1) re eliminted from the tournment. Beue it i the mot fmilir type of gme, nd lo implet to nlyze, we egin with k = 2.
Prolem (2 plyer gme i.e. k = 2). Suppoe we wnt to orgnize ingle elimintion he tournment for N plyer. For whih vlue of N i thi poile if (i) ll plyer mut ply in the firt round. (ii) ny numer of firt round ye my e offered, ut no other ye re offered. In eh e, determine the numer of round, the numer of ye, nd the numer of gme. Solution. (i). The finl hmpionhip round h only one gme in order to rown winner, o there re two plyer in the finl, whih men tht there two winner in the previou round. Hene there were two gme, nd thu two loer in the emi-finl, for totl of four plyer in the emi-finl. Similrly, eh previou round h doule the numer of plyer the next round, nd o the totl numer of tem plying in eh round i power of 2. Sine ll plyer mut ply in the firt round, then the numer of plyer mut e power of 2 For exmple, the Wimledon Tenni Tournment i ingle elimintion tournment for 64 = 2 6 plyer in whih everyone ply in the firt round. There re 6 round, t the end of whih, 63 plyer hve lot mth nd one i the hmpion. So the numer of mthe in the whole tournment i 1 + 2 + 2 2 +...+ 2 5 = 26 n 1 1 = 63 = 64 1 whih give n ey wy to undertnd why 2i = 2 n 1. 2 1 In generl, with N = 2 r plyer, there re r round nd N 1 gme. (ii) Let trt with fmilir exmple. In the Ntionl Footll Legue, N =12 tem get into the tournment, of whom B = 4 re given firt round ye whih men tht they utomtilly mke it into the eond round. The other 8 tem ply 4 gme in the firt round, leving four winner moving to the eond round, nd hene 8 tem (4 winner plu 4 ye) plying in round 2. Sine 8 i power of 2, the ret of the tournment i tndrd ingle elimintion tournment from tht point on. There re 12 1 = 11 gme ltogether (ine 11 tem eh loe one gme); y round, the gme numer re 1 + 2 + 4 + 4 = 11, o there re four round. In generl, if ine we re not offering ye fter the firt round, then the eond round mut hve 2 r 1 plyer remining, where r i the numer of round. Then 2 r 1 < N 2 r. If N i power of 2, (i.e. N = 2 r, then we hve tournment with no ye, r round, nd N 1 gme in (i). Otherwie, let L = N 2 r 1, then L i the numer of loer in the firt round ine there mut e 2 r 1 remining plyer fter the firt round. With k = 2, L i lo the numer of gme G1 in the firt round, nd the numer of plyer who ply in the firt round i C = 2 L = 2N 2 r. So the numer of ye i B = N C = N (2N 2 r ) = 2 r N, nd the totl numer of gme i G = N 1. Thu, for ny poitive N, there i unique tournment truture: Let r e the let integer with N 2 r. Then r will e the numer of round. The numer of firt round ye i B = 2 r N, nd then C = N B = 2N 2 r plyer ply in round 1. After the firt round, whih onit of G1 = C/2 = N 2 r 1 the numer of remining plyer i (# winner in round 1 + # ye) = C/2 + B = N 2 r 1 + 2 r N = 2 r 2 r 1 = 2 r 1 (2 1) = 2 r 1 nd the ret of the tournment onit of (r 1) omplete round. Totl numer of gme i G = N -1. i=0
Prolem. Suppoe tht we orgnize ingle elimintion Jeoprdy tournment, in whih eh gme h k = 3 plyer with one winner nd two loer. For whih vlue of N n we hve ingle elimintion tournment with N plyer (i) if no plyer reeive ye. (ii) if ny numer of firt round ye my e offered, ut no other ye re offered. In eh e, determine the numer of round, the numer of ye, nd the numer of gme. Solution. (i) The finl h 3 plyer, o the emi-finl h 3 winner nd hene 3 x 3 = 9 plyer, the qurter finl h 9 winner nd hene 9 x 3 = 27 plyer, et. So the numer of plyer N mut e power of 3, nd for N = 3 r, there will e r round with no ye. The numer G of gme will e G = 1+ 3 + 3 2 +...+ 3 r 1 = 3r 1 3 1 = N 1 2. (ii) Firt, we note tht, regrdle of the numer of ye, eh gme h two loer. Sine eh plyer exept the finl hmpion loe extly one, then N = 2G + 1. Thu N mut e odd, nd G = (N-1)/2. Let try n exmple to get feel for the omputtion, y N = 67. Cn we rrnge uh tournment uing firt round ye? The eond round mut hve power-of-3 mny plyer, whih in thi e mut e e 27 (we n t get down to 9 winner in one round if we trt with 67 plyer, o the numer 27 i uniquely determined). Thu there mut e L = 67 27 = 40 loer in the firt round, whih men tht the firt round will hve G1 = 40 / 2 = 20 gme. Then there mut e C = 20 x 3 = 60 plyer in the firt round, nd hene the numer of ye i B = 67 60 = 7. After the firt round, there re 20 winner plu 7 ye remining to ply in Round 2, for totl of 27, deired. So we n do it with N = 67, nd there will e G = (N-1)/2 =33 gme ltogether. In generl, let N e ny odd poitive integer. Chooe r minimlly uh tht 3 r N. Let L = N - 3 r 1, then L i even, nd G1 = L / 2 will e the numer of gme in the firt round, with L loer nd G1 = L / 2 = (N 3 r 1 ) / 2 winner. There will e C = 3 G1 = (3N 3 r ) / 2 plyer in the firt round, nd hene the numer of ye i B = N C = N (3N 3 r ) / 2 = (3 r N) / 2. After the firt round, the numer of plyer remining i (# firt round winner( + ( # ye), i.e. G1 + B = (N 3 r 1 ) / 2 + (3 r N) / 2 = (3 r 3 r 1 ) / 2 = 3 r 1 (3 1) / 2 = 3 r 1. The ret of the tournment h (r 1) omplete round, nd there re G = ( N -1 ) / 2 gme ltogether. So, for ny odd numer N, there exit unique tournment truture with r round in whih r i the miniml integer with 3 r N, the numer of ye i B = (3 r N) / 2, nd the numer of firt round gme i (N 3 r 1 ) / 2. The totl numer of gme G = ( N 1 ) / 2, nd round y round we hve G = (N 3 r 1 ) / 2 + 3 r 2 + 3 r 3 +...+ 1 = [(N 3 r 1 ) + 3 r 1 1] / 2 = [N 1] / 2.
III. Who Need Clulu? Prolem. You re t ig prty t whih there i long tright r. You re tnding feet from the r, while your o, to whom you promied to pik up eer few minute go, i tnding feet from the r, t the other ide of the room. The ditne long the r etween your loet point t the r nd your o loet point on the r i feet. Sine your o (like ll oe) i n imptient jerk, you need to get to the r, pik up hi eer, nd get it to him quikly poile. We ll ume your wlking peed i ontnt nd the eer n e ordered t the me peed everywhere on the r, o your gol i to minimize the totl ditne you mut wlk, tht i minimize the quntity r + in the digrm. Wht i the hortet totl ditne you n wlk nd get your o hi eer? Where do you go t the r? r r you o Solution. Firt, thi i li lulu mx-min prolem, ome verion of whih n e found in proly every lulu ook ever written (it i uully out fething wter from the river or omething like tht), We will olve the prolem uing nothing more thn ymmetry nd very i geometry. Reflet the o ro the r, nd for ny route you might tke, onider the (imginry) route tht goe to tht me point t the r ut then goe to the refletion of the o. By the ymmetry of the refletion, tht pth h the me length the tul pth to the tul o. So we wnt to minimize the totl length of the pth from you to the r to your refleted o. But tht i trivil to do jut go in tright line to your oe refletion! There n t e horter pth from you to hi refletion, period. If you follow thi route, then y drwing the line of length oppoite your poition wy from the r, we n ue Pythgor: the hortet pth from you to the r to your o h length r + = ( + ) 2 + 2. o refletion r* you r * r + < r* + * ine the hortet pth from you to r the o refletion i tright line. So the * hortet pth from you to the o i the refletion of tht tright line pth. o
you x r y r o Now, to nwer the quetion of where we hould go to t the r, tht i, to find x nd/or y in term of,, nd, firt we oerve tht ll the right tringle in the piture re imilr, ine the ngle re ll the me y vriou ymmetrie nd prllel line. So x = y = + nd hene x = + nd y = +. In other word, we tke the reltive weighting of nd, i.e. p = + nd q = 1 p =, nd then the + point we wnt t the r i the weighted midpoint, given y weight p =, from your end of the r + to your oe end of the r (where we ue end of the r to men the point neret to you nd your o). Stted nother wy, we go to the point whoe portion of the wy from your end to the o end i given p = +. Finlly, notie the ymmetry of the prolem in nd. If you with the role of you nd the o, then the hortet ditne will remin the me nd the portion of the r length the o need to wlk to i given y q = + (i.e. y = = q ), whih of oure i the me point you wlked to in the originl + verion. No trig, no lulu, no prolem!
IV. Even Odd People Hve Feook Friend. Prolem. Explin why the numer of Feook memer who hve n odd numer of (Feook) friend i even. Solution. Suppoe there re N memer of Feook, y { 1, 2,..., N } nd tht memer i h extly m i friend. Let T = N i=1 m i. We firt lim tht T mut e even. In order to ee why thi i true, let define friendhip pir of memer { i, j }, i j who re friend on Feook. Eh friendhip ontriute 2 to the totl T, ine the ingle friendhip { i, j } dd one to m i nd dd one to m j. So, if F i the totl numer of friendhip on Feook, then T = 2 F. Hene T i even. Notie tht if memer were llowed to e friend with themelve, then we ould not onlude tht T i even, ine friendhip from memer to herelf would only dd 1 to T. Now plit up the Feook memerhip into two group: E onit of thoe memer who hve n even numer of friend, nd D onit of thoe memer who hve n odd numer of friend, i.e. Let R = E = { i m i i even} nd D = { i m i i odd} m i nd let S = m i i E i D. Then R + S = T. But R mut e n even numer, ine it i the um of even numer, nd T i even, nd thu S i even. Let K e the ize of the et D, tht i, K i the numer of memer whoe friend numer i odd. Then the even numer S i the um of K mny odd numer, whih implie tht K i even (ine the um of n odd numer of odd numer i odd). ------------------------------------------ Thi reult, in more lil mthemtil term, i: Let G e n undireted grph with the no elfdjenie. Then the numer of node with odd degree i even. Agin note the importne of no elf-djenie. Without tht ondition, the theorem doe not hold.