Sunteți pe pagina 1din 5
sav region. Hees, the re 2k reson spit, which shows tht thre ae 2k more reson tan here were previous. Hence, 11 eles sang ihe speed properics die he pane ino —k-+ 2424 = (242641) 2= (+ F402 eos. 47. Suppose V2 wee re tio, Then V2), where a and Pre psithe i I follows tat the be $= [nv/2ja ENN ist Soaenpy sof postive ego, tense B/2 = a Belongs {0S-Letbe te lex cleat of, wich xs by the wel rig propery Then = s/3 for same inept We ae Popeiyd tm s(/3~ 1301 —3 va pose integer ‘cute J2 > I, Hence, blongs to 8. Thi 4 com falcon beac (1 = VPs Hones, V2 ii tional. 49.4) Let d= goa, a9) Tend sad sorofeachaandsomstea divisor of ea, 5) Heo, Tisacommon iso of ayes, a8 let) “oshow tat tthe greet common dsr of hse me ber, supose htc ia camo disor of thm. Then isa diibor ofa, fr = 1.2.02 an a disor of Flo.) 088 8 ray an a Hse 8 common dsr faa ay abl Hees ita vse fd the retest common dsr ofa. Iolo tht dis be greatest common divisor a ail ‘IF n= 2, apply the Eacidean algorithm. Ober DY the Eldan agri ay a a, obaiing 2,4) and then apply he sloth survey Sycstepd.” Sh fl) =m La Pin) bef) =" ‘Bass sey: P(Distrucbecausef() = | = Pic llows frm be dfn off Ince sep: Assan f() =r Then fon) = +1) ~ +204 1)=1 = fla) Int lant + Int laine 1P S.a)A, 0,1, 00,01, 11,000, 001,011, 11,0000, 001, 0011,0111,11,00000, 00001, 0011, OOIEE, OLLTL, HIT b)S= fap |e is a sting of m Os and isa string of m Is, m > 0,n > 0) 5, Apply the fist ecusive sep tot act ()< B. Apply the second recursive step t this sing to get (\) © B- Ape ply the fist recursive step to this sting to get (00) € B. By Exercise 58, (() is notin B because the number of left parentheses doesnt equal the numberof right parentheses. 57.4,0.(0)00 9-290 B)-2-)2 dO 61 procedure generate: noanegatve integer) nis od then $= S017 = Te) end sein = 0 then begin S end eke begin Ty = Tin 255, = Sin—2) T= TU(G)|x eT US; andl) = Se=S\Ulay [xe Tandy eT US; and end (TUS isthe set of balanced sings of length at most n) by Answers Odd Numbered Exercises $337 63.1 y inital then x= is veo sox = yisapsina te fal aseton (65, procedure zerocount (aa, list fingers) n=l then O then zercount (a, ‘se roca a2...) eke Hag = 0 then zerocount ay a2 -.86)"= sercount (a... dy-i)* 1 se serocount a vd) = zercount(ay dt -idat) 67. We wl prove tat a) sa natal number and a) ‘This is tre forthe ase case n = 0 because fl) = 0. Now assume tht (r= 1) isa natural number and a(n — 1) = n= 1. Then alan ~ 1) @ applied to a natural number Tess han or equal to n— 1 Hence, (a(n 1) 6 also 8 ‘ature number minus than ot equal to n— 1. Therefore, 2 ala(n—1) is minus some natal umber les than (¢ equal 10 mI, whichis a natura murber less than or equal to m._ 69. From Exercise 68, a(n) = [n+ Dy and a(n = 1) = Lt. Because p< 1, these two values ae gual or they difer by 1. Fist suppose that jue ~ Ln] T= Tiss equivalent to an + 1) < E+ un). Its is teu, then uln+ 1] = Lun). On the otber and, yn = Lun} = 1 =u then ln 1) = 1 Jan so late + Lun + 1 8 desired, 71 f(0)= 1, m(0)= 0 1) ‘m(l) = f(2)=2, m(2)= 1; 3) =2, mB) =2; fe 3, ma) m3) =3; /(6)=4, mi $10) = 5,17) =4; (8) = 5,8) = 5; 9) = 6m {5 78. The ls oocurence of in the position for which the ttl numberof I's, 2's. sal togeter shat pos tion number But because a i tbe number of occurrences of Ee thisisjust 7 a8 desired Because fn isthe sum of Ae fst n term ofthe sequence, f/m) isthe sum ofthe fist f(a) terms ofthe sequence. But because fn) isthe las term whos vale ism, this means tha the sm he sum of all terms ofthe Sequence whose vale is at mos. Beease there are a terms he sequence whos ale is his sum is Shea as desired CHAPTER 5 Section 5. 1. )5850 0/383 3.44! ys 5.42 7.268 9.676 11.2% 1B.m+1 (Counting the empty sting) 15,475,255 counting the empty sting) 17. 1,321,368, 961 19.2) Seven: $6, 63,70, 77, 84,91,98 _b)Five:55, 66,77, 199 e)One: 77 2a) 128 b)480 9 675 450 480.9225" B)7S 23.4)950__) 500 2725.3” 27.52,457,00 29.20.077200 31.8) 37,822,859361 4) 8204716800) 4.189050, 880g) 12113640000) 171004208215 9 72083, S410) 6230,721,635 223,140,685 33.4)0 1/120 0720 a) 2520" 38.4)2 if w= 1,2 if n= 2,0 S-38 Answers to Od Numbered Exercises Wf n23 B27 foe m1 Lif at 920-1) SCE)" BBC m i even, 275 ifm is od 2007 4$1.3)240b)480 360 48.382 “48.147 47.33 49.) 9.920 671.329,261325.881.395 = 9.9.x 1b) 6.681 514,961,387.068.437,760 = 6610 1) 9.920,671339 261528841376 seconds, which is about 314,000 years 51, 7.104,000,000,000 "$3.18 $5.17 ‘57.22. $9. Let Pim) ete suru form tasks. orth bo Siseas tem = 2, Thisisjstthesumrulefertwotass Now assume that Pm) is tre. Consider m+ 1 tsk, 11.73... TeTusis which can be done i otis. Mq, Mast sways, respective such that no two of tose tasks can be done at the same time. To do oe ofthese tasks, we an ether ‘done ofthe stm of hese od sk By the sum rule fortwo tasks the numberof ways todo tis isthe sum ofthe numberof ways odo oe ofthe fst m tasks, plasm BY the inductive hypothesis, this i m+) =m F asdesied. 6len(n ~3)/2 Section 5.2 1. Because ther aresix lasses, but ony ive weekday, the p= _sconhol principle shows tha at east wo classes must eld fonthesamedsy. 3.a)3b) 14 §, Because thereare four posible remainders when an integer divided By 4, the pe _eonhole principe implies that given ve integers, teas wo Ihnethesameremaindet. 7.Leta.a+1.....a-+n— Ibe te imegersin the soguence. The integers a+) med, 0.1,2,-.-.n— I, ae distin, because 0 = (a+ /) (0+ 4H) las then ast count = coun +1 end ‘se OK = false end coun > max then begin best = set end Set se 1 (binary ation) nd (mars length and es indicates the sequence) {repeat for decreasing subsequence with only ‘anges being a < la instead ofa, > last and lst = 20 instead of at = 0) 25. By symmeuy we noe prove only theft statement Let ‘Abe one of the peopl. Either Aas atleast four fends, 1 A has atleast six enemies among the ether nine people (Gecause 3445 <9). Suppose, in the fist case, hat B,C, , and E are alls fends. I any two ofthese are fends vith eachother, then we have found thee mutual fends. Otherwise {B,C D, ise of four mutual enemies. In the second exe, let [B,C, D, E, FG) be ast of enemies of A. By Example U1, among 8, C, D,£, F, and G there tue citer thre mutual fends o hee muta enemies, who form, with A, ase of four mutal enemies. 27. We need to shbw two things: hati we havea group of» people then mong them we must find ithe a pair of fens ona subst of of them al of whom are mutual enemies; and hat tere ‘exis group ofn~ 1 people for which his snot posible Forth fst statement, if there is any pait of fiend, then the ‘ondton is satisfied and ifn, then every pai of peopl ate enemies, 50 the second coniton is Sats. For the second Sate, ifwehave group ofm ~ | peopeall of whom ae enemies ofeach ote, then tere is neither pai of ends ‘or a subst of of them all of whom ste mil enemic. 28. There are 6,432,816 posible for he threes and bith. So bythe generalized pigconbole pancpe there teat feast [36,000,00/6.482 816} = 6 people who share ‘he same ins and birdy. 31,18 33. Because there esx computers the number of ater computes computer ‘scomnected tos an integer between and, inelsive, How cer, and 5 eannot both occur Tose this, note that if sme computers coanected to no oes then no compte is on- scot al five others, and if ome computer is connected ‘wall fv others, then no computers connected 990 others 539 Hence, bythe pigeonhole principle, because thee are at most. ‘ve poses forthe number of eomputrs a computes connected, there are at esto compar in the se of sx ‘connestedtothesamenumberofothers 38 Labelthecom- puters C through Co, an labs! te printers P through Py Ife connect CoP, fork = 1,2,..-,20and connect ach ofthe computes Cy through Cin tal the printers, then we ‘ave usedatol of20-+ 80-20 = 1620cables. Clearly thisis sufficient, erase ifeomputersC; trough Cy ned printers, Then they can use the printers withthe same subscript, aif any computers wth ghee subscripts neo printer instead ‘one or more ofthese, then they can usethe printers that are not ‘being used because they arecomneted all he pines. Now ‘we must show tat 1619 cables is ot enough. Because tere se 1619 cables and 20 printers, the average number of cor- puters per printer is 1619/20, which ses than 81. Therefore Some printer must be connected to fever than 8] computers ‘Thatmeas its connected t 80 or fever computers, 0 there are 20 computers that are ot connected tit IT those 20 com- puters all needed a printer simultaneously then they would ‘bout of uc, because they are connected to a most the 19 other printers 37- Leta be the numberof matches com- pleted by hour Then |= gy < a2 j. Thus inthe period frm the J+ 1s 10 the th hour, there are exacly 24 matches 238, Use the generalized pigeonhole principle, pacing the |S) ‘objets fs) for s€ 5 in IT] boxes, one foreach element OFT. Let dy be jx — NU), where N(x) isthe i leper closest o jx for | = j a, 6) there isnoincreas- ing subsequence of length greater thn n, then pars) and (b) apps Thereore, we have ay, >a, > ==> a, > 24, a decreasing sequence of length + 1 Section 53 1.abe, ac, baba, cab, cba 3.720 $2) 120.) 720 98" e672 40.320 3,880 7.15120 Anoirs to Ot Numberd Eerises 8.39 9.1320 Ha) 210 b)386 @) 848 a)282 13.2017 15.65,780. 17.2% 5051 19,4) 1024 B45) 176 O22 2.220 2 9120-6 028, 609.638.400 26,2) 9,108,100) 941,004 3.764376) 9045024 €) 114072 2328 g)24 179,727.40 3,764,376.) 10944027.) 12.650, ')303,600 29,0) 37.927 by 18915. 33,9) 122523030 1) 72930.375 €) 225149655) 100,626625 39.54,600 3845 37.912 38, 112000 41,13 48.873 Section 5:4 Bah +6rhy Ise Lt bay boy +4) byt >) 220093 + Sey" 6a ey 8.100 7 94898072 9,29") nn (njamnne (co y)ifk = 2 (003) and 100 k < 200; Ooreewise 11'S 36 84126 126 84 369-1 IS. The sum fal he positive numbers () aK runs fom 00 fs 2, so each one of them i 90 bigget than this sim, re) aenecpetel e mt 19.00) + = aoe rare + ks) (2) 21.3) We sow tat cach side counts the numberof ways 16 eboose from a Set with m elements subset with elements and i Ainguished element ofthat se. Fo he lethand side, st choose te st (his can be done in (—) way) and then ‘hoose one of th kelement ia thi sab tobe the ds “ngusbed clement (his ean be done in ays). Fo the righthand side, st chose the distinguished element out ofthe entire rset (his canbe dne im ways). and then hoo the remaining ~1 elements of the subst fom the ‘emuiningr lento the set this canbe den) ways A(t) wet = a(t) 2B.()) = Sty tomy = 1+) (cf This ety toe with @) 1 ies a eu sive defnion. 25. (2) + (2) = Ct) =4 [n+ Ga] = [EN +e] = 402) zea eee) counts the nb of ays coo sequence fr and {V1 Is by choosing the postions of he Olena, {appose tha the + frm the as er ef 1 foltat nz /-=1-47. Once we have deine hr th Tn 1, we dei where the Oar tobe laced in th 7 Spaces eh st {Thera Is andj Onin ti ‘ange. By the sum rule it follows that thee are 3°", (,,) Tio ("H) waystodothis. bp Let P(r) bethe statement be rove. The bss sep ithe equation () = (1) hick is just 1 = 1, Assume that P() is tre, Then F¢24 (*2!) = Sha) Ce) = (en) (oe) = Ce) sin ie ndtve type and asa ety. We ea ‘hoot te eafr stn difeet ways, Neca ten chose the rest of the committee in 2°~' ways. Hence, there are n2*~! ‘wor to chow te committe tnd is lene: Meanie, S40 Answers to Odd Numbered Exess the numberof ways to set a commie wih pope it) One we hve chore a committe wih peop thet are ways to choose ite leader, Hence, thee a 3 £6) mys tciowe te Commteanistendr Hens, SHAG) ar M.terhesethoen mens. rom Caray 2 we bie ()=()+() == (INC fos tat) + (4) == 0) + 6)+ 0) The ft hand ste gies th ur of see wil an ven numberof cen andthe right-hand sees the mer cet ith ano umber of tment. 33-4) A path Of the dese ype soit of m move fo he ight a © toves p Eich ach pth canbe epeseted by sing Of length m+n wih m Os and Tx wre 40 represents Sine tothe gt anda Ta move pb) The mb oF ti atinge of eng m+ conaing eal» Is els (Pity (tr) bras uch stings tern by Sei ingestion ofthe n sory pecingthe pons of thems, 38.By Exercise 3 the mmber pats leg mot the ye deserted nha cree ee maber fit sng of ng n On tees hand path of length fof he pe destbed in Exrie 33 mat edo pont tht has he un of sory (ot) fr fone between Oa, nce, By Ex th ma ter of sich ats ending mt (2K) egal (E") =) Hence, Sf ({) = 28. 37. By Exercise 33 the number of paths ron, 090 (n+ I.rofthe type dese int x txcise equals (7), But such a path tarts by going j steps Yetialy forse j wit O = =r. The er of here pats xnaing wih j verte oa te umber of pats fhe type dsb in Exerc 3 that go rom (1) tors Le) Thee ae ae number of sch pis that en (0.0) cr =) hh by acre 3 cals (oh besa rs (ON Sg Ce tllons tat Lia(=C). Bas) wey) oe) Geta) Largest a enryin mh ow of Pascal’ tangle) Section 55 125 3.26 $125 7.35 9.4) 1716 0) 50.386 992,629,515 330 6)9,74 19 13.4,508501 1S) 10,626 b)1,365 1,649 a) 106 17.2.520 19.302,702.400, 21,3008 23.7.484400 28. 30.492 FC(9,50) 28.35 383,160 3.63 IS 19.635 37,210 38.27,720 41.52,/G8171) 48. Approximately 65x10" 48.2) n—1n) De+N= ND! 47. There are C(n.m) ways 10 choose my objects for the first box. Once these objets are chosen, there ae Cn =m) ways to choose objets for the second bax Similarly, there are Clam) —m,25) ways tO choose objects for the thd box. Continue in this way” un fi thete is Cla — my ~~ 1 way to choose the objets forthe last box (because mj + fists =) By the prot rl, the numberof ways 0 to make the ente asignment is C(a,m)}COH— mi m2}C (1 =ny masa) Ce ty = may ich equals (ny n+ nu?) a straightforward implication shows. $9.4) Because ty xp $+ 4, it flows that t0

S-ar putea să vă placă și