You are on page 1of 465
INSTRUCTOR’S SOLUTIONS MANUAL DISCRETE AND COMBINATORIAL MATHEMATICS FIFTH EDITION Ralph P. Grimaldi Rose-Hulman Institute of Technology Reproduced by Pearson Addison-Wesley from electronic files supplied by the author. Copyright © 2004 Pearson Education, Inc. Publishing as Pearson Addison-Wesley, 75 Arlington Street, Boston, MA 02116 All sights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior ‘tte permission of the publisher. Printed in the United States of America. ISBN 0-201-7260-2 1234 5.6.CRS 06 05 04 03 anon Pio Acsta Dedicated to the memory of Nellie and Glen (Fuzzy) Shidfer TABLE OF CONTENTS PART 1 FUNDAMENTALS OF DISCRETE MATHEMATICS Chapter 1 Fundamental Principles of Counting Chapter 2 Fundamentals of Logic Chapter 3 Set Theory Chapter 4 Properties of the Integers: Mathematical Induction Chapter 5 Relations and Functions Chapter 6 Languages: Finite State Machines Chapter 7 Relations: The Second Time Around PART 2 FURTHER TOPICS IN ENUMERATION Chapter 8 ‘The Principle of Inclusion and Exclusion Chapter 9 Generating Functions ‘Chapter 10 Recurrence Relations PART 3 GRAPH THEORY AND APPLICATIONS Chopter 11 An Introduction to Graph Theory Chapter 12 Trees Chapter 13 Optimization and Matching 26 59 134 167 179 207 209 229 243, 285 287 328 PART 4 MODERN APPLIED ALGEBRA Chapter 14 Rings and Modular Arithmetic Chapter 15 Boolean Algebra and Switching Functions Chapter 16 Groups, Coding Theory, aud Polya's Method of Enumeration Chapter 17 Finite Fields and Combinatorial Designs THE APPENDICES Appendix 1 Exponential and Logarithmic Functions Appendix 2 Properties of Matrices Appendix 3 Countable and Uncountable Sets 367 369 396 413 440 459 461 464 PART 1 FUNDAMENTALS OF DISCRETE MATHEMATICS 4. 6. CHAPTER 1 FUNDAMENTAL PRINCIPLES OF COUNTING Sections 1.1 and 1.2 (a) By the rule of sum, there are 8 +5 = 13 possibilities for the eventual winner. (b) Since there are eight Republicans and five Democrats, by the rule of product we have 8x 5 = 40 possible pairs of opposing candidates. (c) The rule of sum in part (a); the rule of product in part (b). By the rule of product there are 5 x 5 x 5 x 5 x 5 x 5 =5¢ license plates where the first two symbols are vowels and the last four are even digits. By the rule of product there are (a) 4 x 12 x 3.x 2 = 288 distinct Buicks that can be manufactured. Of these, (b) 4x13 2=2¢ are blue, (a) From the rule of product there are 10 x 9 x 8 x 7 = P(10,4) = 5040 possible slates. (b) Gi) There are 3 x 9x 8 x 7 = 1512 slates where a physician is nominated for president. (ii) The number of slates with exactly one physician appearing is 4 x [3 x7 x 6 x 5] = 2520. (iii) There are 7 x 6 x 5 x 4 = 840 slates where no physician is nominated for any of the four offices. Consequently, 5040 ~ 840 = 4200 slates include at least one physician. Based on the evidence supplied by Jennifer and Tiffany, from the rule of product we find that there are 2x 2x 1x 10 x 10 x 2 = 800 different license plates. (a) Here we are dealing with the permutations of 30 objects (the runners) taken 8 (the first, eight finishing positions) at a time.. So the trophies can be awarded in P(30,8) = 30!/22! ways. (b) Roberta and Candice can finish among the top three runners in 6 ways. For each of these 6 ways, there are P(28,6) ways for the other 6 finishers (in the top 8) to finish the race. By the rule of product there are 6-P(28,6) ways to award the trophies with these two runners among the top three. By the rule of product there are 2° possibilities. By the rule of product there are (a) 12! ways to process the programs if there are no restrictions; (b) (4!)(8!) ways so that the four higher priority programs are processed first; and (c) (41)(5!)(3!) ways where the four top priority programs are processed first and the three programs of least priority are processed last. 2. 10. 1 12. 13. 14. 15. 16. a. 18. 19. 20, (a) (14)(12) = 168 (b) (14)(22)(6)(18) = 18,144 (©) (8)(18)(6)(3)(44)(12)(14)(12) = 73,156,608 Consider one such arrangement — say we have three books on one shelf and 12 on the other. This can be accomplished in 15! ways. In fact for any subdivision (resulting in two nonempty shelves) of the 15 books we get 15! ways to arrange the books on the two shelves. Since there are 14 ways to subdivide the books so that each shelf has at least one book, the total number of ways in which Pamela can arrange her books in this manner is (a4)(ast). (a) There are four roads from town A to town B and three roads from town B to town ©, so by the rule of product there are 4 x 3= 12 roads from A to C that pass through B. Since there are two roads from A to C directly, there are 12 + 2 = 14 ways in which Linda can make the trip from A to C. (b) Using the result from part (a), together with the rule of product, we find that there are 14 x 14 = 196 different round trips (from A to C and back to A). (c) Here there are 14 x 13 = 182 round trips. (2) act (2) ate (3) cat (4) ota (5) tae (6) tea (a) 8! = P(8,8) (b) 7! 6 (a) P(7,2) = 7/(7 — 2)! = M/s! = (7)(6) = 42 (b) P(8,4) = 8!/(8 — 4)! = 81/4! = (8)(7)(6)(5) = 1680 (c) P(10,7) = 10!/(10 — 7)! 01/3! 10)(9)(8)(7)(6)(5)(4) = 604, 800 (a) P(12,3) = 121/(12 — 3)! = 121/9! = (12)(11)(10) = 1320 Here we must place a,b,e,d in the positions denoted by x: exexexe xe. By the rule of product there are 4! ways to do this. (a) With repetitions allowed there are 40% distinet messages. (b) By the rule of product there are 40 x 30 x 30x... x 30 x 30 x 40 = (407)(30") messages. Class A: (2” — 2)(2% — 2) = 2,113,928, 964 Class B: 244(2!° — 2) = 1,073, 709, 056 Class C: 24(2% — 2) = 532, 676, 608 From the rule of product we find that there are (7)(4)(3)(6) = 504 ways for Morgan to configure her low-end computer system. (a) 7! = 5040 (b) 4x3x3x2x2x1x 1 = (41)(3!) = 144 (c) (31(5)(4!) = 720 (a) (31)(4!)(2) = 288 (2) Since there are three A’s, there are 81/3! = 6720 arrangements. 24. 22, 23, 24. 25. 26. 27. (b) Here we arrange the six symbols D,T,G,R,M, AAA in 6! = 720 ways. (a) 121/(3121212!) (b) (111/(31212!21)] (for AG) + (111/(312!2!21)] (for GA) (c) Consider one case where all the vowels are adjacent: $,C,L,G,C,L, OIOOIA. These seven symbols can be arranged in (7!)/(212!) ways. Since 0,0,0,1,1,A can be arranged in (61)/(3!2!) ways, the number of arrangements with all the vowels adjacent is (ri/(2iany|[6t/(3!2)). (Case 1: The leading digit is 5) (6!)/(2!) (Case 2: The leading digit is 6) (6!)/(2!)? (Case 3: The leading digit is 7) (6!)/(2!)* In total there are ((6!)/(2!)|{1 + (1/2) + (1/2)] = 6! = 720 such positive integers n. Here the solution is the number of ways we can arrange 12 objects — 4 of the first type, 3 of the second, 2 of the third, and 3 of the fourth. There are 121/(4!3!2!3!) = 277,200 ways. P(n+1r) = (n+ Ui/(n+1=r)!=[(n+1/(n+1-7)]-[ni/(r—r)] = [mt D/n+1-rPQr). =10 (b) n=5 1/(n~ 2)! +50 = (2n)!/(2n — 2)! => 2n(n —1) + 50 = (2n)(2n — 1) => n? = 25 => Any such path from (0,0) to (7,7) or from (2,7) to (9,14) is an arrangement of 7 R’s and 7 U's, There are (14!)/(7!7!) such arrangements. In general, for m,n nonnegative integers, and any real numbers a,}, the number of such paths from (a,8) to (a+m,b+n) is (m+n)i/(mint). (2) Bach path consists of 2 H’s, 1 V, and 7 A’s. There are 101/(211!7!) ways to arrange these 10 letters and this is the number of paths. (b) 101/(241!7!) (©) If a,5, and c are any real numbers and m,n, and p are nonnegative integers, then the number of paths from (a,b,c) to (a-+m,b-+n,e+p) is (m+n +p)i/(mlnipl). (a) The for loop for iis executed 12 times, while those for j and k are executed 10-5+1 = 6 and 15~8+1=8 times, respectively. Consequently, following the execution of the given program segment, the value of counter is 0+ 12(1) + 6(2) + 8(3) = 48. (b) Here we have three tasks — 7), T,, and Ts. Task 7; takes place ench time we traverse the instructions in the i loop. Similarly, tasks Ty and Ts take place during each iteration of the j and k loops, respectively. ‘The final value for the integer variable counter follows by the rule of sum. 29, 31. 32. 33. 34, 35, 3T. (a) & (b) By the rule of product the’ print statement is executed 12x 6x8 = 576 times. (a) For five letters there are 26 x 26 x 26x 1x1 = 26° palindromes. There are 26 x 26x 26 x 1x 1 x 1 = 26° palindromes for six letters. (b) When letters may not appear more than two times, there are 26 x 25 x 24 = 15,600 palindromes for either five or six letters. By the rule of product there are (a) 9x 9x 8x 7x 6X5 = 136,080 six-digit integers with no leading zeros and no repeated digit. (b) When digits may be repeated there are 9x 10° such six-digit integers. (i) (a) (9x8x7Xx6X5x1) (for the integers ending in 0) + (8x8x7x6x 5x4) (for the integers ending in 2,4,6, or 8) = 68,800. (b) When the digits may be repeated there are 9x 10x 10 x 10 x 10 x 5 = 450,000 six-digit even integers. (i) () (@x8x7x6x 5x1) (for the integers ending in 0) +(8x8x7x6x5x1) (for the integers ending in 5) = 28,560. (b) 9 x 10x 10 x 10 x 10 x 2 = 180,000. (ii) We use the fact that an integer is divisible by 4 if and only if the integer formed by the last two digits is divisible by 4. (a) (8x 7x 6x5 x 6) (last two digits are 04, 08, 20, 40, 60, or 80) + (7x 7x 6X5 x 16) (Inst two digits are 12, 16, 24, 28, 32, 36, 48, 52, 56, 64, 68, 72, 76, 84, 92, or 96) = 33,600. (b) 9 x 10x 10 x 10 x 25 = 225,000. (a) For positive integers nk, where n = 3k, nl/(3!)* is the number of ways to arrange the n objects 24,21,21,22,22,22)---s2k Zk) 74 This must be an integer. (b) If nk are positive integers with n= mk, then nl/(m!)* is an integer. (a) With 2 choices per question there are 2!° = 1024 ways to answer the examination. (b) Now there are 3 choices per question and 3” ways. (41/2!) (No 7's) + (4!) (One 7 and one 3) + (2)(4!/2!) (One 7 and two 3’s) + (41/2!) (Two 7’s and no 3's) + (2)(41/2!) (Two 7's and one 3) + (41/(212!)) (Two 7's and two 3's). The total gives us 102 such four-digit integers. @ 6 (b) Let A,B denote the two people who insist on sitting next to each other. ‘Then there are 5! (A to the right of B) + 5! (B to the right of A) = 2(5!) seating arrangements. (a) Locate A. There are two cases to consider. (1) There is a person to the left of A on the same side of the table, There are 7! such seating arrangements. (2) There is a person to the right of A on the same side of the table, This gives 7! more arrangements, So there are 2(7!) possibilities. (b) 7200 We can select the 10 people to be sonted at the table for 10 in (%8) ways. For each such selection there are 9! ways of arrangiog the 10 people around the table, ‘The remaining six people can be seated around the other table in 5! ways, Consequently, there are (18)915! ‘ways to seat the 16 people around the two given tables, 38. 39, ‘The nine women cen be situated around the table in 8! ways. Each such arrangement provides nine spaces (between women) where a man can be placed. We can select six of these places and situate man in each of them in (3)6! = 9-8-7-6-5-4 ways. Consequently, the number of seating arrangements under the given conditions is (8!)(5)6! 2,438, 553, 600. procedure SumOfFact{i, sum: positive integers; j,k: nonnegative integers; factorial: array [0..9] of ten positive integers) begin ‘factorial [0) fori 1lto9do factorial [i] := i* factorial [§- 1] for k:= 0 to 9do begin sum := factorial [i] + factorial [j] + factorial [k] if (100 * 5+ 10* 5+ 4) = sum then print (100 * i+ 10*j +4) end end The unique answer is 145 since (1!) + (4!) + (5!) = 1-424 +120 = 145, Section 1.3 (6) = 6t7124(6-2)1] = aty(2tat) = (6)(5)/2 = 15 bc 5 ee ne wed e f a ed die aoe b of a a f c d e £ Order is not relevant here and Diane can make her selection in (2) = 792. ways. (2) C(10,4) = 101/(ato!) = (10)(9)(8)(7)/(4)(3}(2)() = 210 (b)_ (7) = 121/(mtB1) = (12)(11}(10)(9)(8)/(5)(4)(B)(2)(1) = 792 7 10. i. 1 {c) ©(14, 12) = 141/(1212!) = (14)(13)/(2)(1) = 91 (a) (B8) = 154/ (2015!) = (25)(249(13)(22)(12)/66)(4)(9)(2)01) = OZ. (®) (¢) =20 © (++) =a (a) There are P(5,3) = 5!/(5— 3)! = 5!/2! = (5)(4)(3) = 60 permutations of size 3 for the five letters m, r, a, f, and t. (b) There are C(5,3) = 5!/{3'(5— 3)!] = 51/(3!2!) = 10 combinations of size 3 for the five letters m, r, a, f, and t, They are afm adr aft aan amt art fmr fmt txt mrt (5) + ("2?) = Gree 9+ Gye = v0 =2) = Gree —hn+ 1-2 = Gln = )(@n~ 2) = (n= 1, @ (8 ci(3) (9) (©) (2) ({6)(2 women)+ (2) (f) (4 women)-+...+ (f) (7) (10 women) = Ef, (1) (122) @ (%) ts (7 women) + ('2) (3) (8 women) + ('2)(%) (9 women) + ©) 9) (10 women) = DIP, ('°)(,22,). ES. C62) - @) ©) @() © MOG) © OO © Ns {3 © G)@QE)G = st @ (EEVG)/2 Wivision by 2 is needed since no distinction is made for the order in which, the other two cards are drawn.) This result equals 54,912 = ('°) (4) (‘#) -3744 = )(}) OOG (3). & HOOE) ® @ o) 0) © @) @ @+O+( (i GC) (a) (P= 120) (= 58 (©) ({) (9) (four of the fret six) +(6)(3) (five of the first six) +(6)({) (all of the first six) = (15)(4) + (6)(6) + (2)(4) = 100. (a) The first three books can be selected in ('?) ways. The next three in (3) ways. ‘The third set of three in ($) ways and the fourth set in (3) ways. Consequently, the 12 books can be distributed in ('3)(5) ($) (3) = (221)/1(3!)"] ways. 8 14. 15. i 1B. 19. © (VOOE rayj(aryr(2F). The letters M,LL1,P,P,I can be arranged in [7!/(4!)(2!)] ways, Each arrangement provides eight locations (one at the start of the arrangement, one at the finish, and six between letters) for placing the four nonconsecutive $’s. Four of these locations can be selected in (2) ways. Hence, the total number of these arrangements is @) evanan. (%) = 12,876 when n= 17, {a) ‘Two distinet points determine a line, With 15 points, no three collinear, there are (') possible Hines. (a) There are (7) possible triangles or planes, and (%) possible tetrahedra. (a) OG 1) = (0741) (24148741) + (4414 (5? +1) 4 (6241) = 2454104 17426437 a = 97 2 (8) G2) = BPH) -1) 4) FB 1) = 9-2 1-047 =240424042204240424042=12 (@) Sev = LP FA) + et (a te et = 040+... 40=0 aI -142-344-546=3 @ oh © Dey e Deaye 2 es & @ Set Se fe) (a) t01/(413!3!) (b) (Q)2t+ (2+ (8) (©) (9) (our 1's, six 0's) + (18) (8) (two 1's, one 2, seven 0's) + (18) (two 2's, eight O's) (2) (three 1, seven 0's) + (19)(2) (one 1, one 2, eight O's) + (2) (one 9, nine 0's) = 220 (2) + 2) + (9G) +0) @) = 705 20. 21. 22, 23. 24, 23. 26. 27. (2!)(S2%5 (72) — Select an even number of locations for 0,2. This is done in (12) ways for 04 there are n triangles that use two sides of the n-gon and n(n — 4) triangles that use only one side. So if the sides of the n-gon cannot be used, then there are (3) —n—n(n—4), n> 4, triangles. (a) From the rule of product it follows that there are 4x 4 x 6 = 96 terms in the complete expansion of (a+b+e+de+ft+g+h(ute+wt+rty+z). (b) The terms buz and egu do not occur as summands in this expansion. @) (2) @) (fe) (c) Let a= 22 and 6 = —3y. By the binomial theorem the coefficient of a°4? in the expansion of (+5)! is ('2). But ('3) a9 = (12) (22)%(—3y)? = ('2)(2")(—3)? 2°y?, so the coefficient of 2%y* is ('2)(2)(-3)°. 2) Oa) (954) eee) = eS OE ete Ca = ainatnghonel” @) (uy) =12 ©) (osha) = 22 © (4,)@M-1)(-? = -24 () (,1,)(-2)@)? = -216 © (tra)(2)(-D*9\(-2 = 161,280 10 ®) G 2,2,2,2 12 ) (,, 2,2,2,4, = (101)/(21)* = 113,400 ¢2)*(—1)°(3)*(4)*(--2)* = [(121)/1(21)* (A I2Y (BY (2)* = 718, 502, 400 Olasere Jarcerarerer = ((42)/(0)(2*(4D](2)%(6)*(@)* = 10, 103, 940, 000 In each of parts (a)-(e) replace the variables by 1 and evaluate the results, () 2 (b) 2° () 9 @ + {e) 4° 10 28. 30. BL. 32. 33. 34. Ss () =2"/nl = Beni) = 4o-= Poel ) Lawra 7 -1 » Sago yea mn) plmctl! a otal ‘rial Galte=ayl (nd ieee = (m+ A getiiiatiag = Om + (mH) The sum is the binomial expansion of (1 +2)" = 3". (a) 1=[Q+2)-2 =( +2) - (t)et te? + (Jar tay? -... + (12 (b) 1=((2+2)-(@+)" (©) ®=[@+2)—2)" Tio (P)8! = (1 + 8)8 = 9° = [(49)?)]° = (43)!, so z= 43, (a) Sa = 3-1) = (a1 ~ a9) + (a2 ~ ay) + (a3 ~ a2) = a3 — a0 a (©) Sa: a1) = (01 — 9) + (0a — 1) + (09 ~ 2) Foo (per — Oya) + By — et) = @— pe aieeee ee es eee oe ie OT Ti iS 1 ee) 2! 102 2~ “102 ~ 102 ~ “51” procedure Select2(i,j: positive integers) begin fori to5do i+lto6do print (3) end procedure Select9(i,j,k: positive integers) to4do i+ltoSdo for ki= j+1to 6 do print (i,j,k) end il L a Section 1.4 Let 2,1 $i <5, denote the amounts given to the five children, (a) The number of integer solutions of 21 +27 + 25+ 24 +25 = 10, 0S 24, 1 26. —31 ways f accounts for the solutions where 8) For the chocolate donuts there are (5) = (2} distributions. There are (°*4~*) = (() ways to distribute the jelly donuts. By the rule of product there are (7)({) ways to distribute the donuts as specified. Cr 20 “X20 ~ 12 230, 230 10. dn. 12. 13. 14 1B. Here we want the number of integer solutions for 2; +22 +29 +24 +25 +25 = 100, = 23,1 0, 1 0, 1 0,1) (7) (container 4 has one marble) +(*i"") (container 4 has three marbles) +(*37) (container 4 has five marbles) +(*#1-') (container 4 has seven marbles) = Eke (:2)- @ (aha) OPO) (b) ‘The terms in the expansion have the form v*w's*y!z* where a,b,c,d,e are nonnegative integers that sum to 8. There are (*$"*) = ('3) terms. Consider one such distribution - the one where there are six books on each of the four shelves. Here there are 24! ways for this to happen. And we see that there are also 24! ways to place the books for any other such distribution. ‘The number of distributions is the number of positive integer solutions to ay ta, +23 +04 = 24. This is the same as the number of nonnegative integer solutions for tia ts tus = 20. [Here y+ 1 =z; for all 1 0, 1 emus 2 Type = (etnies — (oie =P Hefijfonen) = 220 times. After the execution of (220)(221)/2 = 24, 310. (Di fetmioens ye ADR = a(n + DE? — Y= n(n + Lpeed] = {a) Put one object into each container. Then there are m—n_ identical objects to place into n distinet containers. This yields (*™-")-!) = (tc) distributions. (b) Place r objects into each container. The remaining m—rn objects can then be dis- tributed among the 1 distinct containers in (“*Q=7~?) = (moLtGrI") ax (mols trim vee =r @) procedure Selections!(i,j: nonnegative integers) 4 25. 27, begin for i:= 0 to 10 do for j:=0 to 10-ido print (i,j, 10-i-j) end (b) For all 1 0. Then the number of integer solutions to 2 +21+25+24=4, where -2< x; for 1 0 for 1 0, 2 = 7. ‘The number of integer solutions for 2, +23 = 5, with 21,25 > 0, is the same as the number of integer solutions for ys + ys = 3, with y1,ys 20. This is (737) = ({) =4. b) Now we must also consider the integer solutions for w1 + ws + ws = 12, w1,ws > 0, w, = 5, The number here is (#6) = (8) = 6. Consequently, there are 4 + 6 = 10 arrangements that result in three runs. c) The number of arrangements for four ritns requires two cases fas above in part (b)}. 15 28. If the first run consists of heads, then we need the number of integer solutions for #1 + ty +254 a4 = 12, where x + 23 = 5, 21,29 > 0 and zy +24 = 7, Gayz4 > 0. This number is (#3-1) (#51) = @ () =4-6 =24. When the first run consists of tails we get (2) (@) = 6-4 = 24 arrangements. ) In all there are 2(24) = 48 arrangements with four runs. ) If the first run starts with an H, then we need the number of integer solutions for By + a2 + ay + 4 t 25 = 12 where 2 + aq 4 25 = 5, 24,29,25 > O and 2) +24 = 7, 82,24 > 0. This is (43) (45-1) = (4)(¢) = 36. For the case where the first run starts with aT, the number of arrangements is (**{~1) (*3-*) = (§) ($) = 60. In total there are 36 + 60 = 96 ways for these 12 tosses to determine five runs, e) ae) (GH) @) (3) = 90 - the number of arrangements which result in six runs, if the first run starts with an H. But this is also the number when the first run starts with a T. Consequently, six runs come about in 2-90 = 180 ways. 9 C9 OE) aa) 42(E) OHO) (HE) OF) = 2D he (ef,) (625) = 2d 144-64+6-15 + 4-20-41 15) = 420. (a) For n > 4, consider the strings made up of n bits ~ that is, a total of n 0's and 1's, In particular, consider those strings where there are (exactly) two occurrences of 01. For example, if n = 6 we want to include strings such as 010010 and 100101, but not 101111 or 010101. How many such strings are there? (b) For n > 6, how many strings of n 0's and 1’s contain (exactly) three occurrences of 01? (c) Provide a combinatorial proof for the following: mw _ (ett) (nth mrt), n odd Forn>1, 2 =( ; \+( fe \+ -+{ (3) n even, (a) A string of this type consists of x; 1’s followed by 22 0's followed by zy 1’s followed by £4 0's followed by z5 1's followed by 6 0's, where, atertrat a tastee=n, x26 20, 2,252,285 >0. The number of solutions to this equation equals the number of solutions to wt tis tutte =n—4, where y 20 for 1 6, a string with this structure has z; 1’s followed by 2, 0's followed by 9 I's ..- followed by 25 0’s, where By taateste tars, 24,7320, 22,29,---,27 > 0. ‘The number of solutions to this equation equals the number of solutions to wtwtiet-tys=n—6, where yj 20 for 1 0. ‘This is the same as the number of integer solutions for wt yates tung =n —(n—1)=1, where yi ¥ay--- Yass 2 0. This manber i (2) = (1) = (2) = (ula) (i) n even, we can have at most } occurrences of 01. The number of strings with # occurrences of 01 is the number of integer solutions for Bp tatg tet ang2 =, Tr Ingz 20, 22) 55---5 n> OL ‘This is the same as the number of integer solutions for wtwte tins = n—n=0, where ys 20 for 1 0 there are 6,(= q3y(%")) such paths from (0,0) to (n,n). (c) For n> 0 the first move is U and the last is H. (a) by = 182 (b) bs =42 (c) by = 429 Using the results in the third column of Table 1.10 we have: 111000 110010 101010 123 125 135 456 346 246 (a) @ 1347 (i) 1257 (ii) 1235 2568 3468 4678 (») @_ 10111000 (11100010 (ii) 11011000 ‘There are b(= 42) ways. (8) (i) 1110001010 (i) 1010101010 (ai) 1111001000 (Bb) @_ (((ab(e(de + (((ab)(ede))) F) Gi) ((ab{(edLe + ((ad)((ed)(ef))) (ili) (a(((be(de + (a{((be)(de)) f)) () When n = 4 there are 14(= by) such diagrams. (i) For any n > 0, there are by different drawings of n semicircles on and above a horizontal line, with no two semicircles intersecting, Consider, for instance, the diagram in part (f) of the figure. Going from left to right, write 1 the first time you encounter a semicircle and write 0 the second time that semicircle is encountered. Here we get the list 110100. ‘The list 110010 corresponds with the drawing in part (g). This correspondence shows that the number of such drawings for n semicircles is the same as the number of lists of n 1's and n 0's where, as the list is read from left to right, the number of 0's never exceeds the number of 1's. (a) In total there are (%°) = (sj) paths from (0,0) to (7,8), each made up of seven R's and three Us. From these ('?) paths we remove those that violate the stated condition — namely, those paths where the number of U’s exceeds the number R’s (at some first position in the path), For example, consider one such path: RURUURRRRR. 18 Here the condition is violated, for the first time, after the third Y. Transform the given path as follows: RURUURRRRRGRURUUUUUUY. Here the entries up to and including the first violation remain unchanged, while those following the first violation are changed: R's become U's and U's become R's. This correspondence shows us that the number of paths that violate the given condition is the same as the number of paths made up of eight Us and two R’s ~ and there are ('?) = (2) such paths. ‘onsequently, the answer is CoO aE: fe 92 - og cen (y). () ("2") _ (min) a = (tat _ int wise = Wesel lees — (atom yt) = (attcm)(™*), [Note that when m = n, this becomes ( an). the formula for the nth Catalan number.} 11. Consider one of the (4;)("y say, al $5, $5, $10, $5, $5, $10, $10, $10, $5, $5, $10, $10. Here we consider the six $5 bills as indistinguishable ~ likewise, for the six $10 bills. How- ‘ever, we consider the patrons as distinct. Hence, there are 6! ways for the six patrons, each with a $5 bill, to occupy positions 1, 2, 4, 5, 9, and 10, in the arrangement (*). Likewise, there are 6! ways to locate the other six patrons (cach with a $10 bill). Consequently, here the number of arrangements is (4)(22) ways in which the $5 and $10 bills can be arranged (Z}onen 5 aay = 68,428, 800. Supplementary Exercises OO+O0+00 2 @) (b) 8(4°) 3. LI Scloct any four of these twelve points (on the circumference). As ( | __ seem in the figure, these points determine a pair of chords that in- \ / tersect. Consequently, the lererst m number of points of intersection for all possible chords is (1? 19 7. ® Gy (&) 3(%)° (28) four hymns from one book, one from each of the other two) -+ 6(°8) (#) (3) (one hymn from one book, two hymns from a second book, and three from the third book) +(2)" (two hymns from each of the three books). (a) 10% (b) There are 10 choices for the first flag. For the second flag there are 11 choices: The nine poles with no flag, and above or below the first flag on the pole where it is situated. ‘There are 12 choices for the third flag, 13 choices for the fourth,..., and 34 choices for the last (25th). Hence there are (34!)/(9!) possible arrangements, () There are 25! ways to arrange the flags. For each arrangement consider the 24 spaces, ‘one between each pair of flags. Selecting 9 of these spaces provides a distribution among, the 10 flagpoles where every flagpole has at least one flag and order is relevant. Hence there are (25!)(%') such arrangements. Consider the 45 heads and the 46 positions they determine: (1) One position to the left of the first head; (2) One position between the i-th head and the (i +1)-st head, where 1 0, 216 > 0, and 2; > 0 for 2 < i < 15. This is the number of integer solutions for utwtyst...tmst+he = 31, with y; 2 0 for 1 0. Here there are CHET") = (22) solutions. The total number of solutions is Tino (*f°) (774). 15h (a) Here A must win set 5 and exactly two of the four eatlier sets. This can be done in (3) ways. With seven possible scores for each set there are ($)7° ways for the scores to be recorded. 22, 20. 21, 22, 23. 24, 25. 26. (b) Here A can win in four sets in ) ways, and scores can be recorded in (3)7* ways. So if A wins in four or five sets, then the scores can be recorded in [(3)74 + (3) 7] ways. Since B may be the winner, the final answer is 2[(3)7*+ ({)75). We can choose r objects from n in (*) ways. Once the r objects are selected they can be arranged in a circle in (r ~ 1)! ways. So there are (*)(r—1)! circular arrangements of the n objects taken r at a time, For every positive integer n, 0 = (1~1)* = (5)(1)°— (F)()' + (5)? - GQ) +.. + Ca G)arand ()+G)+@Q+--= G+ Q+ Qe OME (b) 5! © Qe (a) There are P(20, 12) = fill her bookshelf. (b): There are ¢ 7) ways in which Francesca can select nine other books. Then she can arrange those nine books and the three books on tennis on her bookshelf in 12! ways. Consequently, among the arrangements in part (a), there are (17) (12!) arrangements that include Francesca’s three books on tennis. Following the execution of this program segment the value of counter is 0+ (12—141)(r—141)(2) + [344 +...+(s—3+ I](4)+(12-34+1)(6) +(¢-7+1)(8) = 10 + (12)(r)(2) + [(1/2)(s — 3 + 1s — 3 +2) — 2 —1](4) + (206) + (¢ — 6)(8) = 22+ dr + Bt + 2s — 2)(s— 1) — 12 = 14 + 2dr + Bt + 2o(s — 3). a = (20)(19)(18) ---(11)(10)(9) ways in which Francesca can (a) For 17 there must be an odd number, between 1 and 17 inclusive, of 1's. For 2k+1 1's, where 0 0. The number of ways to write nus an ordered sum of 1's and 2's is Dh, (*{H4). For n even, let n= 2k for k > 1. Here the answer is DL, (44). (a) (i) 1 (one 3) +1 (three 3's) + 1 (five 3's) = 3. (i) é (one 3) + (3) (three 3's) +(8) (ve 3°s). (b) G) 1 (no 8's) + 1 (two 3's) + 1 (four 3's) + 1 (six 3's (i) 8 {no 3's) +{3) (two 3's) +([) (four 3's) +(6) 23 2. 28, 20, BL. 32, (a) The number of positive integer solutions to the given equation is the same os the number of nonnegative integer solttions for yy + Yat... Ye =r, where yi > 0 for all 10, 1SiS3, and +m =6, w>0, 1S1S2 ‘This equals the number of integer solutions for By 84, wtwty=3, w20, 1si<3, and 4+%,=3, 420, 1Sis2 So the answer is (31) (*3) = (9)(4). ‘There are @ = 15 ways lo choose the four quarters when Hunter will take these dectives. For each of these choices of four quarters, there are 12-11: 10-9 ways to assign the electives. So, in total, there are 12-11- 10-9 = 178, 200 ways for Hunter to select aud schedule these four electives. Consider the family as one unit. Then we are trying to arrange nine distinct objects — the family and the eight other people ~ around the table. This can be done in 8! ways. Since the family unit can be arranged in four ways, the total number of arrangements under the prescribed conditions is 4(8!). CHAPTER 2 FUNDAMENTALS OF LOGIC Section 2.1 The sentences in parts (a), (¢), (d), and (f) are statements. The statements in parts (a), (c), and (f) are primitive statements. Since p + q is false the truth value for p is 1 and that of q is 0. Consequently, the truth values for the given compound statements are (a) 0 (b) 0 (1 (a) 0 @ roa (bt) ap © (sara (a) If triangle ABC is equilateral, then it is isosceles. (b) Hf triangle ABC is not isosceles, then it is not equilateral. (c) Triangle ABC is equilateral if and only if it is equiangular. (a) Triangle ABC is isosceles but it is not equilateral. (c) If triangle ABC is equiangular, then it is isosceles. (a) True (1) (b) False (0) (c) True (1) (a) If Darei practices her serve daily then she will have a good chance of winning the tennis tournament. (c) If Mary is to be allowed on Larry's motorcycle, then she must wear her helmet. pla|pva | (e) pV -4) > -p [pa la>p[@) 59) > @ >») ojo] oO 1 | 1 1 1 oyii a 1 1 0 0 1foj] 1 1 0 i 1 ajaj i 1 1 1 1 [pla|p—¢[ PAP >a) [© PAG > Me OE) ojo) i 0 a 10 oli} 4 0 a 1ja fe 0 a 1) 0 aaj 1 1 1jo 26 10. i. 12. 13. 14, 15. 16. it. pla|r[a—>r]) p>@-7) [pag] ©) > 9) > 5 |) ojoyoy; i 1 7 0 T OO) 1 1 1 1 ojijol o 1 a 0 1 ojiti} a 1 1 1 1 1jojo] 1 1 0 1 1 1joji] 2 1 0 1 1 1jijo] 0 0 1 0 1 afajaf a 1 1 1 1 Propositions (a), (¢), (f), and (h) are tautologies. a ey Pe plair|p>@-r)|(p>g>@—r) [st ofofo 1 1 i o}oj1 1 1 1 oj1jo i if 1 ojala i a 1 1}o}o 1 a a 1jo}1 1 1 a 1{1}o 0 0 5 afaja 1 al z (a) 2 =32 (b) 2" (a) [(p Aq) Ar] + (8 V4) is false (0) when (p Aq) Ar is true (1) and sV¢ is false (0). Hence p,q, and r must be true (1) while s and t mmst be false (0). pid; 7:0; 3:0 (a) n=9 (b) n=19 (©) n=19 3,n=6 (>) m=3,n=9 (©) m=18,n=9 (@) m=4,n=9 () m=4,n=9 (a) 107-10 =90 (b) 20? - 20 = 380 (©) (10)(20) — 10 = 190 (a) (20)(10) - 10 = 190 Consider the following possibilities: (i) Suppose that either the first or the second statement is the true one. Then statements (3) and (4) are false — so their negations are true. And we find from (3) that Tyler did not eat the piece of pie — while from (4) we conchude that Tyler did eat the pie. (i) Now we'll suppose that statement (3) is the only true statement. So statements (3) and (4) no longer contradict each other. But now statement (2) is false, and we have Dawa 27 guilty (from statement (2)) and Tyler guilty (from statement (3)). (ii) Finally, consider the last possibility — that is, statement (4) is the true one. Once again statements (3) and (4) do not contradict each other, and here we learn from statement (2) that Dawn is the vile culprit. Section 2.2 @) @ plalr|aar[p>@ar [pal por] @g) Apr) ojoloy 0 1 T T i ojoj1] 0 1 1 1 1 of1jo} o 1 1 1 1 Oya 1 1 i i 1jolo] o 0 0 0 0 1fo}1] o 0 0 1 0 1]1}0] 0 0 1 0 0 ajijad a 1 1 1 1 @ Plale|pVa|@Va + [p> gr] @>nNAG>*) ofofo] 0 1 T T a Ojoj1} 0 1 1 a a O}1}o} 1 0 1 0 0 ojijay 1 1 1 1 1 ajojo] 1 0 0 1 0 ajoj1j] 1 1 1 1 1 aoe 0 0 0 0 ajar} 4 1 1 eh al (ai) plal+lavr |p @vr) [pa |r > 4) ojofol o 1 7 1 ofoj1] a 1 1 1 ofijo} 2 1 1 1 ofrjaf a 1 1 1 ijojo} o 0 0 0 rjoj1] 2 1 0 1 afafo] 1 1 1 1 afajafa 1 1 1 2. 3. 5. 6. b) Pov) = hrs 4)) From part (iii) of part (a) <= br > pv a) By the 2nd Substitution Rule, and (p + 4) <=> (~pV 4) = Fp V9) + 7-7} By the Ist Substitution Rule, and (s +t) <=> (st +78), for primitive statements s,¢ > [(-p Ang) 1) By DeMorgan’s Law, Double Negation and the 2nd Substitution Rule <= [(pA>g) +7] By Double Negation and the 2nd Substitution Rule piq|pAg| pvp) ofof 0 0 oj1] 0 0 ajo] o 1 ajaj 2 a a) For a primitive statement s, sV-s <4 Tp. Replace each occurrence of s by pV (qAr) and the result follows by the Ist Substitution Rule. b) For primitive statements s, t we have (¢ > t) <=> (>t + -s). Replace each occurrence of s by pV, and each occurrence of t by r, and the result is a consequence of the 1st Substitution Rule, (1) (Ag) Ar] Y [ Ag) Ar] <> (pAg) A(t V or) > (PAG) ATo => PAG (2) (Ag) V 74] = (PV 79) A(G V9) => (PV a) A Ta > PV 7g. Therefore, the given statement simplifies to (pV-9) +s or (gp) +s a) Kelsey placed her studies before her interest in cheerleading, but she (still) did not get a good education, b) Norma is not doing her mathematics homework or Karen is not practicing her piano lesson. c) Harold did pass his C++ course and he did finish his data structures project, but he did not graduate at the end of the semester. (a) IPA (a Vr) A (ap V 79 r)] = -PV (9 Aan) V (pAqA=r) => (aA ar) V pV (pAgqA-e)] => (mg Amr) V [To A (op V (g A m8))} > (0g. Amr) V [pV (GA oy] ee =pV (ng V9) An] <3 pV =r. (b) =[(pA 4g) + 1] => =[(p Ag) Vr] = (pag) Amr. () pA(aV7r) (a) -pA~gA-r 29 2 Cova A@AGAD) P ee of Horo Heocol> 0 0 l 1 b) (mpAg) V(pV (PV a) => PVG (a) gp > Vp, 80 (gp) = mg Ap. (b) p> (gAr) => pV (ahr), 50 fp > (GAr)]* => —PA(G Vr). (e) per g => (p> gAq > p) > (=PVa)A(~gVp), 80 (Pp + 4)" > (PAg)V(—4Ap)- (d) P¥a => (PAW) V (=PA Q), 80 (Pa)* => (pV ~4) A (>P V4). (a) #040 =0, then 24+2=1. Let p:0+0=0,q:1+1=1. (The implication: p+ ) - If 0+0 = 0, then 14+1=1. - False, (The Converse of p—+ g: ¢— p)- If 1+1=1, then 0+0=0. - True (The Inverse of p—> g: p+ 9) - f0+0 #0, then 141% 1. - True (The Contrapositive of p+ q: -q -» =p) ~ If 141 #1, then 0+0 £0. ~ False (b) H-1<3 and 347 = 10, then sin(#) =—1. (TRUE) Converse: If sin($¢) = —1, then ~1 <3 and 3+ 7=10. (TRUE) Inverse: If -1 > 3 or 3+7 # 10, then sin(%) # ~1. (TRUE) itive: If sin(%) A —1, then -1 > 3 or 347 #10. (b) ‘True (c) True a) (Q—r)v-p b) (-gvr)V-p pia | pa | pA og | pAg | PA av CpAg) ofofo} o 0 0 oli} 1} o 1 1 ajo} aj} 1 0 1 aij o | o 0 0 13. wa 1s. 16. Pla[r[woga@onAr ep Ps gAG> ACD] ofojo T t 1 ojo} 0 0 olijo 0 0 ojija 0 0 1jo}o 0 0 1jo]a 0 0 ififo 0 0 ajaja i 1 pla] pAg|a—>(pAg) [p> |g > (PAg)) ojo] 6 1 i (a)jofa} o 0 1 1}0 0 1 1 djl 1 i 1 (b) Replace each occurrence of p by pV q. Then we have the tautology (pV q) ~ |g > [(pV4q) Aq] by the first substitution rule. Since (pVq) Aq 4=> q, by the absorption laws, it follows that (pV q) + [q+ 9] <> To. pla|pVa|pAg|a— (pg) | (PVs) > lg AQ) ofoy 0] 0 1 1 @fofi} 1 | o 0 9 1/0 1 0 1 1 aja 1 i 1 1 So the given statement is not a tautology. If we try to apply the second substitution rule to the result in part (a) we would replace the first occurrence of p by pV q. But this does not result in a tautology because it is not a valid application of this substitution rule ~ for p is not logically equivalent to pV 4. (2) ~p <=> (pT p) (b) pV g => >(ap Ang) <=> (>p 179) => (pT P)T (gt 9) (ce) pAgq #2 77(p Ag) => (p19) = (PT a) TT) (d} pq = =pV a => “(pAng) = (pT 9) => PT (ata) (ce) pevg o> (pa) A(g > p) => tAu > (tf u) T(E Tu), where # stands for PT (qt) and u for gt (pt p). (2) ~p <= (pl p) (b) pV gq => (pV 9) = “Pla (Pla) lela) (©) pAg = ~>p Amng => (mp Lg) = (pL p) L(g ha) () page pve > (pla) lpia) [ele ld lieinid (e) perge> (rir) i (ss) where r stands for (pp) {ali (pL p) La] and s for (gba) Lali l(a) tal 31 17. F g| (P19) | Cp tna) | 19) | (op b-a) ojo; oO 0 0 0 ola} oa 1 0 9 ajo} 1 1 0 0 i{1 1 1 - - 18. (a) (eva) A(pV-a] Va Reasons @ bv @Anqalva Distributive Law of V over A & @VA)VG qAnq 4 Fa (Inverse Law) pvg pV Fy © p (Identity Law) (b) (Pa) AGA (r ¥>9)) Reasons & (po gang Absorption Law (and the Commutative Law of V) (“pV a) Avg p>qe-pVvg 7A (>pV a) Commutative Law of (ng Anp) V (a. AQ) Distributive Law of A over V & (aAnp)V Inverse Law gq Amp Identity Law # (VP) ‘DeMorgan’s Laws 19. (a) PV PA@Ya)] Reasons pvp Absorption Law 7 P Idempotent Law of V (b) pVaV(-pA~gAr) Reasons (pV) VO@Va) Ar} DeMorgan’s Laws & [pVaV-PVQIA@VaVr) Distributive Law of V over A @ ToA(pVaVr) Inverse Law @ pvavr Identity Law (ce) (sp ¥ 79) > (PAGAr)) Reasons “CPV mg) V(pAgAr) satensvt (mp Ang) V (pAgAr) DeMorgan’s Laws (pAg)V(PAgAr) Law of Double Negation pAG Absorption Law 20. (9) [pA (or Vg V ~a)}V [lr VEV 9) Ag] > Ip A (7 V TH V (To Vt) Ang] > (PAT) V (To Ag) => pV 7g (b) PV (pAg)V(pPAGAr)IA[(BArAt) V1] <=> pAt by the Absorption Law. 32 Section 2.3 a) ) Pla[r[p—>9| @Y¥a [OVO or o;ofo; i 0 sy ojoli} 2 0 1 Oa Olea 1 0 ofaji} 2 1 1 1jolo} o 1 0 1jol1} 0 1 1 ajajo} a 1 0 afajay a 1 1 ‘The validity of the argument follows from the results in the last row. (The first seven rows may be ignored.) (b) pia|r|@Aqg-r | -¢| pr | pV 4 ojolo 1 ieee sy o}of1 1 1] 1 1 of1jo 1 of 1 1 ofi}a i Oo; 4 1 1/010 1 a] o1 1 1fo}a 1 1] 0 1 ajilo 0 of} i 0 ajaja 1 ao} o o ‘The validity of the argument follows from the results in rows 1, 2, and 5 of the table. The results in the other five rows msy be ignored. ©) plate [avr [pv @vr) [pv G@vr Ane] pvr] ofofa; 0 o 0 0 Ojol1) 2 1 i a ojijo] 2 1 0 8 Ojita} 1 1 0 i rjojo] o 1 1 1 tlojaj 1 1 1 i ditjo} a 1 0 i afijat a 1 0 1 Consider the last two columns of this truth table. Here we find that whenever the truth value of [pV (q V r)] A-q is 1 then the truth value of pV r is also 1. Consequently, {PV (gVr)] Ang] > pvr. 33 3. (The rows of the table that are crucial for assessing the validity of the argument are rows 2, 5, and 6. Rows 1, 3, 4, 7, and 8 may be ignored.) 2) ) pla[r[p>afosr [pr [o> )AG> rl > O44) ofoyoy i i 1 T ofoja} 2 1 1 1 ofijo) 2 0 1 1 ojiji} 2 1 1 1 1]0j}0) 0 1 0 1 rlojal o 1 1 1 ajijof 4 0 a 1 ater atetd 1 al 1 b) Plalp=a| @>a)Ana| (p49) Ang] > ~p ofol 1 1 1 Oj1]; 2 0 1 ajo} o 0 1 alltisleesd 0 1 (eo) Pla|-p|pVa| (pV) An | [eV a) Ap] > 4 ojo; |] 0 0 i ojafa]a 1 1 1jojo]} 1 0 1 ajijo} 4 0 1 (4) plair|porla—r| pVva)—r| [p> rAGg rls ofojo, 7 T 1 i ofoji] a 1 1 a Ojijol a 0 0 1 ofalaf a 1 1 1 1joje} o 1 0° 1 ajoja} a 1 1 1 1filo} o 0 0 i ajajap 2 i 1 i (a) If p has the truth value 0, then so does pA q. (b) When pVq has the truth value 9, then the truth value of p (and that of 9) is 0. (c) If q has truth value 0, then the truth value of {(p V ¢) A -p] is 0, regardless of the truth value of p. (d) The statement gVs has truth value 0 only when each of g,¢ has truth value 0, Then 34 (pq) has truth value 1 when p has truth value 0; (r+ s) has truth value 1 when has truth value 0. But then (pVr) must have truth value 0, not 1. (e) For (pV -w) the truth value is 0 when both p,r have truth value 1. This then forces q,8 to have truth value 1, inorder for (p+ q), (r > ) to have truth value 1. However, this results in truth value 0 for (~g V7). {a) Janice’s daughter Angela will check Janice’s spark plugs. (Modus Ponens) (b) Brady did not solve the first problem correctly. (Modus Tollens) (c) This is a repeat-until loop. (Modus Ponens) (a) Tim watched television in the evening. (Modus Tollens) (a) Rule of Conjunetive Simplification (b) Invalid ~ attempt to argue by the converse (ec) Modus Tollens (d) Rule of Disjunctive Syllogism (e) Invalid - attempt to argue by the inverse (a) Steps Reasons QQ) qAr Premise @) ¢ Step (1) and the Rule of Conjunctive Simplification (3) avr Step (2) and the Rule of Disjunctive Amplification Consequently, (q Ar) + (qVr) is a tautology, or gAr = gVr. (b) Consider the truth value assignments p: 0, q:1, andr: 0. For these assignments [AG Ar)] Vp V (qAr)] has truth value 1, while [p A (qV r)] V 7[p V(qV r)] has truth value 0, Therefore, P -+ P, is not a tautology, or P # Py. (1)& (2) Premise 3) Steps (1), (2) and the Rule of Detachment @ Premise ) Step (4) and. (r > 1g) <=> (sq + ar) = (q > or) (6) Steps (3), (5) and the Rule of Detachment 0) Premise (8) Steps (6), (7) and the Rule of Disjunctive Syllogism (9) Step (8) and the Rule of Disjunctive Amplification Q) Premise (2) Step (1) and the Rule of Conjunctive Simplification (3) Premise (4) Steps (2), (3) and the Rule of Detachment 35 (8). (ty 2) Step (1) and the Rule of Conjunctive Simplification Steps (4), (5) and the Rule of Conjunction Premise Step (7) and [r -> ( Vt)] <=> [>(s Vt) > >] Step (8) and DeMorgan’s Laws Steps (6), (9) and the Rule of Detachment Premise Step (11) and [(-p Vg) > 7] <= [or > (pV. 9)] Step (12) and DeMorgan’s Laws and the Law of Double Negation Steps (10), (13) and the Rule of Detachment Step (14) and the Rule of Conjunctive Simplification Premise (‘The Negation of the Conclusion) Step (1) and (ng —+ 8) <= (74 V 8) <=9 “(g V 8) => -gAn5 Step (2) and the Rule of Conjurctive Simplification Premise Steps (3), (4) and the Rule of Disjunctive Syllogism Premise Step (2) and the Rule of Conjunetive Simplification Steps (6), (7) and Modus Tollens Premise Steps (8), (9) and the Rule of Disjunctive Syllogism Steps (5), (10) and the Rule of Conjunction Step (11) and the Method of Proof by Contradiction p94 Premise ~q—+7p Step (1) and (p + g) = (-q + -p) pvr Premise ~por Step (3) and (pVr) = (~p-+r) “qr Steps (2), (4) and the Law of the Syllogism ars Premise rs Step (6) and (-r Vs) <=9 (r= 8) ~q8 Steps (5), (7) and the Law of the Syllogism mpeg Premise (rpg) Aq 7p) Step (1) and (=p 9g) = [op > 2) Aa > >P)] 36 10. Se ered @) gar (®) por (6) oor (7) 2 (a) GQ) pAva 2) Pp (3) or (4) | pAr (5) 1 (PAr)Va (b) QQ) pepo Or Ces @ gor (5) ar © QQ) pag 2) -p (3) oor (4) =pAnr (3) 2. (pvr) (d) Q) rng Q) ~4 (3) pag 4). Step (2) and the Rule of Conjunctive Simplification Premise Steps (3), (4) and the Law of the Syllogism Premise Steps (5), (6) and Modus Tollens. Premise Step (1) and the Rule of Conjunctive Simplification Premise Steps (2), (3) and the Rule of Conjunction Step (4) and the Rule of Disjunctive Amplification Premises Step (1) and the Rule of Detachment Premise Step (3) and ~qVr += (g 7) Steps (2), (4) and the Rule of Detachment Premises Step (1) and Modus Tollens Premise Steps (2), (3) and the Rule of Conjunction Step (4) and DeMorgan’s Laws Premises Step (1) and the Rule of Detachment Premise Steps (2), (3) and Modus Tollens 37 © QP (Q) ~q—--p (3) po Oa (5) pAg (6) p>) (| (Pagar (8) or @ Q) pAg 2) Pp (3) p> (rAq) () rag (3) or (6) r(svt) (7) svt (8) 78 (9) ot () (1) 75, pVs QP (3) p> @->r) @ gor (3) t-¢@ (6) tor () J. wt (b) Q) -~pVr @Q) por Oe ae (3) Va (6) -~po9 9 Premise Premise Step (2) and (p + g) = (-q > ~p) Steps (1), (3) and the Rule of Detachment Steps (1), (4) and the Rule of Conjunction Premise Step (6), and [p — (q+ r)] <= [(pAq) +r] Steps (5), (7) and the Rule of Detachment Premise Step (1) and the Rule of Conjunctive Simplification Premise Steps (2), (3) and the Rule of Detachment Step (4) and the Rule of Conjunctive Simplification Premise Steps (5), (6) and the Rule of Detachment Premise Steps (7), (8) and the Rule of Disjunctive Syllogism Premises. Step (1) and the Rule of Disjunetive Syllogism Premise Steps (2), (3) and the Rule of Detachment Premise Steps (4), (5) and the Law of the Syllogism Step (6) and (t+ r) => (=r ~ -#) Premise Step (1) and (p +r) 4 (ap Vr) Premise Steps (2), (3) and Modus Tollens Premise Step (5) and (p V q) ¢ (~>p V q) ¢ (—p > 4) Steps (4), (6) and Modus Ponens 38 12. (@) pared a) p: Rochelle gets the supervisor's position. 4: Rochelle works hard. r: Rochelle gets a raise. s: Rochelle buys # new car. (pAg)>r ros — v pV-9 Q) 7 Premise Q) rs Premise @) 9 Steps (1), (2) and Modus Tollens @) (Agar Premise (5) Aa) Steps (3), (4) and Modus Tollens (6) PV 9 Step (5) and “(pA q) => =p V-g. b)_p: Dominic goes to the racetrack. Helen gets mad. Ralph plays cards all night. ‘armela gets mad. : Veronica is notified. pod ros (vs) >t =a pace Q) o4t Premise 2) (qVayrt Premise (3) ~@vs) Steps (1), (2) and Modus Tollens (4) -qAn8 Step (8) and >(q Vs) <=> 7g A78 @ -~« Step (4) and the Rule of Conjunctive Simplification © pa Premise @ ~» Steps (5), (6) and Modus Tollens () 7s Step (4) and the Rule of Conjunctive Simplification 39 @) ros Premise (10) =r Steps (8), (9) and Modus ‘Tollens (11). -pAnr Steps (7), (10) and the Rule of Conjunction c) p: There is a chance of rain. q: Lois’ red head scarf is missing. r: Lois does not mow her lawn. s: The temperature is over 80° F. @Va>r sp sh-q ‘The following truth value assignments provide a counterexample to the validity of this argument: p:0;q:0; ri; 6:1 (a) a p [alr [eval pvr [@Va) AGeVr) [avr [i> G@vr)) o fojo] o 1 0 0 1 0 jol1] 0 1 0 1 1 ojijo} 2 1 1 1 1 Oat 1 1 1 sh 1 jojo} 2 0 0 0 a a foja} 1 1 1 sh a 1jijo} 1 0 0 1 1 a fijaf 4 1 1 1 1 From the last column of the truth table it follows that {(p V q) A (7p Vr)] > (qr) is a tautology. Alternately we can try to see if there are truth values that can be assigned to p,q, and r so that (7 Vr) has truth value 0 while (pV), (pV r) both have truth value 1. For (y Vr) to have truth value 0, it follows that g: 0 and r : 0. Consequently, for (pV q) to have truth value 1, we have p: 1 since q : 0. Likewise, with r : 0 it follows that ap : 1 if (apV)r hes truth value 1. But we cannot have p: 1 and 7p: 1. So whenever (pV q), (7p Vr) have truth value 1, we have (q Vr) with truth value 1 and it follows that (pV 4) A (pV r)] > (Vr) is a tautology. Finally we can also argue as follows: 40 Steps pV ave (a) ¥ P ~4a>P apvr por ~qor war Steps pVv(qvr) (pVa)A(pvr) pvr ps =pVs “rvs Steps peg (pq) A(qP) poaq eva P eva (ev a)ACpva)] ava “od Steps PYG por —pVr va) Apr) avr rs ors {@ Va) Ar vs) “ave eer eye SNS we Sen Tee Reasons Premise Step (1) and the Commutative Law of V Step (2) and the Law of Double Negation Step (3), -9 > p> “(-9) VP Premise Step (5), pr ¢¢-pVr Steps (4), (6), and the Law of the Syllogism Step (7), -q 3 re qVF Reasons Premise Step (1) and the Distribution Law of V over A Step (2) and the Rule of Conjunctive Simplification Premise Step (4), ps4 —pVs Steps (3), (5), the Rule of Conjunction, and Resolution Reasons Premise (p+ 4) (p>) Ag ~ P)) Step (2) and the rule of Conjunctive Simplification Step (3), p+ —pVq Premise Step (5) and the Rule of Disjunctive Amplification Steps (6), (4), and the Rule of Conjunction Step (7) and Resolution Step (8) and the Idempotent Law of V. Reasons Premise Premise Step (2), p> r 4 apVr Steps (1), (8), and the Rule of Conjunction Step (4) and Resolution Premise Step (6), rs > -rVs Steps (5), (7), the Commutative Law of V, and the Rule of Conjunction 9. Step (8) and Resolution eres eee 41 10. Steps apVqV¥r av (-pVr) ~a nq (=p Vr) fav GVA bay Cp vey) (pvr) or ar V-p [ V-p) Ar ¥ >) “pe ex 10. 42 Reasons Premise Step (1) and the Commutative and Associative Laws of V Premise Step (3) and the Rule of Disjunctive Amplification Steps (2), (4), and the Rule of Conjunction Step (5), Resolution, and the Tdempotent Law of A Premise Step (7) and the Rule of Disjunctive Amplification Steps (6), (8), the Commutative Law of V, and the Rule of Conjunction Step (9), Resolution, and the Idempotent Law of V 10. oe 12. 13. 14, 1B. 16. (c) Consider the following assignments. p: Jonathan has his driver's license. q: Jonathan's new car is out of gas. r: Jonathan likes to drive his new car. Steps pV s pVavt pv(avt) [pV GV OIACEVs)] (vive av(tvs) nqVr llav(tys)} (tVa)Vr tV(sVr) at V(s Ar) (EV s)A (str) 7tVs [EVs Vr] ACV a) (sVr)Vs “rvs exe 10, i. 12. 13. 14. 15. 16. Reasons Premise Premise Step (2) and the Associative ‘Law of V Steps (3), (1), ond the Rule of Conjunction Step (4) and Resolution (and the First Substitution Rule) Step (5) and the Associative Law of V Premise Steps (6), (7), and the Rule of Conjunction Step (8) and Resolution (and the First Substitution Rule) Step (9) and the Associative Law of V Premise Step (11) and the Distributive Law of V over A Step (12) and the Rule of Conjunctive Simplification Steps (10), (13), and the Rule of Conjunction Step (14) and Resolution (and the First Substitution Rule) Step (15) and the Commutative, Associative, and Idempotent Laws of V ‘Then the given argument can be written in symbolic form as wv" pVor =qV7r Steps Reasons lL -pVa 1. Premise 2. pV-w 2. Premise 3. (pV=r)A(-pVg) 3. Steps (2), (1), and the Rule of Conjunction 4, ora 4. Step (3) and Resolution 5. gV-r 5. Step (4) and the Commutative Law of V 6. 3qVor 6. Premise 7. (qV ar) ACV a0) 7. Steps (5), (6), and the Rule of Conjunction 8 =r V-r 8. Step (7) and Resolution 9 tor 9. Step (8) and Idempotent Law of V Section 2.4 (a) False (b) False (©) False (a) True (e) False (f) False (a) (i) True Gi) True (iii) True (iv) True (b) The only substitution for x that makes the open statement [p(2) Aq(2)] Ar(z) into a true statement is x = 2. Statements (a), (c), and (e) are true, while statements (b), (d), and (£) are false. (a) Every polygon is a quadrilateral or a triangle (but not both). (True — for this universe.) (b) Every isosceles triangle is equilateral. (False) (c) There exists a triangle with an interior angle that exceeds 180°. (False) (a) A triangle has all of its interior angles equal if and only if it is an equilateral triangle. (True) {e) There exists a quadrilateral that is not a rectangle. (True) (8) There exists a rectangle that is not a square. (True) (g) If all the sides of a polygon are equal, then the polygon is an equilateral triangle. (Palse) (h) No triangle has an interior engle that exceeds 180°. (‘True) (A polygon (of three or four sides) is a square if and only if all of its interior angles are ‘equal and all of its sides are equal. (False) () A triongle has all interior angles equal if and only if all of its sides are equal. (True) 44 10. (a) 3 f(x) A oz) Ai(2)] True (b) Az [s(z) A o(2) A=m(z)] ‘True (6) Ve fol) -» (m(2) ¥ w(2))] False (2) Ve [(gl2) Ael2)) > we), 7 or Vz [(a(z) Ael2)) > ~a(a)}, or Ve [(a(2) Ap(2)) > ~e(2)} (©) Ve [(e(z) A s(z)) > (2) V e(z))], True + (a) (a) True (>) True (c) False (a) True (©) False (8) False (i) Bz a(z) Gi) 3s [p(z) Ad(z)] (iil) Ve [g(2) + ~#(2)] (iv) Ve [a(2) > >t(z)] (v) 3x (g(x) Ae(z)] (vi) We [(g(z) Ar(z)) — s(2)] (b) Statements (i), (iv), (v), and (vi) are true. Statements (ii) and (iii) are false: 2 = 10 provides a counterexample for either statement. © (i) Ix is a perfect square, then 2 > 0. (ii) If 2 is divisible by 4, then 2 is even. (iii) If zis divisible by 4, then 2 is not divisible by 5. (iv) There exists an integer that is divisible by 4 but it is not a perfect square (a) (Let « =0. (iii) Let x = 20. (a) True (b) False: For 2 =1, q(2) is true while p(z) is false. (c) True (d) True (ec) True (f) True (g) True (h) False: For z= ~1, (p(z) V g(z)) is true but r(x) is false. (a) Gi) True (ii) False- Consider 2 = 3. (ii) True Gv) Tr ®) @) Tue (i) aloe - Consider 2 = 3. ) True (iv) ‘True © ‘True (ii) True (ii) True (iv) False - For z = 2 or 5, the truth value of p(x) is 1 while that of r(z) is 0. (a) Vin Alm,n] >0 (b) ¥m,n 0 < Alm,n} < 70 i. 12, 13. 14, 15. 16. at. (©) 3mn Alm,n] > 60 (a) Vm {(1 Sn < 19) > (Alm, n] < Afm,n + 1))] (©) Yn [(1 (Alm n] # ALD) (a) In this case the variable 2 is free while the variables y, 2 are bound, (b) Here the variables x,y are bound; the variable 2 is free. (a) (i) False (i) True (ii) True (iv) False, if2=0 (v) False, ifr=0 (vi) True (wii) False — If y = 0 then 2 4 0; if y # 0, let 2 = 2y. (viii) False — Let 2 = 2 and y = ~2, for example. (b) Statements (iv), (v), and (viii) are now true — because of the change in universe. (c) Gi) Tre (i) True (ii) True (iv) False — For any y consider 2 = 2y. (a) p(2,3) A p(3,3) A v6, 3) (b) {p(2,2) V p(2,3) V p(2, 5)] V [p(3, 2) V 2(3,3) V p(3,5)] V [p(5, 2) V (5, 3) V p(5,5)] (©) [p(2, 2) v p(3, 2) V p(5, 2)] A [p(2, 3) V p(3, 3) V p(5, 3)] A [p(2, 5) V p(3, 5) V p65, 5)} Statements (a), (b), (e), and (£) are logically equivalent and each may be expressed as Vnla(n) — p(n)]. Statements (c), (g) are logically equivalent and each may be expressed as Vnip(n) + q(n)}. Statement (d) is not logically equivalent to any of the other six statements. 8) The proposed negation is correct and is a true statement. b) The proposed negation is wrong. A correct version of the negation is: For all rational numbers z,y, the sum 2 + is rational, This correct version of the negation is a true statement. ¢) The proposed negation is correct — but false. The (original) statement is true. 4) The proposed negation is wrong. A correct version of the negation is: For all integers 2,¥, if z,y are both odd, then zy is even. ‘The (original) statement is true. (a) Some student in Professor Lenhart’s C++ class is not majoring in either computer science or mathematics. (b) If student is in Professor Lenhart’s C++ class, then that student is not majoring in history. or, No student majoring in history is in Professor Lenhart’s C++ class. 2) There exists an integer n such that n is not divisible by 2 but n is even (that is, not odd). b) There exist integers k,m,n such that k —m and m~n are odd, and k ~n is odd. 46 18. 19. 20, ¢) For some real number x, 2? > 16 but —4 <2 <4 (that is, -4 10. (a) Ve [-p(z) A -9(2)] (b) 3x [-p(2) V a(=)] (c) 3x [p(2) A -9(2)] (€) Vz [(p(2) V o(z)) A -r(@)] (a) Statement: For all positive integers m,n, if m > n then m? > n®. (TRUE) Converse: For all positive integers m,n, if m? > n? then m > n. (TRUE) Inverse: For all positive integers m,n, if m 6 then a? > #. (FALSE — let ¢ = 1 and b=-2) Converse: For all integers a, , if a? > § then a > 6. (FALSE — let a = ~5 and b= 3.) Inverse: For all integers a,}, if a < 6 then a? < #, (FALSE — let a = —5 and 6 = 3. Contrapositive: For all integers a,}, if a? 3) (2? >9)] (TRUE) Converse: Vz {(2? > 9)—+ (x > 3)} (FALSE — let Inverse: Vz [(z <3) + (2? < 9)} (FALSE — let Contrapositive: Vz {(2? < 9) + (2 <3)] (TRUE) (e) Statement: Vz (2? +42 —21 > 0) + [(z > 3) V (2 < -7)}] (TRUE) Converse: Vz [[(z > 3) V(x < ~7)] ~» (c? +42 — 21 > 0)] (TRUE) Inverse: Wz [(2? + 4x ~21 < 0) + (x <8) A(z > ~7)]}, oF Ve [(2? +42 — 21 <0) + (-7$2$3)] (TRUE) Contrapositive: We {[(x < 3) A (e > -7)] > (2? +42 - 21 < 0), or Vz ((-7 <2 <3) > (2? + 42 ~ 21 < 0)] (TRUE) -5) 2c) For each of the following answers it is possible to have the implication and its contrapositive interchanged. When this happens the corresponding converse and inverse must also be interchanged. (8) buplication: If a positive integer is divisible by 21, then it is divisible by 7. (TRUE) Converse: If a positive integer is divisible by 7, then it is divisible by 21. (FALSE — consider the positive integer 14.) a7 2. 22, 24, 25. 26. 2. Inverse: If a positive integer is not divisible by 21, then it is not divisible by 7. (FALSE — consider the positive integer 14.) Contrapositive: If a positive integer is not divisible by 7, then it is not divisible by 21. (TRUE) {b) Implication: If a snake is a cobra, then it is dangerous. Converse: If a snake is dangerous, then it is a cobra. Inverse: If a snake is not @ cobra, then it is not dangerous. Contrapositive: Hf a snake is not dangerous, then it is not a cobra. (c) Implication: For each complex number 2, if 2? is real then z is real. (FALSE — let z=i) For each complex number z, if z is real then 2? is real. (TRUE) Inverse: For each complex number 2, if 2? is not real then 2 is not real. (TRUE) Contrapositive: For each complex mumber 2, if z is not real then 2? is not real. (FALSE —let 2 =i.) (2) ‘True (b) False (©) False (a) True (e) False (a) True (b) False (c) True (a) True (e) True (a) Va3[a+o=b+a=0] (b) 3uVa [au = ua = a (c) Wa 40 3b [ad ql (d) The statement in part (b) remains true but the statement in part (c) is no longer true for this new universe. (a) ‘True (b) False (c) False (a) True (a) 32 3y[(e > y)A@—yS0)] (b) 3x Sy [(2 2V2>y)] (©) 3 3y [lel = [wl A(y # £2)] Bim ra # Lp 3e>0 Vk >0 Sn [n> Alm L124 Section 2.5 Although we may write 28 = 25+14+141=16+444-44, there is no way to express 28 as the sum of at most three perfect squares. Although 3= 1+141 and 5 = 441, when we get to 7 there is a problem. We can write 7 = 4414141, but we cannot write 7 as the sum of three or fewer perfect squares. [There is also a problem with the integers 15 and 23.) 48 5. Here we find that 30=25+441 40 = 3644 50 = 25 +25, 32=16+16 42=25+16+1 52 = 36+16 34= 2549 44 = 364444 54 = 2542544 36 = 36 46 = 36+941 38 = 364141 48 = 16 +16 +16 58 = 4949 4=242 16 = 13+3 B= B+5 6=343 18 = 1345 30 = 17413 8=3+5 20 = 1743 32=19413 1 =545 22= 1745 B4=17417 W=T+5 2a lT+7 36 = 19+ 17 W=T+7 26 = 19+7 38 = 19419 (a) The real number x is not an integer. (b) Margaret is a librarian. (c) All administrative directors know how to delegate authority. (4) Quadrilateral MNVPQ is not equiangular. (a) Valid — This argument follows from the Rule of Universal Specification and Modus Ponens. (b) Invalid — Attempt to argue by the converse. (c) Invalid — Attempt to argue by the inverse, (a) When the statement 3z [p(z) V q(2)] is true, there is at least one element ¢ in the prescribed universe where p(c) V q(c) is true. Hence at least one of the statements p(c), q(c) has the truth value 1, so at least one of the statements 3z p(z) and 3r 4(z) is true, Therefore, it follows that 3z p(e) V 3x q(z) is true, and 3x (p(x) V q(2)} => Be pz) V 3¢ g(z). Conversely, if 32 p(x) V A g(z) is true, then at least one of (a), 9(b) has truth value 1, for some a, b in the preseribed universe. Assume without loss of generality that it is p(a). Then p(a) V q(a) has truth value 10 32 [p(z) V q(2)} is a true statement, and 3¢ p(x) V 3r q(x) => 3z [p(x) V 4(2)). (b) First consider when the statement Vz [p(z) A q(2)] is true. This occurs when (a) A q(a) is true for each a in the prescribed universe. Then p(a) is true (as is q(a)) for all a in the universe, ¢o the statements Vz p(x), Ve g(z) are true. Therefore, the statement Vz p(z) A Vz q(2) is true and Vz {p(z) A 9(z)] = Vz pl2) A Vz 92). Conversely, suppose that Vz p(2) A Vz q(2) is a true statement. Then Vz (2), Vz q(z) are both true. So now let c be any element in the prescribed universe. Then pic), 9(c), and p(c) Ag(c) are all true, And, since ¢ was chosen arbitrarily, it follows that the statement Va [plz) A a(z)] is true, and Vz p(x) A Vr q(2) => Ve [plz) A 9(2)). {a) Suppose that the statement Vz p(z) V Vz g(z) is true, and suppose without loss of generality thai Vz p(z) is true, Then for each c in the given universe p(c) is true, as is 49 10. 1. (c)V g(c). Hence Vz [p(x) V q(z)] is true and Vz p(x) V Ve q(z) => Vz [p(2) V a(z)]- (b) Let p(z): 2>0 and q(z): 2 <0 for the universe of all nonzero integers. Thea Ve p(z), Vz q(z) are false, so Vr p(x) V Vz q(z) is false, while Vz [p(z) V q(2)] is true. (1) Premise (2) Premise (8) Step (1) and the Rule of Universal Specification (4) Step (2) and the Rule of Universal Specification (5) Step (4) and the Rule of Conjunctive Simplification (6) Steps (5), (3), and Modus Ponens (7) Step (6) and the Rule of Conjunctive Simplification (8) Step (4) and the Rule of Conjunetive Simplification (9) Steps (7), (8), and the Rule of Conjunction (10) Step (9) and the Rule of Universal Generalization (4) Step (1) and the Rule of Universal Specification (5) Steps (3), (4), and the Rule of Disjunctive Syllogism. (6) Premise (7) Step (6) and the Rule of Universal Specification (8) Step (7) and ~g(a) V r(a) 9 g(a) — (a) (9) Steps (5), (8), and Modus Ponens (or the Rule of Detachment) (10) Premise (11) Step (10) and the Rule of Universal Specification (12) Step (11) and s(a) -+ -r(a) 4 --r(a) > 15(a) 4 r(a) + 9a) (13) Steps (9), (12), and Modus Ponens (or the Rule of Detachment) Consider the open statements wo(z): 2 works for the credit union A(z): x writes loan applications ez): 2 knows COBOL az): x knows Excel and let r represent Roxe and é represent Imogene. In symoblic form the given argument is given as follows: Ve [w(2) —» ef2)} Ve [(w(2) A €(2)) + o(2)} w(r) Ara(r) i A- AT as} Awl) ‘The steps (and reasons) needed to verify this argument can now be presented. 12. 13. Steps Reasons (2) Ve [w(x) > e(2)] Premise (2) afi) A >eft) Premise (3) >4(#) Step (2) and the Rule of Conjunctive Simplification (4) w(t) + efi) Step (1) and the Rule of Universal Specification (5) -w(i) Steps (3), (4), and Modus Tollens (6) Vz [(w(2) A e2)) ~ a(z)! Premise (7) w(r) Ana(r) Premise (8) >a(r) Step (7) and the Rule of Conjunctive Simplification (9) (w(r) A er) + afr) Step (6) and the Rule of Universal Specification (10) >(w(r) Ar) Steps (8}, (9), and Modus Tollens (11) w(r) Step (7) and the Rule of Conjunctive Simplification (12) sw(r) v -é(r) Step (10) and DeMorgan’s Law (13) >€(r) Steps (11), (12), and the Rule of Disjunctive Syllogism. (14) 2% al(r) A wi) Steps (13), (5), and the Rule of Conjunction (a) Proof: Since k,£ are both even we may write k = 2c and £ = 2d, where ¢,d are integers. This follows from Definition 2.8. Then the sum k+¢ = 2c-42d = 2(¢-+d) by the distributive law of multiplication over addition for integers. Consequently, by Definition 2.8, it follows from k + €= 2(c-+d), with +d an integer, that k + € is even. (b) Proof; As in part (a) we write & = 2c and ¢ = 2d for integers ¢,d. Then — by the commutative and associative laws of multiplication for integers — the product, Ke = (2c)(2d) = 2(2cd), where 2cd is an integer. With (2c)(2d) = 2(2cd), and 2ed an integer, it now follows from Definition 2.8 that kl is even. (a) Contrapositive: For all integers k and &, if k, é are not both odd then ké is not odd. — OR, For all integers k and é, if at least one of k, € is even then Ké is even. Proof: Let us assume (without loss of generality) that k is even. Then k = 2c for some integer c — because of Definition 2.8. Then kf = (2c)é = 2(cé), by the associative law of multiplication for integers — and cé is an integer. Consequently, kf is even — once again, by Definition 2.8. {Note that this result does not require anything about the integer £.] (b) Contrapositive: For all integers & and ¢, if k and @ are not both even or both odd then k + Cis odd. — OR, For all integers & and 4, if one of k, £ is odd and the other even then & + €is odd. Proof: Let us assume (without lose of generality) that & is even and ¢ is odd. Then it follows from Definition 2.8 that we may write k = 2e and £ = 2d+ 1 for integers ¢ and d. And now we find that k+ € = 2c+ (2d-+1) = 2(c+d) +1, where c+ is an integer — by the associative law of addition and the distributive law of multiplication over addition for integers. From Definition 2.8 we find that k + = 2(c+d) +1 implies that k + £ is odd. 51 14. 15. 16. 1T. 18. 19, Proof: Since n is odd we may write n = 2a + 1, where a is an integer — by Definition 2.8. Then n? = (2a +1)? = 4a? + 4a + 1 = 2(2a? + 2a) + 1, where 2a? + 2a is an integer. So again by Definition 2.8 it follows that n? is odd. Proof: Assume that for some integer n, n? is odd while n is not odd. Then n is even and we may write n = 2a, for some integer a — by Definition 2.8. Consequently, n? = (2a)? = (2a)(2a) = (2-2)(a-a), by the commutative and associative laws of multiplication for integers. Hence, we may write n? = 2(2a), with 2a? an integer — and this means that n? is even. Thus we have arrived at # contradiction since we now have n? both odd (at the start) and even. This contradiction came about from the false assumption that n is not odd. Therefore, for every integer n, it follows that n® odd = n odd. Here we must prove two results — namely, (i) if n? is even, then n is even; and (ii) ifn is even, then n? is even. Proof (i): Using the method of contraposition, suppose that n is not even — that is, n is odd. Then n = 2a+1, for some integer a, and n? = (2a+1)? = 4a?+4a+1 = 2(2a7+2a)+1, where 2a? + 2a is an integer. Hence n? is odd (or, not even). Proof (ii): If n is even then n = 2c for some integer ¢. Son? = (2c)? = (2¢)(2c) = %e(2e)) = 2((c-2)e) = 2((2c)e) = 2(2c?), by the associative and commutative laws of multiplication for integers. Since 2c? is an integer, it follows that n? is even. Proof: (1) Since n is odd we have n = 2a + 1 for some integer a, Then n +11 =(2a41)+11= 2a +12 = 2(a +6), where a +6 is an integer. So by Definition 2.8 it follows that n +11 is even. (2) If +11 is not even, then it is odd and we have n + 11 = 26 +1, for some integer b. So n = (2b+1) - 11 = 2b— 10 = 2( — 5), where b— 5 is an integer, and it follows from Definition 2.8 that n is even — that is, not odd. (3) In this case we stay with the hypothesis — that n is odd — and also assume that n+ 11 is not even — hence, odd. So we may write n +11 = 26+ 1, for some integer b, ‘This then implies that n = 2(b ~ 5), for the integer 6 ~ 5. So by Definition 2.8 it follows that nis even. But with n both even (as shown) and odd (as in the hypothesis) we have arrived at a contradiction. So our assumption was wrong, and it now follows that n+ 11 is even for every odd integer n. Proof: {Here we provide a direct proof] Since m,n are perfect squares, we may write m = @ and n = J, where a,b are (positive) integers. Then by the associative and commutative laws of multiplication for integers we find that mn = (a?)(b*) = (aa)(Bb) = ((aa)b)o = (alab))b = ((ab)a)b = (ab){ab) = (ab)*, so rn is also a perfect square. ‘This result is not true, in general. For example, m = 4 = 2? and n = 1 = 1? are two positive integers that are perfect squares, but m+n = 2?+1? = 5 is not a perfect square. 20, 21. 22. 23. 24, Let m = 9 = 3? and n =16=4?. Then m+n = 25 = 5?, so the result is true. Proof: We shall prove the given result by establishing the truth of its (logically equivalent) contrapositive. Let us consider the negation of the conclusion — that is, x < 50 and y < 50, Then with zx < 50 and y < 50 it follows that z + y < 50 +50 = 100, and we have the negation of the hypothesis. The given result now follows by this indirect method of proof (by the contrapositive). Proof: Since 4n +7 = 4n+6+1 = 2(2n +3)+1, it follows from Definition 2.8 that 4n +7. is odd. Proof: If n is odd, then n 2k +1)+8= Mk +748 = 14k $15 = 14k +14 from Definition 2.8 that 7n +8 is odd. To establish the converse, suppose that n is not odd. ‘Then n is even, so we can write n = 2t, for some (particular) integer #, But then 7n +8 = 7(2t) +8 = dt +8 = 2(7t +4), 80 it follows from Definition 2.8 that 7n-+8 is even — that is, 7n-+8 is not odd. Consequently, the converse follows by contraposition. 2k + 1 for some (particular) integer k. Then Tn +8 = = 7k+7) +1. It then follows Proof: If n is even, then n = 2k for some (particular) integer &. ‘Then 3in +12 = 31(2k) + 12 = 62k +12 = 231k +6), s0 it follows from Definition 2.8 that 31n + 12 is even. Conversely, suppose that n is not even. Then n is odd, so n = 2t + 1 for some (particular) integer t, Therefore, 3in-+12 = 31(2t+1)+12 = 62¢+31+ 12 = 62¢-+43 = 2(31t +21) +1, so from Definition 2.8 we have 31n +12 odd - hence, not even. Consequently, the converse follows by contraposition. 33 Supplementary Exercises To cocoon nce 5 = e F t than noonnannncol fal a Gono ncen < s S| it T a c Be cooncocnccenccs| [F q tlenonana A : r gleoecconnccccoenn! FF S| ee wjonononononononon| |al tlponnoonnoouncenn| [ilenonens vlocoonuanococnunn| [soounoen RJOOCSTSCOCOCOCOH HAHAH He! BAalococonan (b) If py then q, else r. 54 3. 4, ie Plalrlaer|pogen[pedl@ager ofofo}| 2 0 i 0 ojoj1) o 1 1 1 ojijo| o 1 0 1 Ofiji} a 0 0 0 1jojo) 2 1 0 1 1joj1] 0 0 0 0 1}ijo} o 0 1 0 aprtiy 1 1 1 Ii follows from the results in columns 5 and 7 that {p 4 (¢ + r)} 4 [(p 4 4) 4 7). (b) The truth value assiguments p : 0; q: 0; r : 0 sesult in the truth value 1 for Ip (q+ r)] and 0 for [(p 4) +r]. Consequently, these statements are not logically equivalent. Pog => (p—+q)A(q > p) => (“PV ag) A(mg Vp), 80 (pg) => PV a) V9 p) = (pAm9) V (g Amp) Since p Vag € 7p V7q & Tp —+ 74, we can express the given statement as: (1) If Kaylyn does not practice her piano lessons, then she cannot go to the movies. But pV 7g 4 7g V p 4 g — p, so we can also express the given statement as: (2) If Kaylyn is to go to the movies, then she will have to practice her piano lessons. a) P>(@Ar) Converse: (qr) > p Inverse: [>p + 7(q Ar)] @ [=p > (re V-7)} Contrapositive: [(q Ar) + =p] 4 {(-9 Var) ~~] b) (Va) Fr Converse: r+ (pV) Inverse: [=(p V q) — =r] # [(>p A>g) > >] Contrapositive: [ar + >(pV 9)] @ [ar > (=p Amg)} @) (pV 7q) (BV p) Ap (b) (pV 7a) A(FoV p)Ap > (pV a) A(pAn) RyVp ep = (pV 7a) AP Tdempotent Law of A > pA(-pV-9) Commutative Law of A => (pAnp)V (pAna) Distributive Law of A over V «+ Fv (pang) pAnap es Fy = pang Fe is the identity for v. 55, 8. 10. (a) (PAng) V (or As) (b) Since p+ (gA=r Aa) @ ~pV (gr A 8) it follows that [p + (¢A ar As)]? apA(qV 77 V8). (0) (PAP)VGADIAVsv Fl (a) contrapositive (b) inverse (c) contrapositive (a) inverse (e) converse Proof by Contradiction Q) -@>s) Premise (Negation of Conclusion) (@) pans Step (1), (p+ s) => pV, DeMorgan’s Laws, and the Law of Double Negation (3) Pp Step (2) and the Rule of Conjunctive Simplification (4) pag Premise (@) 4 Steps (3), (4), and the Rule of Detachment @ +r Premise (7) qAr Steps (5), (6), and the Rule of Conjunction (8) (@Ar)>s Premise (@) Steps (7), (8), and the Rule of Detachment (10) =s Step (2) and the Rule of Conjunctive Simplification (11) sA-s (43 F) Steps (9), (10), and the Rule of Conjunction (12) pos Steps (1), (11), and the Method of Proof by Contradiction Method 2 () (qAr)+s — Premise Q) ra(q>s) ra(q>s)ee(ghr)os @ r Premise () ants Steps (2), (3), and Modus Ponens 6) pa Premise (©) ..p—s Steps (4), (5), and the Law of the Syllogism 56 1. Method 3 Q) @ @) (4) (8) (6) @) (8) (9) (@Ar)—s Premise m8 -» (qr) Step (1) and for primitive statements u,v sV(gAr) uv ¢ vw ~ and the Ist Substitution Rule. Step (2) and for primitive statements u,v,u—+ v <=> u V0 ~ and the Ist Substitution Rule, Also, 8 <=> s. (sV-g)V-r Step (3), DeMorgan’s Law, and the Associative Law of V r 3g qos pag pos Premise Steps (4), (5), and the Law of Disjunctive Syllogism Step (6) and s V-~g <=> V8 => qs Premise Steps (7), (8), and the Law of the Syllogism. Method 4 (Here we assume p as an additional premise and obtain s as our conclusion.) Q) p Premise (assumed) (2) pq Premise (3) ¢ Steps (1), (2), and Modus Ponens (4) or Premise (8) qAr ‘Steps (3), (4), and the Rule of Conjunction (6) (qAr)->s Premise (1) es Steps (5), (6), and Modus Ponens ) [pJeTr Tp val@VoVrlavr[py@yr ofolo o oO oO oO OjO}1 0 1 1 1 O10 1 1 1 1 O;1j1 1 0 0 0 ijolo 1 1 0 1 1jolr 1 0 1 QO rjije 0 9 1 0 Uji 8 i o i It follows from the results in columns 5 and 7 that [(p ¥ g) Vr] <=> ([p ¥ (q ¥ rj. (b) The given statements are not logically equivalent. The truth value assignments ; 7:0 provide a counterexample. pil; 37 12. 13. 14. 15. 16. p: The temperature is cool on Friday. qi Craig wears his suede jacket. r: The pockets (of the suede jacket) are mended. po(r4) Aor ng ‘The argument is invalid. The truth value assignments p:1; g:1; 1:0 providea counterexample. (a) True (b) False (c) True (a) True (ec) False () False (g) False (a) True a) This statement is true, Note that 1 = 7(—2) + (3), so for each integer 2, 2 = 1(—22) + (32). b) Since 2 divides both 4 and 6, it follows that 2 divides 4y +62. Consequently, the result, ig false for each odd integer x. [Since 2 = 4(~1) + 6(1), the result is true for each even integer x] Suppose that the 62 squares in this 8 x 8 chessboard (with two opposite missing corners) can be covered with 31 dominos. We agree to place each domino on the board so that the blue part is on top of a blue square (and the white part is then necessarily above a white square). The given chessboard contains 30 blue squares and 32 white ones. Each domino covers one blue and one white square ~ for a total of 31 blue squares and 31 white ones. This contradiction tells us that we cannot cover this 62 square chessboard with the 31 dominos. Suppose that the 60 squares in the 8 x 8 chessboard (with two squares ~ one blue and ‘one white ~ removed from each of two opposite corners) can be covered with 15 of these ‘T-shaped figures. When covering the chessboard we agree to place each T-shaped figure on the board so that the color of each square in the T-shaped figure matches the color of the chessboard square that it covers. Let n be the number of T-shaped figures with three ine sqnares (and one white one) used in the covering. The chesshoard contains 30 blue. squares, s0 it follows that 3n+1-(15n ~n Consequently, 2n = 15 ~ so 15 is both odd and even. This contradiction tells us that we cannot cover the given cheseboard with these T-shaped figures. 10. i. CHAPTER 3 SET THEORY Section 3.1 ‘They are all the same set. Alll of the statements are true except for part (f). All of the statements are true except for parts (b) and (d). All of the statements are true except for parts (a) and (b). (a) {0,2} (b) {2,24,33,53, 74} (©) {0, 2, 12, 36, 80} (a) True (b) ‘True (c) True (4) False (e) True (0) False (a) Ve[r€A—>2 EB) A ar [re B Arg Al (b) ered Ax ¢ Bl V Ve (2 gBVre Al (a) 27 = 128 (b) 128—1= 127 (We substract 1 for 9). (c) 128~1=127 (We subtract 1 for A) (a) 126 @ (3) =35 (£) For each of the other five elements of A there are two choices: Include it with 1,2 in a subset or exclude it from a subset that contains 1,2. By the rule of product there are 2 subsets containing 1,2. Ow O+Q+Q+Q=% & Q+Q+Q+G ae (a) |4l=6 (b) [Bl=7 (c) Mf B has 2" subsets of odd cardinality, then |B| = n+ 1. ‘The only nonempty sets are in parts (d) and (f). (a) There are 2*—1 = 31 nonempty subsets for the set consisting of one penny, one nickel, one dime, one quarter and one half-dollar. (ob) 30 () 8 12. 1B. 14. 15. 16. 17. 18, (a) (3) = 924 (b) (()(¢) = 225 () %-1=63 (@) (3) (b) 9. the smallest element in A is 5 we must select the other four elements in A from {6,7,8,..-,29,30}. This can be done in (7°) ways. (c) Let 2 denote the smallest element in A. Then there are four cases to consider. (z=1) Here we can choose the other four elements in (7°) ways. (= =2) Here there are (4) selections. (=3) There are (77) subsets possible here. (2 =4) In this last case we have (*f) possibilities. In total there are (%) + (**) + (77) + (%*) subsets A where |Aj = 5 and the smallest element in A is less than 5. (a) There are 2" subsets for {1,2,3,...,11}, and 2° subsets for {1,3,5,7,9,11}. The 2 subsets of {1,3,5,7,9,11} contain none of the even integers 2,4,6,8,10. Hence, there are 21! 2° = 1984 subsets of {1,2,, ,11} that contain at least one even integer. (b) 217-26 = 4032 (©) For n= 2k+1, where & > 0, the number of subsets of {1,2,3,...,n} containing at least one even integer is 2" — 24+, For n= 2k, with k > 1, the number of such subsets is 2" — 2*, Let W = {1}, X = {{1},2}, ¥ = {X,3}. (n= 6) 1 6 1520 15 6 1 (n=7) 1 7 2h 3588 21 7 1 (m=8) 1 8 8 86 7m 86 28 8 1 (a) Let 2 € A. Since ACB, 2 €B. Then with BCC, 2€C. So re A=H2EC and ACC. (b) Since AC B=+ AC B, by part (a), ACC. With AC B, there is an clement = € B ouch that 2 ¢ A. Since BCC, 2 € B= € C, so there is an element «2 € 0 with o ¢ A and ACO. (©) Since BC C it follows that BC C, 0 by part (a) we have AC C. Also, BCC => 3r€U(z € CAz ¢ B). Smee ACB,2 ¢ B=>z ¢ A. S0 ACC and 3r€U (2 € Caz ¢ A). Hence ACC. (a) Since AC B= ACB, the result follows from part (¢). False, Let A= {i}, B= {1,2}, and C= {1,3}. 19, 20. 2 22. (a) Forn,k € Z with n > k+1, consider the hexagon centered at (). ‘This has the form @) @) @ (as) Gide Gh) where the two alternating triples - namely, (771), (.2,),("P)) and ("7"), (EH), Ga) - sotisty (522) G2) (*E') = (*2') (GE) (2s)- () FormbeZ* with n>k+1, Ga)Gi CT) = feel erat el le 7 law 7 a le aie . al eprceresy) (2)() (2) (a) Each of these strictly increasing sequences of integers corresponds with a subset of {2,3,4,5,6}. Therefore there are 2° such strictly increasing sequences. (b) 2 (c) 2 and 2% (d) Let m,n be positive integers with m nl = 2(n- 1} n=20. a) 2n b) 4n=2n ©) &n For a given n € N, we need to find k € N so that the three consecutive entries @) Gens (et) are in the ratio 1: 2:3. [Consequently, n > 2 (and & 2 0).] In order to obtain the given ratio we must have n n n n (.is)=2(2) s# (22,)=a(0) From (,3,) = 2(7) 1 i follows that 2am = papi © 2k + 2=n-k orn = 243k. Likewise, (,1,) = 3(t) implies that Satay = qqaytiacay, and we find that 3(b+2)(k+1) = (n-k)(n—k~1), Consequently, with n = 2+3k, we have 3(k-+2)(k-+1) = 61 24, 25. 8 27. 28. (2 +2k)(1 +2k), or 0 = K? ~ 3k 4 = (k ~4)(k +1). Since k > 0, it follows that k= 4 and n = 14, So the Sth, 6th, and 7th entries in the row for n = 14 provide the unique solution. ‘0000 6 0011 {yz} 1000 fu} 1011 {wuz} 1100 {w,2) qt {w, 2, ys2} 0100 {2} oll {2,y,z} 0110 {zy} 0101 {2,2} 110 {w,z,y} 1101 {w, 2,2} 1010 {u,u} 1001 {w,2} 9010 tu} 0001 {2} ‘As an ordered set, A= {2,0,1,7,y}- a) () 4 (2) +O) 44 CG) +2) = C2) 48) C24) ea eC) = CP) + CCE) CE aC) = CP eC eo “r= (CY) +t CE) + (CP) == CH) +r) =) , (a) If S €S, then since $ = {AIA ¢ A} we have S¢ S. (b) If S ¢ S, then by the definition of S it follows that S € 8. (b) 10 Random 20 Dim B12), $(6) B(4) = 5: 17: B(8) = 19 50 B(9) = 23: B(10) = 29: B(11) = 31: B(12) = 37 60 ForI=1T06 70 S(I) = Int(Rnd*40) + 1 80 For J=1Tol-1 90 if S(3) = S(1) Then GOTO 70 100 Next 5 110 Next I 120 ForI=1T06 130 For J =1To 12 40 If S(I) = B(J) Then GOTO 170 150 Next J 160 GOTO 240 170 Next I 180 Print “The subset § contains the elements”; 62 29. 30. 190 ForI=1To5 200 Print S(I); *, *; 210 Next I 220 Print $(6); and is a subset of BY 230 GOTO 290 240 Print “The subset § contains the elements”; 250 For I=1To5 260 Print S(); * "5 270 Next I 280 Print $(6); “ but it is not a subset of B” 290 End procedure Subsets4(i,j,t,!: positive integers) begin for i:=1to 4 do for j:= i+1 to5 do for k = j+1 to 6 do for 1:= k+l to 7 do print ({1,,4,9) end Program List.subsets4 (Input, Output); Const Size = 10; Type Member-type = 1..Size; Set-type = set of Member-type; Var a: 1.Size; 5: Set-type; Procedure Write.set (S: Set-type); Var Size; Begin Waite (‘{'); For i := 1 to Size do 63 Hiin S then Begin S:=S- fil; ES <> [], then Write (4:3, Else Write (i: 3); End; Writeln (}"); End; Procedure Subsets (L,R : Set-type; i: Member.type); Begin fi <= n then Begin Subsets (L + fi, R, +1); Subsets (L, R + [i], i+1); End Else Begin Write.set (L); Write.set (R); End; End; Begin ‘Write (‘What is the value of n?”); Readin (n); Subsets (f1),[ },2); End. Section 3.2 (a) {1,2,8,5} (b) A (ce) U- {2} (a) U~ {2} (e) {4,8} (£) {1,2,3,4,5,8} fe) @ (h) {2,48} G@) {1,8,4,5,8} () [2,3] (b) [0,7) {c) (00,0) U (3, +00) (a) 0,2) U(3,7) (e) {0,2) (f) (3,7) (8) Since A = (A~ B)U(AN B) we have A = {1,3,4,7,9,11}. Similarly we find B = {2,4,6,8,9}. 64 {b) © = {1,2,4,5,9}, D = {5,7,8,9}. (a) @ ‘True Gi) False (ii) False (iv) Tre (v) ‘True (vi) False b) @ EF Gi) B (ii) D wv) D (v) Z—A= {2n4ljn eZ) = The set of all (i) EB (positive and negative) odd integers (a) True (b) ‘True (c) True (a) False (e) True () True (g) True (b) False (False (a) c€ ANC => (2EA and reC) => (cE B and 2D), since AC Band COD=+2EBND,s0 ANCCBND. reAUC=>2E€A or 2€C. If 2 € A, then 2 €B, since AC B. Likewise, 2€C=>2€D. Incither case, e€ AUC => 2 € BUD, s0 AUCC BUD. (b) Let ACB. We always have $C ANB, so let c€ ANB. Then c€ A and 2 eB. c€A=>rc EB sine ACB. r€B, re B=>2re€ BNB=6,50 ANB =6. Conversely, for ANB =0, let x€ A. Uf cg B, then 2€B, so 2 € ANB =O. Hence 2€B and ACB, (c) Follows from part (b) by the principle of duality. (a) False, Let U = {1,2,3}, A= {1}, B= (2), @ = {3}. Then ANC =BNC but AgB. (b) False, Let & = {1,2}, A= {1}, B = {2}, @ = {1,2}. Then AUB=AUC but AFB. (©) 2€A=>2€ AUC => 2€ BUC. Sore BorzeC. If x €B, then we are finished. If 2 € C, then € ANC = BNC and « € B. In cither case, z € B so AGB. Likewise, y€ B => y € BUC = AUC, ye Aory EC. Hy €C, then y€BNC=ANC. Incither case, y € A and BC A, Hence A= B. (@) Let 2 € A. Consider two cases: (i) 2€C =4 2g AAC => 2 ¢ BAC => 2 € B. (i) 2¢C => 2 € AAC = 2c g BAC = rE B. Incither case ACB. Ina similar way wefind BC A,so A=B. 65 10. a 12. 13. 14. AS(BNC) (AAB)n (AAC) From the Venn diagrams it follows that AA(B AC) # (AAB)M (AAC), so the result is false. (b) True (©) True (ANB)UC = {4,2,2} which has 2°—1=7 proper subsets; AM(BUC) = {d} which has 1 proper subset. (a) 0 (b) Oand1 (a) AU B)N(AUB)N (AU B)n (AUB) (b) AU(ANB) (c) ANB=(AUB)N(AUB)n (AuB) (@) A=(ANB)u(Anw) The dual of the statement ANB =A is the statement AUB =A. But AUB =A <> BCA, so the dual of the statement AC B is the statement BC A. (@) False, Let U = {1,2,3}, A = {1}, B= {2}. P(A) = (0, A), P(B) = {8,3}, PAUB) = (0, {1}, {2}, {1,23}, and (1,2) ¢ P(A) U PCB). (b) X € P(A) P(B) == X € P(A) and X € P(B) <=> XCA and XC Be XC ANB e+ X € P(ANB), 60 P(A)N P(B) = P(ANB). ATAUA fo] 0 se @ A|B|C\|ANB|AnC | (AnB)u(Anc) o;o;o; 0 0 1 ofol1] o 1 9 oj;ijo} o 0 1 o}iji] o 1 0 1joj}o} o 0 1 1}o}1} o 0 1 afajo} a 0 0 ajajit 1 0 0 ANB | An€ | (AnByuGce) 0 1 1 0 0 0 0 1 1 0 0 0 1 0 1 1 0 1 0 0 0 o 0 0 15. (a) 2% = 64 (b) 2" (c) In the columns for A,B, whenever @ 1 occurs in the column for A, a 1 likewise occurs in the same position in the column for B. 67 16. a, 18. 19, (@) = A{B|C|AuB| AnB| BAC | (AnB)uBAC) ofoyoy i a T 1 ofola) 2 0 1 1 olijo] o 0 1 1 ojala}; o 4 0 0 1jojo} a 0 i 1 ae} Oe pip] 0 ci 1 ae) o 1 a 1 ee etaletel eer 1 0 1 Steps Reasons (ANB)U[BA(CAD)u(CND))} = (AnB)u[Bn(Cr (DUD) Distributive Law of 9 over U = (ANB)uU[Bn(CnU)) DuB=u = (ANB)U(BNC) Identity Law [C NU = C] = (BNA)U(BNC) Commutative Law of 9 = Bn(Auc) Distributive Law of 9 over U (a) AN(B-A)=AN(BNA)=BN(ANA)=Bnb=8 (b) (AN B)U(ANBNCnD)|uAnB) =(ANB)u(AN B) by the Absorption Law =(AUA)NB=UNB=B (©) (A=B)U(ANB) =(ANB)u(AN B) = An(BuB)= Anu =A (d) AUBU(ANBNC) = (AN B)U[ANB)NC] = (AN B)u(ANB) n[(An Bug] = (ANB) UG] =AuBUG U Av= A= (1,2,3,4.5.6,7) () dn = A= {1}. net = 6 Ag = Ag = {1,2,3,...,m —1,m}, fal Ay = Ay = {1}. = wel (a) [-6,9] (b) [-8,12) () 8 (a) [~8,-6) U (9, 12] (©) (14,2) @ (2,3) @®R ) 23 Ze (lA em 2g (lA eer ¢ A; for at least oneig Io 26 A er tel for at least one i € J => 2 € UA. ei 1 Section 3.3 Here the universe U/ comprises the 600 freshmen. If we let A, B CU be the subsets A: the freshmen who attended the first showing B: the freshmen who attended the second showing, then |] = 600, |A| = 80, |B| = 125, and [An By = 450. Since [AN Bj = [AU BY = 450, it follows that |AU B| = 600 — 450 = 150. Consequently, |AN Bj = [A] + |B] ~ |AU B] = 80 + 125 — 150 = 55 ~ that is, 55 of the 600 freshmen attended the movie twice. Here the universe 1 comprises the 2000 automobile batteries. If we let A,B CU be the subsets A: the batteries with defective terminals B: the batteries with defective plates, then [&/| = 200, [AN Bl = 1920, |B| = 60, and [AN Bl = 20. Since An B = AUB, it follows that |A UB] = 2000 — 1920 = 80. From |Au Bl = [A] + |B|—|A2 Bl we learn that {Aj = |AU B|—|B]-+|AN B| = 80 — 60+ 20 = 40 — that is, 40 of her 2000 batteries have defective terminals. There are 2° such strings that start with three 1’s and 2* that end in four 0's. In addition, 2 of these strings start with three 1's and end in four 0's. Consequently, the number that start with three 1's or end in four 0's is 2 +28 — 2° = 512 + 256 — 32 = 736. (a) Here AU BUC = C, 0 |AU BUC] = |C} = 5000. (b) Here ANBNC = as well, soit follows from the formula for |AUBUC| = |Al+|B}+IC| = 50 + 500 + 5000 = 5550. (c) |AUBUC| = [A] +|B|+|C|—|4nB| -|AUC]— [BNC] +|AN BNC] = 5045004 5000 —3-~3—3+1 = 5542. 914+ 9!—st 6. (a) 12 (b) 2 () 16 (a) There are 24! permutations containing each of the patterns O U T and DIG. There are 22! permutations containing both patterns. Consequently there are 2(24!) ~ 22! permutations containing either O U T or D1G. {b) There are 26! permutations in totel. Of these there are 24! that contain each of the patteras M AN and AN T and 23! that contain both patterns (ie., contain MAN T). Hence there are 2(24!) 23! permutations that contain either M A N or AN T and 26! — {2(24!) ~ 23!] permutations that contain neither pattern. For the pattern F UN we consider four cases. (2) FUN... Here the blanks can be filled in (36) ways. 69 19. (b) -F UN ._. Here the blanks can be filled in (26)(36)? ways. (c) --F UN. Again there are 26(36)* ways to fill in the blanks. (d) ---F UN. There are also 26(36)? ways to fill in the blanks here. Consequently the number of six character variable names containing F UN is (36)° + 3(26)(36)* — 1, because the variable F U N F U N is counted in both case (a) and case (4). ‘There are also (36)* + 3(26)(36)? —1 of these variables that contain TI P and two that contain both F U N and TI P. Consequently, the number of these six character variables that contain either F UN or TIP is 2{(36)® + 3(26)(36)* — 1] — 2. ‘The circle Inbeled (i) is for the arrangements with con- secutive 8's; circle (ii) is for consecutive E’s; and circle (i) for consecutive L's. The answer to the problem is the number of arrangements in region 8 which we obtain as follows. For region 5 there are 10! ways to arrange the 10 symbols M,I,C,A,N,O,U,SS,EE,LL. For regions 2,4,6 there are (11!/2!) ~ 10! arrange- ments containing exactly two pairs of consecutive let- ters. Finally each of regions 1,3,7 contains (12!/(2!2!))— 2{(111/2!)—10!]~10! arrangements, so region 8 contains {131/(21)°] -3{121/(2!2!)] +3(211/2!)—10! arrangements. ‘The number of arrangements with either H before E, or E before T, or T before ‘M equals the total number of arrangements (i.e., 7!) minus the number of arrangements where E is before H, and T is before E, and M is before T. There are 3! ways to arrange C, I, S. For each arrangement there are four locations (one at the start, two between pairs of letters, and one at the end) to select from, with repetition, to place M,T, E, H in this prescribed order. Hence there are an) (3!) ) arrangements where M is before T,T before E, and E before H. Consequently, there are 7! — (3!)(%) arrangements with either H before E,or E before T, or T before M. Section 3.4 (a) Pr(A) = |AI/iS| = 3/8 (b) Pr(B) = |BI/|S| = 4/8 = 1/2 (0) AN B= {a,c} 90 Pr(ANB) = 2/ (a) AUB = {a,6,c,e,9} s0 Pr(AUB) = 5/8 (ce) A= {d,e, f,g,h} and Pr(A) (f) AUB = {a,c,d,e, f,g,h} with Pr(AU B) = 7/8 (g) ANB = {6} so Pr(ANB) = 1/8. (a) $= {(z,y)lz,y € {1,2,3,..-,20}} (b) $= {(@,v)lz,y € {1,2,3,...,20},2 # y} 70 10. Here each equally likely outcome has probability = 0.04. Consequently, there are $34 = 6 outcomes in A. The probability of each equally likely outcome is 44 = 0.02 = 1. Therefore, n (2) (§)/(2) = 15/66 = 5/22 = 0.272727... ©) 1G)) + OY) + CQ) = 2/80 = 1/22 = 11) S={{z,y}leru € {1,2,3,..-,99, 100}, 2 4 y} A= {{x,2+ Ile € {1,2,3,...,99}} {S| = ('$°) = 4950; [4] = Pr(A) = 99/4950 = 1/50 S= {{e,y}lz,y € {1,2,3,...,99, 100}, 2 uv} A= {{z,y}H{2,y} € 5,2 + y is even} Le €S,2,y even} U {{z,u}l{z,y} € 5,2, y odd} = (%) + (9) = 2450 s= {{a,b, c}la, b,c € {1,2,3,...,99,100}, a #b, axe, b xc} = {{a,b, c}|{a,b,c} € S,a+b+c is even} = {{a,b,c}|{a,b,c} € S, a, bye are even, or oa cis even and the other two integers are odd} [S| = (8°) = 161,700; fA} = (@) + (0) (4) = 19, 600 + 61, 250 = 80, 850 Pr(A) = B0,850/161, 700 = 1/2. The sample space S = {(z1, 22, 73, 24,15, %6)|z; = H or T, 1 y. Consequently, if A denotes the event described here, then [A] =9+8+7+-+++1= 45 and Pr(A) = |A\/|S| = 45/90 = 1/2. (©) Let B = {(v,w)|v even,w odd}. Then we went Pr(B UC) where BNC = 9. So Pr(BUC) eee =H+H=B=8 Here Pr(A) = 8, Pr(B) = B, Pr(C) = B, Pr(ANB) = 8, Pr(ANC) = Pr(BNC) te Pr(ANBNC) = §. So oehL,rLhrrLr Lr — Since A, B are disjoint we know that Pr(AUB) = Pr(A)+Pr(B), so Pr(B) = 0.7~0.3 = 0.4. Pr(AAB) = Pr(A) + Pr(B) ~ 2Pr(An B) (a) Let p be the probability for the outcome 1, Then for 1 Pr(A). Since AU B C S, it follows from the result of the preceding exercise that Pr(AU B) < Pr(S) = 1. Sol > Pr(AU B) = Pr(A) + Pr(B) — Pr(AMB), and Pr(AN B) > Pr(A) + PB) —~1=0.7405~1=0.2, 74 Section 3.6 Let A, B be the events the card drawn is a king B: the card drawn is an ace or a picture card. Pr(A|B) = Pr(AN B)/Pr(B) = (&)/(8) = = 40.25. Pr(ANB) = Pr(A)+ Pr(B)~ Pr(AUB) = 06+04-0.7 = 0.3 Pr(A|B) = Pr(ANB)/Pr(B) = 93 = 2 =0.75 A= AN(BUB) = (AN B)U(ANB), with (AN B)N (ANB) = And = 8, #0 Pr(A) = Pr(AN B) + Pr(ANB). Therefore, Pr(ANB) = Pr(A) — Pr(AnB Pr(ANB)/Pr(B) = 0.3/(1- 0.4] = 8 = .6 — 0.3 = 0.3, and Pr(A[B) = 0.5. Let A, B be the events A: Coach Mollet works his football team throughout August B: The team finishes as the division champion. Here Pr(BJA) = 0.75 and Pr(A) = 0.80, so Pr(AMB) = Pr(A)Pr(B|A) = (0.80)(0.75) = 0.60. Let A, B be the events A: a given student is taking calculus B: a given student is being introduced to a CAS. (a) Here we want Pr(BIA). Pr(A) = (170 + 120)/420 = 20/42 Pr(B A A) = 170/420 = 17/42 So Pr(B|A) = Pr(B 1m A)/Pr(A) = (H2)/(2) = HE. (b) In this case the answer is Pr(A|B). Pr(B) =1~ Pr(B) = 1 ~ [(170 + 80)/420] =1- B= PrAnBy=S=5 So Pr(A|B) = Pr(An B)/Pr(B) = (4)/() = &. In general, Pr(AU B) = Pr(A) + Pr(B) ~ Pr(AN B). Since A, B ave independent, Pr(ANB) = Pr(A)Pr(B), So PrAUB) = Pr(A)+ Pr(B)— Pr(A)Pr(B) Pr( A) + [1 — Pr(A)}Pr(B) = Pr(A) + Pr(A)Pr(B). The proof for Pr(B) + Pr(B)Pr(A) is similar. ii 10. Let A, B denote the events A: first toss is a head B: three heads are obtained in five tosses. (a) Pr(BlA) = Pr(BNA)/Pr(A) = (47) 3. [For the event BNA we consider & eee of ways we can place two Hs and two Ts in the last four positions. This is ‘), (b) Pr(BIA) = Pr(BNA)/Pr(A) = (3)4)'/G) = $= 3- Let A, B denote the events A: Bruno selects a gold coin B: Madeleine selects a gold coin (a) Pr(B) = Pr(BNA)+ Pr(Bn A) Pr(A)Pr(B|A) + Pr(A)Pr(BIA) CGD + GAG) = "ae = = 8 (b) Pr(A|B) we = = eile = (GGDI/GD = ae 4c {TH, TT}, Pr(A) = (3)3) + GY = {7T, HH}, Pr(B) =(5 ange tity PAD E) | (hs a Pr(ANB)=1 = 2 # # =(3)(8) = Pr(A)Pr(B), so A, B are not independent, Pr(AUB) = Pr(A)+Pr(B) — Pr(ANB) = Pr(A) + Pr(B) ~ Pr(A)Pr(B), because A, B are independent. 0.6 = 0.34 Pr(B) —(0.3)Pr(B) 0.3 = O.7Pr(B) So Pr(B) = 3. (a) Let A, B denote the events A: Alice gets four heads (and three tails) B: Alice’s first toss is a head. aycsyayaye Pr(A|B) = Pr(ANB)/Pr(B) = wcogran = (a = B= § <0.3108. {b) Let A, C denote the events A: Alice gets four heads (and three tails) : Alice's first and Inst tosses are beats anh Pr(AIC) = Pr(ANC)/Pr(C) = i get Ms (a) = B= & = 0.3128. 3 76 12. 13. 14. 18. 16. it. P(A) = (G+ Garay + Gc y =. (PF +10+1) = B=} Pr(B) 5 Pr(ANB) = (iG + Qargr+ Qa a ei += 3 Since Pr(AN B) = 1 = (2)() = aay the events A, B are independent. (0.95)(0.98) = 0.931 Let A, B be the events A: Paul initially selects a can of lemonade B: Betty selects two cans of cole. Pr(AlB) = Egy = args Pr(A) = = Pr(B) Pr(A)Pr(B\A) + Pr(A)Pr(BIA) aN GG) + BG) (ANGE) So PrialB) = ragihaetheney > wea = & = b Pr(AU BUC) = Pr(A) + Pr(B) + Pr(C) — Pr(ANB) ~ Pr(ANC)— Pr(BNC)+ (A) + Pr(B) + Pr(C) — Pr(A)Pr(B) ~ 0 — Pr(B)Pr(C) +0. Note: A, C disjoint = ANC =0 3 ANBNC =0 = Pr(ANBNC)=0. 08 = 0.2+ Pr(B)+04—0.2Pr(B) —0.4Pr(B) 02 So Pr(B) Let A, B denote the events A: the first component fails B: the second component fails. Here Pr(A) = 0.05 and Pr(B|A) = 0.02. The probability the electronic system fails is Pr(A NB) = Pr(A)Pr(BIA) = (0.05)(0.02) = 0.001. wud Let R,B,W denote the withdrawal of a red, blue, and white marble, respectively. Here ‘we are interested in the following cases (with their corresponding probabilities). RRR: Pr(RRR) = (BEV) RRB,RBR,BRR: Pr( RRB) GpupGD [= Pr(RBR) = Pr(BRR)} RRW,RWR,WRR: Pr(RRW) = i a UY(4) [= Pr(RWR) = Pr(WRR)] RBB,BRB,BBR: Pr(RBB) a2) [= Pr(BRB) = Pr(BBR)) Consequently, the probability Gayla has ce more red than white marbles is amseelselasaace Hed = 12 = 0.597523. In general, Pr(AU BUC) = Pr(A) + Pr(B) + Pr(C) ~ Pr(AN B) — Pr( ANG) Pr(BNC)+ Pr(AN BNC). Since A, B, C are independent we have 7 18. 19. 21. 22. 4 = Pr(AUBUC) = Pr(A)Pr(B)Pr(C) Consequently, }— 2-24 Let A, B, C, D denote the following events A: the graphies card comes from the first source B: the graphies card comes from the second source ©: the graphics card comes from the third source D: the graphics card is defective. Then Pr(A) = 0.2, Pr(B) = 0.35, Pr(C) = 0. Pr(DIA) = 0.05, Pr(D|B) = 0.03, Pr(D|C) = (a) Pr(D) = Pr(DN A) + Pr(DNB) + Pr(DNC) = Pr(A)Pr(D|A) + Pr(B)Pr(D|B) + Pr(C)Pr( DIC) = (0.2)(0.05) + (0.35)(0.03) + (0.45)(0.02) = 0.0295. So 2.95% of the company’s graphics card are defective. (b) Pr(C|D) = ao = mip. = [(0.45)(0.02)}/(0.0295) = 18/59 + 0.305085 Here A = {HH,HT} and Pr(A) = 4; B = {HT,TT} with Pr(B) = 4; and C = {HT, TH} with Pr(C) =} Also AN B = {HT}, so Pr(AA B) = t= (3)(2) = Pr(A)Pr(B); ANC = {HT}, 90 Pr(ANC) =} = (G4) = Pr(A)Pr(C); and BAC = {HT} with Pr(BAC) =) = ()Q) = Pr(B)Pr(C). Consequently, any two of the events A, B, C are independent. However, ANBNC = {HT} s0 Pr(ANBNC) = 1 # } = (4)(4)(4) = Pr(A)Pr(B)Pr(C). Consequently, the events A, B, C are not independent. Petal priByePr(O) Prt Ayr By Pr(A)Pr(C)—Pr(B)Pr(C)}+ G Pr(C) -Q)— Beye ae a 44 'L)Pr(C) and Pr(C) = & (0.75)(0.85)(0.9) + (0.75)(0.85)(0.1) + (0.75)(0.15)(0.9) + (0.25)(0.85)(0.9) = 0.57375 + 0.06375 + 0.10125 + 0.19125 = 0.93. (a) For 0 < k <3, the probability of tossing k heads in three tosses is (3)(3)*(4)-* = ()G)®. The probability Dustin and Jennifer each toss the same number of heads is BlQur = 6 y1Q)'+ 6)'+ + QT = Gen +9494 = B= 6 =0.s128. (b) Let z count the number of heads in Dustin’s three tosses ae seers Here we consider the cases where 2 = 8: y = 2,1, 0r0;z = 2: y = lor; 2=1: y=0. The probability that Dustin gets more heads than Jennifer is (3)(4)%{(3)4°) + Q)@GP + Qaoi+ are DC) Janay QG+ HOGI = HB+3++H)+ I} + (3)°3)Q) = G)°E2) = (c) Here the answer is oni [Note: The anewers in parts (a), ib), and (c) sum to 1 because the union of the three events = these parts is the entire sample space and the events are disjoint in pairs. Consequently, recognizing how the answers in parts (b), (c) are related we see that the answer to part (6) (N= =()G) = #4 We need the (equal) probabilities for the disjoint events: (1) One cousin gets a head and ui 23. 24, 25. 26. the other four get tails; (2) One cousin ee a tail and the other four get heads. The probability for event (1) is (5)(1) = §. So the answer is $+ 5 = 5. Let A, B denote the following events: A: A new airport-security employee has had prior training in weapon detection B: A new sirport-security employee fails to detect a weapon during the first month on the job. Here Pr(A) = 0.9, Pr(A) = 0.1, Pr(BIA) = 0.03 and Pr(B[A) = 0.005. The probability a new airport-security employee, who fails to detect a weapon during the first month on the job, has had prior training in weapon detection = Pr(A|B) = oP = ALPHA PaAPaa a Paanaygprend) = Sagan a = (0.9X0.005)/0.9X0.005) + (0.20.09) = 0.0045 /[0.0045 + 0.003} = 6. Let 4, B, C denote the events A: the binary string is a palindrome B: the first and sixth bits of the string are C: the first and sixth bits of the string are the same (8) Pr(AIB) = Pr( AN B)/Pr(B) Pr(B) = GENIE where each 1 is the probability that a given position (second, third, fourth, or fifth) is filled with a 0 or 1. Pr(A.M B) = (2)(1)(1)(4)E)E) = 3h, where, for example, the first 1 is the probability that the second position is filled with a 0 or 1, and the third } is the probability that the Dit in the fifth position matches the bit in the second position, Pr(AIB) = Pr(AN B)/Pr(B) = (ECP) =f (b) Pr(AIC) = Pr(ANC)/Pr(C) PrC) = (DOVOOG + DODANE), for the two disjoint events where the binary strings start and end with 0, or start and end with 1. PrHANC) = DODGE + MOOD NG) Pr(Aie) = (8 + s/h + = G/F {a) There are () = 10 conditions ~ one for each pair of events; @ = 10 conditions - one for each triple of events; () = 5 conditions ~ one for each quadruple of events; and (3) = 1 condition for all five of the events. In total there are 26 [= 2 ~ (8) — ()] conditions to be checked. (0) 2"~ (@) ~ (f) =2"-1 independence of n events. Since 0.3 = Pr(ANB = Pr(AUB), it follows that Pr(AU B. = 2" —(n +1) conditions must be checked to establish the -0.3=0.7. 9 27. 28. 29, 30. Pr(AABIAU B) = EAGRBAEN — Pr(AAB)/Pr(AUB) = F(A [Pr(AU B) — Pr(A0 B)|/Pr(AU B) = (0.7 ~ 0.1)/(0.7) = 0.6/0.7 = 6/7. Let Bo, Bi, Ba, Bs, and denote A denote the events Bj: for the three envelopes randomly selected from urn 1 and transferred to urn 2, i envelopes each contain $1 while the other 3—i envelopes each contain $5, where 0 < < 3. ‘A: Carmen’s selection from urn 2 is an envelope that contains $1. Here, Pr(A) = Pr(AM Bo) + Pr(AM By) + Pr(AN Ba) + Pr(An Ba) = Pr(Bo)Pr(A|Bo) + Pr(Bi)Pr( A|B,) + Pr(By)Pr(A|By) + Pr(Bs)Pr(AjBs) ( is = 16) @)/)GD +10) Q/G)IGA) + 1) G)/ GG) + 1G) @)/ YG) = (BG) + Gs ENG) + GOGD + GOGD = (E)G 42 + 168 + 150 + 30) = 390/1001 = 30/77. Pr(BIA) < Pr(B) => Pr(BNA)/Pr(A) < Pr(B) > Pr( BM A) < Pr(A)Pr(B). Consequently, Pr(ANB) = Pr(BNA) < Pr(A)Pr(B), s0 Pr(A|B) = Pr(ANB)/Pr(B) < Pr(A). 0.8 = Pr(A|B) + Pr(BlA) = on + FA = Pr(An Bl(1/0.3) + (1/0.5)], s0 (0.15)(0.8) = Pr(An B)[0.5 + 0.3] = (0.8)Pr(AN B). Consequently, Pr(An B) = 0.15. Pr(AUB) ~ Pr(AAB) = Pr(AN B) = 0.7 ~ 0.5 = 0.2. Since 0.5 = Pr(A|B) = Pr(AN B)/Pr(B), it follows that Pr(B) = Pr(AN B)/0.5 0.7 = Pr(AUB) = Pr(A) + Pr(B) ~ Pr(ANB) = Pr(A) + 0.4 — 0.2, 80 Pr(A) = 0.5. Section 3.7 (a) P(X =3) = (b) Pr(X <4) (6) Pr(X > 0) = (d) Pris X <3) (©) PAX =X <3) = up =(PG) =3 @) Pr(X <1 or X =4) = P(X = 0) + Pr(X =1)+ P(X =4)=b sb ghad x = 2) Aj’ i iit Pores) = Diigt grat d= (a) Pr(X = 3)= Ha Was (X 0) + Pr(X = 1) = se 4 Et & (©) Pri -2) = Dhig Pr(X = = (e) P(X = 1X <2) = Meta $ an Bel 80 6. BY 4+1 3@)+1 4 22 = (a) Pr(X = Mee)» = 0,1,2, (oy Prox = 4) = CCD — mg = leas = sles = 0000121 (0) PX 2 4) = Pr(X =A) + Pr(X = 5) = CAE Bt = GBR = _ Pr{X =1and X <2) _ Pr(X =1) Pr(X <2) ” Pr(X <2) CEE PED tio) (29 ‘a0 3,185) /[(1)(122, 391, 522) + (10)(5, 773, 186) + (45)(218, 820)] 57, 731, 850/122, 391, 522 + 57, 731, 850 + 9, 711,900] = 57, 731, 850/189, 835, 272 = 2675/8796 + 0.304116, eGR = (2G) 22 = 0,1,2,3. a) AGP? = (2 )G), 22 = 0,1,2,3. Pr(Xy = 0)Pr( Xp = 3X1 = s)G)9) = GY (3°) = (8) (a) Xz Pr(X =a) Xq: Pr(X = 22) X Pr(X =-3) wow nae Pr(X = -1) Pr(X_ = L)Pr(X) = 2X, = Pr(X =1) Pr(X; = 2)Pr(Xa = 1) 3) GA) = (GY Pr(X = 3) Pr(X1 = 8)Pr(X2 = 1X1 = 38) = (5)(4)°1) = G)* Teva P(X = 21) = 0- GH +1- QGP +2- GG +3: GGr= = {= 3(1) = np, since X is binomial with n= 3 and p = 3), 3) +(-DO)GY + G)GY + 3GY = Ol= BA) ~ BG). (a) Pe(X > 3) = V8, Pr(X = 2) = Pr(X = 3) 4 Pr(X = 4)+ Pr(X =5) 4+ P(X = 2 O)=5+5th+5 3 (b) Pr(2. SX <5) = OSL, Pr(X = 2) = Pr(X =2)4Pr(X = 3)4Pr(X =4)4 P(X = BRaEt Eto +s (6) Pr(X = 4|X > 3) EES = ar $ 3) 7 YS)ICA/8) = 1/8 (a) E(X) = 58,, 2Pr( ye (2) = (A(L4 243444546) = (1)(21) = 7/2. (©) BX?) = Fh, oY Pr(X = 2) = (1+ 449-4 16-425 +36) = (LOI) = 2 Var (X) = B(X*)~ B(x) = @)-Gt= 9-8 = mage = x s (a) t= eBihan B= oh + 4+ B+ H+ Bh) = ef RESRAEIESS) = (IR) — (8), so em B. 81 10. a (b) Pr(X > 3) = Pr(X = 3)+ Pr(X = 4)+ Pr(X = 5) =o(2 + 8+ BB) = (BME) = = P(X =4andX>3)_ Pr(X=4) 8.16. 18 te oer r——LCcC SP Srl lL (a) B(X) = Ee PX = 2) = (8) Die B+ $+ Fe A+ ie 2.457364 5 ea E(x) a) Syl + B+ 4 Be + Bl = END =F (X?) sar _ (dirye — web = 1 ooso5. (a) 1 = Dou) P(X =2) = c D8, (6 - 2) = 5 +44+34+241) = lic, soc=1, (b) Pr(X $2) = Pr(X = 1) + Pr(X =2) = (46-1) + (46-2 = 8 =F (©) B(X) = Deane: Pr(X = 2) = Th 2 (NG ~ 2) = (A)I-542-443-344-245-1) =(4)(35) = 2 (A) E(X?) = Chan 2? + (5 )(6 ~ 2) (AL 5 44-449-3416-2425- 4)(105) = 7 Var (X) = E(X?) — E(X)* =7— (7? = S52 = Let the random variable X count the number of heads in the 100 tosses. Assuming that, the tosses are independent, this random variable is binomial with n = 100 and p = Wayne should expect to see E(X) = np = 100(3) = 75 heads among the results of his 100 tosses. /15. Since X is binomial, E(X) = 70 that 45.5 = 70g, 0 g = 45.5/70 n= 70/p = 70/0.35 = 200. ip and Var (X) = 45.5 = npg. Hence, we find .65. Consequently, it follows that p = 0.35 and Let the random variable X denote the player’s net winnings and let C denote the cost of playing one round of this carnival game. The probability distribution for X is as follows: P(X =2) . Here 0 = E(X) = $(5- C)+ 3(8- 0) + &(-C) = B+ B-CandC= game is fair if the player pays two dollars to play each round. Here X is binomial with n = 8 and p= 0.25. {a) Pr(X = 0) = (5)(0.25)°(0.75}* = 0.100118 (b) Pr(X = 3) = (5)(0.25)°(0.75)° = 0.207642 (©) Pr(X > 6) = Pr(X = 6) + Pr(X = 7) + Pr(X = 8) = (3)(0.25)(0.75" + (9)(0.25)"(0.75)! + (8)(0.25)%(0.75)° = 0.004227. (€) Pr(X > 6|X 24) = Piteaeaee 2ae pues = : 12, 13. 14, 15. 16. a Pr(X > 4) = Sh (9)(0.25)*(0.75)** = ($)(0.25)*(0.75)* + (8) (0.26)*(0.75)°+ (3) (0.25)%(0.75)" + ) 28)"(0.75)' + (2 ) (0 25)*(0.75)? = 0.113815 So Pr(X > 6|X > 4) = 0.004227/0.113815 + 0.037139. (c) B(X) = np = 8(0.25 (8) Var (X) = mp(1— p) = 8(0.25)(0.75) = 1.5 Here ox = V9 =3. (2) Pr(Ql < X $28) = Pr(1t ~17< X ~ 17 < 88-17) = Pe(-6< X—17<6) = Pr(|X —17| <6) = Pr(|X — B(X)| <2ox) > 1 1-} (b) nor X <2) = Pr(|X 17] < 7) = PX BX) S Stn) 21-G = 1-Z= (c) Pr(8 €X < 26) = Pr(|X — 17] <9) = Pr(|X — E(X)] <9ox) 21-g=1-}e$ In Chebyshev’s Inequality Pr(IX ~ E(X)| $ kox) 2 1 1-0.96 = 0.04 = jf, and #? Since k > 0 we have Here Var (X) = 4 80 ox =2ande= key =5-2=10. Here X is binomial with n = 20 and p = 1/6. So E(X) = np = (20)(1) = 2 = B and Var (X) = np(1 — p) = (20)5)(§) = F- Let D denote a defective chip and G a good one. Then the sample space S = {D,GD,GGD,GGG) and XP) = 1, X(GD) = 2, and X(GGD) = X(GGG) =3 (a) Pr(X = 1) Pri Pr(X u isso 1 ae corer nae sn) = Poss Pr(X <2) (a) E(X) = D8, ePr(X = 2) = 1) 4 8) 400) 2.431579 (c) E(X?) = Chan 27Pr(X = 2) = 1(5) + (88) + 932) = b+ B+ AP = eee = Var (X) = B(X?) — E(X) = 2 - (By = pa 7 paas = 0ssOI9 (a) (aX +b) = Exlort DPX = = 2) =aD,2Pr(X = 2)+8S, Pr(X = 2) = aB(X)+6, since Dy Pr(X = 2) = (b) Var (aX +5 ee +8) — B(aX + DP Pr(X = Le[(ax +b) — (@E(X) + bP Pr(X = 2) {from part (a)} eo! ,(2 ~ E(X))*Pr(X = 2) = a? Var (X) (a) B(X(X ~1)) = Dhag2(e - Pr(X = 2) = Dk ee — YP r(X = 2) = Di a(e - 1) ("pg = Doe ages ~ Dera? (az ~ aB(X))°Pr(X = 2) = 83 = Dee Gonthemre? = Pin(n ~ 1) Dt eee ta = Pan 1) Dd gages OM), substituting 2-2 =y, =P ae “DE aap (na) Fh = p(n — 1)(p + 9)", by the Binomial Theorem = pin(n ~1)(1)"" n(n — 1) = n%p? ~ np? (b) Var (X) = E(X?) ~ E(X)? = [E(X(X ~1)) + E(X)] — E(X) = [(n?p? — np?) + np] - (np)? = np? ~ np? + np — n2p? = np — np? = np(1 — p) = mpd. 18. (a) Pr(X > 1) = Pr(X =2)+Pr(X = 3)+Pr(X = 4)=03+02401 = 1 Pr(X <1) (b) Pr(X = 3|X >2)= P(X Send X29) = Pr(X =3)/Pr(X >2)= /[Pr(X = 2) + Pak 3) + Pr(X =4)] = 0.2/0.6 = 1/3 =1-04= 170.4) + 2°(0.3) + 3%(0.2) + 4(0.1) = 5 — ) Var (X) = B(X?) — E(X)'=5-2=5-4=1 (a) Word 2, the number of letters and apostrophes in the word ri 4 make 4 him 3 an 2 offer 5 he 2 can’t 5 refuse 6 2 Pr(X = 2) 19. 2 2/8 = 1/4 3 1/8 4 2/8 = 1/4 5 2/8 = 1/4 6 1/8 () E(X) = S8y2- P(X =2) = (1/4) + (1/8) + 4(2/4) + 5(1/4) + 6(2/8) = (1/8)[4+3-+8+10-+ 6) = 31/8 () E(X)) =S2,2?- Pr(X =2) = A(1/4) + 9(1/8) + 16(1/4) + 25(1/4) + 36(1/8) = (1/8)[8 + 9 + 32 + 50 + 36) = 135/8 Var (X) = E(X?) ~ E(X)? = (15/8) ~ (31/8)? = [1080 — 961]/64 = 119/64 20. (a) Pr(X = 0) = (0.05)(0.1)(0.12) = 0.0006 (0.95)(0.1)(0.12) + (0.05)(0.9)(0.12) + (0.05)(0.1)(0.88) = 0.0114 + 0.0054 + 84 aL Pr(X = 2) = (0.95)(0.9)(0.12) + (0.95)(0.1)(0.88) + (0.05)(0.9)(0.88) = 0.1026 + 0.0836 + 0.03: 2258 Pr(X = 3) = (0.95)(0.9)(0.88 [Note that 3.5 Pr(X (b) Pr(X > 2X > 1) Poo tou X21 PAX: > 2/Pr(X > 1) = (0.2258 + 0,7524]/{0.0212 + 0.2258 + 0.7524] 1.9782 /0.9994 = 0.978787272 (c) E(X) = Dh.g a+ Pr(X = x) = 0(0.0006) + 1(0.02122) + 2(0.2258) + 3(0.7524) = 2.73. (a) B(X?) = F3_, 27+ Pr(X = x) = 07(0.0006) + 17(0.0212) + 2*(0.2258) + 3°(0.7524) = 7.696 Var (X) = E(X?) — E(X)? = 7.696 — (2.73)? = 0.2431. Pr(X =2)=(()()V/() =1/10 Pr{X = 2) ()i/(8) = 2/10 Pr(X =4)= Qve) = 3/10 Pr(X =5)=[ 4) Qu 3) = 4/10 /10)(2) + (2/10)(3) +(3/10)(4) + (4/10)(5) = (1/10)[2+6+12+ 20] = 40/10 = 4 1/10)(4) + (2/10)(9) + (3/10)(16) + (4/10)(25) = (1/10)[4 + 18 + 48 + 100] = 170/10 = 17 Var(X) = B(X?) — B(X)? = 17-16 =1, so 0x = Vi=1. 7524 Supplementary Exercises Suppose that (A-B)CC and €A-C. Then EA but 2¢C. If 2g B, then [2 € AAz ¢ B) => 2 €(4—B) CC. Sonow wehave r¢C and 2€C. This contradiction gives us 2 € B, so (A—C)CB. Conversely, if (A-C) CB, let ye A~B. Then ye A but yg B. If y¥C, then lye AAy ¢C] = y€(A—C) CB. This contradiction, ic, y@ B and y € B, yields yEC,s0 (A~B)CC. Let $= {2,4,a1,02,...,d,}. There are (“t7) subsets of S’ containing r elements, where r > 2. These subsets fall into three categories. (a) Neither z nor y is in the subeet. There are () of these. (b) Exactly one of z and y is in the subset. These account for 2{,",) subsets. (c) Both z and y are in the subset. There are (,",) such subsets. (a) U={1,2,3}, A= {1,2}, B= {1}, C = {2} provide a counterexample. (b) A= ANU = AN(CUC) = (ANC)U(ANC) = (ANC)U(A-C) = (BNC)U(B-C) = (BNC) u(Bne) = Ba(Cul)=BnU=B (c) The set assignments for part (a) also provide a counterexample for this situation. (a) Consider m+n objects denoted by {21,29,-..,2m} U {yistay--.ytn}- Let A= {z1,.-.,2m}, B= {yi,.--,90}- In selecting r elements from AUB we select k elements from A(G Int (S(1)/2) Then C=C $1 130 Next I 140 Print “The eight-element subset generated ”; 150 Print “in this program contains the elements” 160 Forl=1To7 170 Print S(1); 4"; 180 Next I 190 Print “ and”; $(8); “, and”; C; 200 Print “ of these elements are odd” 210 End 9. Suppose that (AN B)UC = AN(BUC) and that 7€C. Than 26C =o 26 (ANB)UC = 2€ AN(BUC) CA, 50 2 Aand CCA. Conversely, suppose that CC A. 86 10. wa 12. 13. 14, (1) Hoy €(ANB)UC, then ye ANB or yeC. i) ye ANB=ye (ANB)U(ANC) => ye AN(BUC). (i) ye C=>y EA, since CCA. Also, y€C => y€ BUC. So y€ AN(BUC). In either case ((i) or (ii)) we have y€ AN(BUC), so (ANB)UCC AN(BUC). (2) Now let 2 € AN(BUC). Then z € AN(BUC) =(ANB)U(ANC) C (ANB)UC. From (1) and (2) it follows that (AN B)UC = AN (BUC). (a) Here [AU B| —|AM B| = 5, so there are 2° subsets C where ANB COC AUB. ‘The number containing an even number of elements is ({) (for |C] = 4)+ (3) (for iC =6)+(§) (for |C|=8) = 16. () 2% () +6) +() =16 (a) [0,14/3} (b) {0} U (6, 12} (c) [0, +00) (@)o )U(A-B)= BAA (©) Adu = (d) AA@=(A-#)UQ@-A)=AUP=A (a) [ABT AnB — foto] 0 Since AC B, we only consider rows 1,2, — oli] o and 4 of the table. In these rows A and 1fo} o AB have the same column of results, so — jit 1 ACB=>A=ANB. () [AL BIC] An] AnB BnG | (AnB)u(Bne) —fofolol o 0 0 0 ofoji} o 0 0 0 olijo} o 0 1 i ofijil o 0 0 0 —lilofo] 4 1 6 1 1fofi] o 1 0 1 —+fijajo} a 0 i 1 — {ijrtil o ojo @ We consider only rows 1,5,7, and 8. There AN€ =(ANB)u(BNe). (b) & (a) The results for these parts are derived in a similar manner. (a) BOA=+AUB=A. (b) (AUB=A) and (BNC =C)=3 ANBNC=C. (ce) CDBDA=>(AUB)N(BUC)= Aue. 87 15. 16. 19, 20, (a) (AUB)n (BUA) = C = (AUC) N(CUA)=B and (BUC) N(CUB)=A. (a) The 7 0's determine r +1 locations for the m individual 1’s. If r +12 m, we can select these locations in ("#") ways. (b) Using part (a), here we have & U's (for the elements of A) and n—k O's (for the elements in U— A). The n—k 0's provide n—k+1 locations for the & 1’s so that no two are adjacent. These k locations can be selected in ("“{*1) ways if n—-k+12>& or 2k i] (ee ©) @ ()()/ Sh (64) G8) ()(0)/ Seo (2) a (tae aay 1) + (SG) + bi at Te = 12 2 Consequently, ANB PIs -123 22 — or [(x ~ 3) > 0 and (2 — 4) <0} > [z <3 and x > 4) or soA={z)3<2<4}= “E()6) ()(2) + @ QV rho G) G2) Te +12=0> (2 —4)\(2—-3)=0 9 2=4,2=3. Posse? —2-6=0>(2—3)(2+2)= = {3} and AUB = {—2,3,4}. Os2=3,2=-2. Te +12 <0 (2 —3)(2— 4) <0 = [(z 3) < 0 and (2 —4) > 0] 3,4). fe 2 S3andz<4)33<2<4, wt—2 S69 272-6 $0 (2 -3)(2 +2) $0 > [(z — 3) < 0 and (2 +2) > Of or [(r- 3) 2 0 and (2 +2) < 0] => [x <3 and z > ~2] or [x > 3 and az > ~2] 4-2 <2 <3, 80 B= {z|-2¢ 2 <3} =[-2,3} Consequently, AN B = {3} and AU B = [-2,4]. ‘The probability that all four of these torpedoes fail to destroy the enemy ship is (1—0.75)(1 —-0.80)(1 — 0.85)(1 ~ 0.90) = (0.25)(0.20)(0.15)(0.10) = 0.00075. Consequently, the probability the enemy ship is destroyed is 1 — 0.00075 = 0.99925. ‘There are two cases to consider. (1) The one tail is obtained on the fair coin, The probability for this is (7)(4)(3)(4)($)*. (2) The one tail is obtained on the biased coin. The probability in this case is QarQae- 90 28. 29. 30. 31. 32. Consequently, the answer is the sum of these two probabilities ~ namely, #4 + 38% = 1S = 0.263672. Let S be the sample space for an experiment £, with events A,B C S. Prove that Pr(A[B) > Peart, Proof P(A|B) = Pr(A B)/Pr(B) = [Pr(A) + Pr(B) — Pr(AU B)]/Pr(B). Since AUB CS, it follows that Pr(AUB) < Pr(S) = 1. Consequently, —Pr(AUB) > ~1 and Pr(A|B) > (Pr(A) + Pr(B) — 1/Pr(B). Pr(AN(BUC)) = Pr((ANB)U(ANC)) = Pr(ANB)+Pr(ANC)—Pr((ANB)N(ANC)). Since A, B, C are independent and (AN B)N(ANC) =(ANA)N(BNC) = ANBNC, Pr(AN(BUC)) = Pr(A)Pr(B) + Pr(A)Pr(C) ~ Pr(A)Pr(B)Pr(C) = Pr( A)[Pr(B) + Pr(C) — Pr(B)Pr(C)] = Pr(A)|Pr(B) + Pr(C) ~ Pr(B 0 C] = Pr(A)Pr(B UC), 90 A and BUC are independent. Suppose we toss a fair coin n times and we let the random variable X count the number of heads among the n tosses. Here we want Pr(X > 2) > 0.95, or Das (;)(4)*(4)"* = Thea (7) CGN" 2 0.95. Now Dia (7)G)" = 0.95 > ~ Dhaa (G)()" < -0.95 > 1- Dh ({)GY" < 1 - 0.95 > Theo (f)G)" $0.05 > 4)" +m) = + YG)" < 0.05 Porn =7,(n +1)(4)" = a For n = 8, (n+ 1)(4)" = Consequently, the minimun numb of tosses is 8. (a) The probability that both tires in any single landing gear blow out is (0.1)(0.1) = 0.01. So the probability a landing gear will survive even a hard landing with at least one good tire is 10.01 = 0.99. (b) Assuming the landing gears operate independently of each other, the probability that the jet will be able to land safely even on a hard landing is (0.99)* = 0.970299. For A,B © S,1 = Pr(S) > Pr(AUB) = Pr(A) + Pr(B) ~ Pr(AM B). Consequently, Pr(ANB) > Pr(A) + Pr(B) 1. Let A, B denote the events A: the exit door is open B: Mario's selection of two keys includes the one key that opens the exit door ‘The answer then is given as Pr(A) + Pr(AM B) = Pr(A) + Pr(A)Pr(B) = (3) + GIO) =O+ OO =) + = Let A, B, C denote events A: the first and last outcomes are heads B; the first and last outcomes are tails 91 3B. 36. 37. 39, C: the eight tosses result in five heads and three tails. ‘The answer to the problem is Pr(C|AUB). But Pr(C|AUB) = P4Crisuen) .. Pricnbuicne)) Since A, B are disjoint, it follows that CM. A, CN B are disjoint. Further, Pr(AUB) = Pr(A) + Pr(B) = (LP +(b% =} Pr((CNA)U(CNB)) = Pr(CNA)+Pr(COB) = BGS) EPGPIA+ (GIG = G)*20 + 6) = 134)" Consequently, Pr(C|AU B) = [13(4)/(2) = (13)(4)" = 8. (5)(0.8)(0.2)? + (§)(0.8)*(0.2) + (5) (0.8)* = 0.2048 + 0.4096 + 0.92768 = 0.94208 Pr(19,000 < X < 21,000) = Pr(—1000 < X — 20,000 < 1000) = Pr(|X — E(X)| < 1000) Since Var (X) = 40,000 boxes?, we have a; 100 boxes. So Pr(|X — E(X)| < 1000) = Pr(|X — E(X)| S$ 5ox) 21-4 =1- 4 =#% =0.96. Success: one head and two tails ~ the probability for this is (?)(4)'(4)? = =4,p= ae fous trials (f tossing thre fir coins) we want two successes. The probability for this is (4)(2)°($)? = (6)(9)(25)/2"? = 675/2" = (0) (9/(8) = 8-4-8 = 4 = 0s ©) eae 3) = enaptanis = g (+ OG) (a) 1 = Die Pr(X = 2) = Ce eee ance eee) = cfd + 5+ 8+ 13 +20] = 0c, s0 (b) Pr(X > 1) = Pr(X > 2) = (0.02)(13) + (0.02)(20) = (c) Pr(X = 3|X 22) = 13 6) Gane (X= 3 + Pr(X = ») a Pr(X = 4) = (0.02)(8) + (8 +13 +20 = oe de = 3 an 2 rr PxSy = = Prax =f = (0.02)(13)/(0.02)(41) = 317073 (4) BCX) = Dhg a Pr(X = x) = 0-()(4) +1-(€)(5) +2- (68) +3 (c)(23) +4. (2)(20) = [5 + 16 + 39 + 80] = 140c = 2.8 (©) B(X?) = Thug 2? Pr(X = 2) = 08 (Ae) +1? - (Ge) +2" (Be) + 34 -(1e) +42 (206) = AThe = 9.48 Var (X) = E(X?) — B(X)* = 9.48 — (2.8)? = 1.64 For each student the probability that all five marbles are groen is (7/11). Therefore, the probability all 12 students draw only green marbles is {(7/11)*]!? = (7/11). Consequently, the probability that at least one student draws at least one red marble is 1 — (7/11). 41, (a) To finish with a straight flush, Maureen must draw (i) the 4 and 5 of diamonds; (ii) the 5 and 9 of diamonds; or (iii) the 9 and 10 of diamonds. The probability for each of these three situations is iste 80 the answer is 3/(*?). (b) Maureen will finish with o flush if she draws any iwo of the remaining ten diamonds, which she can do in ('?) ways. However, for three choices [as described in part (a)], she actually finishes with a straight flush. Consequently, the answer here is {(1°) - 3]/(‘). (c) To finish with a straight from 4 to 8, Maureen must select one of the four 4s end one of the four 5s. This she can do in (*)() ways. For the straights from 5 to 9 and 6 to 10 there are likewise (1) ({) ma However, these 3({)({) straights include three straight flushes, so the answer is (3(4) (4) - 3]/(¥). 2 HOOOOOQOOR) 43. ‘The total number of chips in the grab bag is 14+2+3+---+n=n(n+1)/2, and the probability a chip with i on it is selected is 2i/[n(n + 1)]. Let A,B be the events. ‘A: the chip with 1 on it is selected : a red chip is selected. Pr(A[B) = Pr(An B)/Pr(B) = Pr(A)/Pr(B). Pr(A) = 1/{n(n + 1)/2] = 2/[nln + 1)} Pr(B) = (142434. --+m)/[n(nt1)/2] = (m-41)/24/In(n41)/2] = Consequently, Pr(A|B)= jaceaificaay = 2/lm(m + 1)) (@) 2 Pr(X = 2) t °)(1/6)° = 1/36 2 i $)(1/6)? = 15/36 = 5/12 3 G (1/6) = 20/36 = 5/9 44, (0) EX) = Fea a ee (©) E(x?) = “(3/99 + (4)(15/36) + (9)(20/36) 41 Var (X) = B(X?) — (XP = teat/30) (01/26) = [8676 — 8281]/1296 = 395/1206 93 45. (2) Outcome HHE HHT ATH THH HIT THT 1TH TIT Probability , the number of Outcome of runs (3/4 = 1 (3/470/ HReNNen (1/4P°G/4) = 3/64 (a/4) = 1/64 The probability distribution for X: « 1 2 3 (b) B(x) (ce) E(x?) Var (X) Soox Pr(X = 2) (27/64) + (1/64) = 28/64 = 7/16 (9/64) + (9/64) + (3/64) + (8/64) = 24/64 = 3/8 (9/64) + (3/64) = 12/64 = 3/16 = Deer tPr(X = 2) = anafeete + (2)(3/8) + (3)(3/16) = 58/16 = 29/8 = (20/8) ~ (7/4)? = (29/8) ~ (49/16) /a/i6 = 3/4. CHAPTER 4 PROPERTIES OF THE INTEGERS: MATHEMATICAL INDUCTION Section 4.1 (a) S(n) : 17 4+3? +5? +... + (Qn — 1) = (n)(2n — 1)(2n +: 1)/3. S(1) : 1? = (1)(1)(3)/3. This is true. Assume S(k): 1?-+3? +... + (2b ~ 1)? = (k)(2k ~ 1)(2k + 1)/3, for some k > 1. Consider S(&+41). [174+3?+...+(2k—1)"]+(2k+1)? = [(4)(2k—1)(2k+1)/3]+(2k+1)? = [(2k + 1)/3][(2k — 1) +3(2k + 1)] = [(2k +1)/3][2# +5k +3] = (k+1)(2k-+1)(2k +3)/3, 80 S(k) => S(k-+1) and the result follows for all n € Z+ by the Principle of Mathematical Induction. (©) Sin) Ta = aT S(Q): Soha gehy = aby = ah, © S(1) is true. Assume S(k): Dha qh = pr Consider S(k +1). CoN aay = Cha aay + ey = by + eH = (ACE +2) + AC + DEE + 2)) = (E+1)/(k +2), s0 S(k) => S(k-+1) and the result follows for all n € Z+ by the Principle of Mathematical Induction. ‘The proofs of the remaining parts are similar. (2) S(n) D2 SQ): Shy 2! 1, so S(1) is true. Assume S(k) 2* — 1, Consider S(k +1). DEP at = DE, ai} + 2k = 2k 14 2 = 2H — 1, 80 S(k) => S(k + 1) and the result is true for all n € Z+ by the Principle of Mathematical Induction. (b) For n =1,0h, i(2! 2+(1~1)2, so the statement S(1) is true. Assume ‘S(k) true ~ that is, DE + (k= 127, For nn =k +1, DE (2!) = DE, 2+ (k + 1)0? = 24. (hk —1)2*? + (b+ 12k! = 24 (2h)2k+ = 24 k- 2", so S(n) is true for all n € Z* by the Principle of Mathematical Induction. (c) Forn = 1, we find that 27_,(i)(i! 1+1)}!—1, so S(1) is true. We assume the truth of $(k) ~ that is, D4, i(i!) ~ (k+1)!—1. Now for the case where n = +1 we have why ici!) N+ (K+1 R41)! = (k+1)!-1+(k+1)(k4-1)t = [1+ (k4+-1)(R4 1-1 = (E+ 2)(k+ 11 = (k-+2)!-1. Hence $(k) => S(é-+1), and since $(1) is true it follows that the statement is true for all n > 1, by the Principle of Mathematical Induction, (a) From DEP +(n +1) = Deg P +3? +341) = DE P43 D8, F4+3DR + Dhol, we have (n +1) = 3D%.1i7+ 3 Dini +(n +1). Consequently, it 9m} 95, 30h (8 +8n? + 3n +1) —3[(n)(n + )/2]—n—1 = n+ (9/2)n?+(1/2)n (1/2)[2n5 + 3n? + n] = (1/2)n(2n? + 3n + 1) (1/2)n(n + 1)Qn +1), so Thi? = (4/6)n(n + 1)(2n + 1) (as shown in Example 4.4). (b) From DL, 4+ (n+1)t = DRe(i+1)* = Do i* +44 6i7 +4141) = DR, 44 Ok, B+ 6LR1 P+4 D2, i+ Lhe 1, it follows that (n+1)! = 402, PF +608, F +400, 1+ Deo Consequently, 4 = (n+1)*—6[n(n + 1)(2n + 1)/6] — 4[n(n +1)/2] ~ (a +1) = nt +4n?+6n?4+4n+ 1 —(2n5 + 3n? +n) — (2n? + 2n) —(n +1) = nt + 2n3 +n? = n(n? + 2n 41) = n%X(n+ 1). (1/4)n?(n +1)? [as shown in part (d) of Exercise 1 for this section). From Shi i + (n + 18 = Choli + 1° = Cho(i® + 5i* + 10: + 10? + 51+ 1) = Thi +5 DR t+ 108, P+ 10D, F +558, 1+ Dhol, we have 5 wt=(nt 1) — (10/4)n(n + 1? — (10/6)n(n + 1)(2n + 1) — (5/2)n(n +1) — (n +1). BER = nb 45n4 + 10n9+ 10n? + hn +1—(5/2)n4 —5n® — (5/2)n? — (10/3)n® — 5n? — (6/3)n — (5/2)n® ~ (5/2)n— n= 1 n+ (6/2)n* + (6/3)n® — (1/8)n. 4 Consequently, Diy = (1/30)n(n + 1)(6n? + On? +n —1). Let 1,22,...5t25 denote the numbers (in their order on the wheel), and assume that ay teat ey < 39,22 +25 424 <39,...,2204 225+ 21 < 39, and 235-+21 +22 < 39. Then DE, Bay < 25(39). But Di, 32; = 3 LE, § = (8)(25)(26)/2 = (39)(25). (a) 7626 (>) 627,874 a) ‘The typical palindrome under study here has the form abba where 1 (n)(n + 1)/6 = (2n)/2 => (n+D/6=13n4+1=63n=5. (@) Dent (b) Du 100, 4, = SLIMY t: — TN, ts = (100)(101)(102) /6 — (50)(51}(52)/6 = 171, 700 — 22,100 = 149,600. a) Tha te = Dy SUH = ye (27 +4) = 2TH P+ DH = Amin + 1)2n+1)/6]+ [n(n + 1)/2] = [n(n + 1)(2n + 1)/3] + [n(n + 1)/2] = n(n + 1)[2942 + 3) = n(n + 2)[4] = n(n + 1)(4n +5)/6. b) SM ta: = 100(101)(405)/6 = 681,750. 1 to 100 do sum := sum + (2+i)¥(2*i+1)/2 print sum end (a) (cos@ + isin 8)® = cos? 8 + 2icin8 cos@ ~ sin®@ = (cos? @ ~ sin®#) + i(2sin 8 cos8) = 0s 26 + isin 26. ) + (cos8 + ising)” = cooné + isinn®, S(1) is true, so assume S(k) : (cos + (cos i#+-isin k8). Consider 5(k-+1) : (cos 0-+i sin8)*** = (cos 8-+i sin8)*(cos 0+ isin 8) = (cos 46 + isin k6) « (cos + isin@) = (cos k@ cos 6 — sin kO sin#) + i(sin @ cos k + sin k0 cos) = cos(k + 1)8 + isin(k +1)9. So $(k) => S(k +1) and the result is true for all n € Z* by the Principle of Mathematical Induction. (©) (1-41) = 2%(cos 4500° + isin 4500°) = 2°(cos 180° + i sin 180°) = —(2"), 97 13. 14. 15. 16. at. ‘= 7) 2 x 2 squares and 36(= 6?) 3 x 3 squares. In total there are VED 4S 4 48 = (BB+ 1)(2-8 + 1/6 = (8)(9}(17)/6 = 204 squares. (b) For each 1 < k (2#)(2) < (kI)(k +1), or 21 < (k-+1)! Hence S(n) is true for all n > 4 by the Principle of Mathematical Induction. For n = 5,25 = 32 > 25 = 5. Assume the result for n = k(2 5): 2 > B. For & > 2,k(k — 2) > 1, or B > 2k+1, But 2 > => 42> 4K mp BHD BER > #4 (2k +1) = (k +1). Hence the result is true for n > 5 by the Principle of Mathematical Induction, (a) 3 (b) a= (©) Forn>ta= YD =n Proof: For n = 1, so this first case is true and establishes the basis step. Now, for the inductive step, assume the result true for n= k(2 1). Thatis,,= > =k 44S Porn =k+1wefindthatsn= YD f= DO d+ YO x, where the b#ACKia a4BCXy ThHICOCK ng first sum is taken over all nonempty subsets B of Xj and the second sum over all subsets C of Xp41 that contain k +1. Then sigs = s¢ + (ghz) + (giz )se] = b+ Gg) + (R= k+(g)(1+4) = k+1. Consequently, we have deduced the truth for n = &+1 from that of n = k, The result now follows for all n > 1 by the Principle of Mathematical Induction. (a) Once again we start at n = 0, Here we find that 1 = 1 + (0/2) < Hy = Hy, so this first case is true. Assuming the truth for n = k(€ N) we obtain the induction hypothesis L+(k/2) S Hos. ‘Turning now to the case where n= k-+1 we find Hays = Hye+[1/(2+1)] + (1/(2*+2)]+ weet [1/(2t+2°)] > Hye +[/(2*+2))+(1/(24+24)] +... (2+ 2")] = Aye OM /204] = Hy + (1/2) 2 1+ (k/2) + (1/2) = 1+ (k+)/2. The result now follows for all n > 0 by the Principle of Mathematical Indnetion, (b) Starting with n = 1 we find that 1 ae = Hs it (2)(0)/21(8/2) — ((2)(2)/4) = ((2))/2)Ha ~ (2)()/4). 98 18. 19. 20, Assuming the truth of the given statement for n = k, we have ‘ DOIHs = [C+ (A) /2 Haas — (C8 + Y(H)/4). Fo For n = k +1 we now find that rn A Do5Hy = OSH + (hk + Dew = [C+ 1)(8)/21Heas ~ [C+ 1)(0)/A] + (B+ 1) Hae = (b+ 1) + (b/2) nas — (b+ DRA] = (E+ DL + (b/2)) Haga — AME + 2))) ~ (+ 1)08)/4] = [E+ YE + 1/2 Hage — (E+ CR + 2)I/28 + 2)) = (8 + NODA] = [(k + 2)(k + 1)/2]Hese — ((1/4)[2(k + 1) + BCR + 1] = [(k + 2b + 1)/2] Hata ~ [(8 + 2)(k + V/A). Consequently, by the Principle of Mathematical Induction, it follows that the given state- ment is true for all n € Z*. Conjecture: For all n € N, (n? +1) +(n?+2)+(n?+3)+...4(n+1)? = Sw +y= re +(n41). ] matt meth matt Proof! $s (n? +i) =n? 14 Soi = n%(2n 4 1) 4+ (On + 1)Qn42)/2= 2n? +n? 4 (On + 1)(n-$1) = On! tn? + On? 4+ Bn +L =n? + [n+ Sn? 4 Bn + 1] = n+ (nt 1%. Assume S(b) true for some k > 1. For $(k +1), Dut! i = [k-+ (1/2))2/2-+ (k +1) = (GE +B + (0/4) + Be + 29/2 = (EE)? + Oe + 1) + 1/4))/2 = (41) + 0/2/72. S S(k) => S(k+1). However, we have no first value of & where 5(k) is true: For each k > 1,344 i = (k)(b-+1)/2 and (k)(he-+ 1)/2 = [k + (1/2)P/2 ==> 0 = 1/4. For n = 0,5 = {a} and 0 comparisons are required. Since 0 = 0-2, the result is true when n = 0. Assume the result for n = b(> 0) and consider the case n =k +1. If {S| = 2 then S = $,US» where |S;| = {S| = 2*. By the induetion hypothesis the number of comparisons needed to place the elements in each of S,, 5; in ascending order is bounded by k-2#, Therefore, by the given information, the elements in S can be placed in ascending order by making at most a total of (k-2")+(k-2*)+(2*+2*—1) = (k+1)2*4—-1 < (k+1)2447 comparisons. 99 21. 22, 23. For 2,n € Z*, let S(n)} denote the statement: If the program reaches the top of the while loop, after the two loop instructions are executed n(> 0) times, then the value of the integer variable answer is z(n!). First consider $(1), the statement for the case where n = 1. Here the program (if it reaches the top of the while loop) will result in one execution of the while loop: 2 will be assigned the value z-1 = 2(1!), and the value of n will be decreased to 0. With the value of n equal to 0 the loop is not processed again and the value of the variable answer is 2(1!). Hence S(1) is true. Now assume the truth for n = k: For 2,k € Z*, if the program reaches the top of the while loop, then upon exiting the loop, the value of the variable answer is x(k!). To establish S(k + 1), if the program reaches the top of the while loop, then the following occur during the first execution: ‘The value assigned to the variable x is 2(k + 1). The value of n is decreased to (k+1)—-1 =k. But then we can apply the induction hypothesis to the integers 2(k +1) and k, and after wwe exit: the while loop for these values, the value of the variable answer is (2(k+1))(H!) = a2(k +1)! Consequently, S(n) is true for all n > 1, and we have verified the correctness of this program segment by using the Principle of Mathematical Induction. If n = 0, then the statement ‘n # 0° is false so the while loop is bypassed and the value assigned to answer is z = x +0-y. So the result is true in the first case. Now assume the result true for a = k ~ that is, for 2,y € R, if the program reaches the top of the while loop with k € Z, k > 0, then upon bypassing the loop when k = 0, or executing the two loop instructions 4(> 0) times, then the value assigned to answer is z-+ny. To establish the result for n = k + 1, suppose the program reaches the top of the while loop. Since k > 0,n = k +1 > 0, so the loop is not bypassed. During the first pass through the while loop we find that ‘The value assigned to z is 2+ y; and ‘The value of n is decreased to (k +1)~1=k. Now we apply the induction hypothesis to the real numbers 2+y and y and the nonnegative integer n ~ 1 = k, and upon bypassing the loop when k = 0, or executing the two loop instructions &(> 0) times, then the value assigned to answer is (ety)tkhy=at(k+ Dy. ‘The result now follows for all n € N by the Principle of Mathematical Induction. (a) The result is true for n = 2,4,5,6. Assume the result is true for all n = 2,4,5,..., k—1,k, where k > 6. Hn = k +1, then n = 2+ (k ~ 1), and since the result is true for k~ 1, it follows by induction that it is true for & +1, Consequently, by the Alternative Form of the Principle of Mathematical Induction, every n € Z+,n # 1,3, can be written as a sum of 2’s and 5's. (b) 24=5454+7+7 W=S5+ 5+ 54545 2=54 74747 100 24, 26. QT= 545454547 W=TH+THTFT Hence the result is true for all 24 29, we may write k-+1 = [(k+1)—5]+5 = (k—-4)+8, where k — 4 can be expressed as a sum of 5’s and 7's. Hence k +1 can be expressed as such a sum and the result follows for all n > 24 by the Alternative Form of the Principle of Mathematical Induction. (a)ag=3 a =5 5=8 a= 13 ay = 21 (b) a, = 1 < (7/4), so the result is true for n = 1. Likewise, a) = 2 < # = (7/4)? and the result holds for n = 2. Assume the result true for all 1 2. Now for n = k-+ 1 we have ayy: = ay + apna < (T/A) + (7/4)? = (7/4)-[(7/4) + 3] = (7/4) 21/4) = (7/4) (44/16) < (7/4)**(49/16) = (7/4)*-1(7/4)* = (7/4)**!. So by the Alternative Form of the Principle of Mathematical Induction it follows that a, < (7/4)* for all n > 1. B(X) = EpePr(X =z) = Et a() = DEI 2 = DE = E(X*) = Ye2*Pr(X = 2) = Trae) = (2) 022 Uschi Sanpete Ver(X) = B(X*)— B(X) m= espe Cy ete =p] (n+ 1) sees) = ea a) a © TES (aaaani= (Peon = of 4 = mat! 1)4:@a-1y-i = (G)aoas + (}) arto = 2a b) a = DEN (7) aiaonsi = Cho ({)aian-s (2)aoae + (?)arar + (2)azd aa(2a3) + 2(43)(a3) + (28 Jag = $28 (7?) acaqeay-i = Chao (?)aias-+ (ees+ Case Core (Jose Sea + 3(a§)(2aj) + 3(2a5}(a3) + (6a5)(a) co) a ©) For n 2 0, ay = (n!jogtt, 101 27. 28, L Proof: (By the Alternative Form of the Principle of Mathematical Induction) ‘The result is true for n = 0 and this establishes the basis step. [In fact, the calculations in parts (a) and (b) show the result is also true for n = 1,2,3, and 4.) Assuming the result true for n= 0,1,2,3,...,F(2 0) ~ that is, that a, = (n!)agt# for n = 0,1,2,3,...,k(2 0) —we find that aur = ho (*)aia The (NCAR Y(& - MMas+4) Theo (7) (Nk — flag Th Raft? = (e+ kab?) = (k + 1lakt?. So the truth of the result for n = 0,1,2,. n= k +1, Consequently, for all n > 0, a, Principle of Mathematical Induction. (2 0) implies the truth of the result for nl)agt? by the Alternative Form of the Let T = {n € Z+|n > no and S(n) is false}. Since S(no), $(n0 + 1), $(0 + 2), ..+5$(m1) are true, we know that ng,rg + 1,no +2,...4m ¢ T. If T # @, then by the Well- Ordering Principle T has a least element r, because T © Zt. However, since S(no), S(no + 1),.-.,5(r — 1) are true, it follows that S(r) is true. Hence T = 9 and the result follows. (a) @) The number of compositions of 5 that start with 1 is the number of compositions of 4, which is 2~ (ii) 2+ (wy) 1 (b) In total, there are 2(“+)-! = 2” compositions for the fixed positive integer n + 1. For 1 1. Cag = Cn, fora > 1. (b) cy = 7; and (ce) « =1; and outs = Tea, for n > 1. Catt = On + 2n $1, for n > 1. (©) o =10; and () 1 =8,e,= 1; and ent = Oy +3, for n > 1. Cnt2 = Cn, for n> 1. (a) For any statements p1,P2,...,PasPaiay We define 102 5 (1) the disjunction of p,,pz as > V pa; and. (2) the disjunction of pi,p2,---sPrrPati by Px VP2 V-+-V Pn V Patt => (Pi V pa V +++ V Pu) V Patt (b) The result is true for n = 3. This is the Associative Law of V of Seetion 2.2. Now assume the truth of the result for n = k > 3 and all 1 (PL V Pa Vow V Be V Brg VV Pa) ‘When we consider the case for n= k+1 we must account for all 1¢r Pi V PV». V pie V Piety from our recursive definition. 2) For 1 (D1 Va V oe V Pr) V [Pret V+ Vk) V Psa) <= [(p1 V2 V--- V Be) V (Brat V = V Pad) V Pe (Pi V Pa V+ V Be V Pgs Vo V Ph) V Pett => Pr V Ba V«--V Pr V Brg V «++ V Pk V Pie So the result is true for all n > 3 by the Principle of Mathematical Induction. For n € Z*,n > 2,let T(n) denote the (open) statement: For the statements p,91,42,--+ dns PV (ds A... A Gn) => (PV 1) A(PV 2) Ao ACP du). ‘The statement T(2) is true by virtue of the Distributive Law of V over A. Assuming T(k), for k > 2, we now examine the situation for the statements p, q1,2,---+Jis ee We find that pV (qi Aga A... A ge A quis) => PV [(gr Aga A... Age) A dasa] BV (qi Aga A..-Ade)] A(PY dust) > [(PV 41) A(PV ar) A... A(PY ge) A (PY est) (pV as) A(PV a2) A... A(DV 94) A(PV diy). It then follows by the Principle of Mathematical Induction that the statement T(n) is true for all n > 2. (a) For n = 2, the result is simply the DeMorgan Law ~(p: Vp2) <= yi Av. Assuming the truth of the result for n = k, we find for n = k +1 that (py V pa V ..-Pk V Dist) <> af(Ps V pa VV Pe) V Pegs] <> (Pi V Pa V--V Pe) A Pag > (P1 Aap2 A... Apa) A Pass > 7PLATPA...A7PRAMPi¢r, 80 the result is true for all n > 2, by the Principle of Mathematical Induction. (b) This result can be obtained from part (a) by a similar argument, or by the Principle of Duality for statements. (a) (@_ The intersection of Ay, Az is Ai Aa. (ii) The intersection of Aj, A;,.-.5An,Ang1 is given by Ay A.M... AnD Ang = (ApN.ALN...1.Ag)M Angry the intersection of the two sets: 41 7.4,N...4, and Ayr. (b) Let S(n) denote the given (open) statement. Then the truth of (3) follows from the Associative Law of 9. Assuming S(k) true for some k > 3 and all 1 3. 103 6. (i) Forn = 2, the result follows from the DeMorgan Laws. Assuming the result for n = k > 2, consider the case for k +1 sets At, Aa,.--)4u, Ansa. Then Ay NAN... 1 Ag A Ag (ALA AZN.. Ag) 0 Ags = (Ar ADA. AG) U Ans = [ALU AQ U...U AY) U Ag = “A,UAQU. ..UA,UAs;2, and the result is true for all n > 2, by the Principle of Mathematical Induction. (ii) The proof for this result is similar to the one in part (i). - Simply replace each occurrence of 9 by U, and vice versa. (We can also obtain (ii) from (i) by invoking the Principle of Duality - Theorem 3.5.) non 7. For n= 2, the truth of the result A M(B, U By) = (AN By) U(AN By) follows by virtue of the Distributive Law of M over U. Assuming the result for n = k, let us examine the case for the sets A, By, Ba,-.., Bry Bris. We have AM (B, UB, U...U By U Bayt) = AN ((By U By U...U By) U Bey) = [AN (By UB U...U By] U(AN Biya) = (A By) U(AN By) U...U(AN By) U(AN Baa) = (AN By) U(ANB)U...U(AN By) U(AN Begs). 8. (a) (i) Forn=2,21 +22 denotes the ordinary sum of the real numbers 2; and 22. (i) For real numbers £1, 22,-.-,tm»tn¢1s We have 2 +22 +... +4 + Sngt = (ti + 2+... 4+2_) + Za41, the sum of the two real numbers 2) + 22 +... +2, and 244. (b) The truth of this result for n = 3 follows from the Associative Law of Addition — since 21 + (ta + 23) = (2; +22) +2, there is no ambiguity in writing 21 +22 + z9. Assuming the result true for all k > 3 and all 1 , let us examine the case for k+1 real numbers. We find that 1) When r = k we have (2; +22 +... +2,) + 2pq1 = tr tat... +2, + 2r41, by virtue of the recursive definition. 2) For 1 2. For the real numbers 21,23)...,2m)7a41, We define Biba Eutngs = (2122-1 En )Pntry the product of the two real numbers 2523-++2q and 2411. b) ‘The result holds for n = 3 by the Associative Law of Multiplication (for real numbers). So 23(z223) = (2122), and there is no ambiguity in writing 212223, Assuming the result true for some (particular) k > 3 and all 1 4) real numbers. We find that 1) When r= i we have (ita tet = tate 104 10. 1. 12, by virtue of the recursive definition. 2) For 1 3 and all 1 2 by the Principle of Mathematical Induction. Proof: (By the Alternative Form of the Principle of Mathematical Induction) 22 v2 = (v2); and 22= (v3). ‘Therefore the result is true for these first three cases, and this gives us the basis step for the proof, Next, for some k > 2 we assume the result true for all n = 0,1,2,..-,k. When n =k +1 we find that cee 1yg2 = Gags = Geyn + an > (VB) + (VB? = (VBP + VDE = VDP = (3/2)(2)(V 2)? = (3/2)(V2)* > (V2), because (3/2) = 1.5 > V2 (= 1.414). This provides the inductive step for the proof. From the basis and inductive steos it now follows by the Alternative Form of the Principle of Mathematical Induction that 4,42 > (V2)" for all n € N. Proof: (By Mathematical Induction) We find that Fy = }0F; = —1= F,~1, so the given statement holds in this first case — and this provides the basis step of the proof. For the inductive step we assume the truth of the statement when n = k (> 0) — that is, i that JF; = Fay - 1. Now we consider what happens when n = k +1. We find for this = ease that an k DOR = (LF) + Fest = (Fase — 1) + Figs = (Feta + Finn) —1 = Fina - 1, & = so the truth of the statement at n = k implies the truth at n= k 41. Consequently, 5F; = F,42~1 for all n € N — by the Principle of Mathematical Induction. So 105 13, 14, 15. Proof: (By Mathematical Induction). Basis Step: When n = 1 we find that 1 Fa z= h/2 Loe = BS s0 the result holds in the first case. : Inductive Step: Assuming the given (open) statement for n = k, we have > When n = & +1, we find that S mop, AR ema = 14 (1/24), — Fava] 314 (1/249) [-Feas — Fass] From the basis and inductive steps it follows from the Principle of Mathematical Induction that B_, Au 2 a” ~ (2/2) + 0/2) - Fyn) — Frial 1/2") Flat + Feg2) = 1 — (Figs/2**). ne Zt DR/) = 1-(Fags/2")- Proof: (By Mathematical Induction) For n = 1 we find ()(8) - 2 = Lyle ~2, 80 the result holds in this first case. ‘ Next we assume the result is true when n = k, This gives us }L? = LiLiy, ~2. Then a ke ‘ for n= k+1 we find that 5° 1? = 71? +L}y) = Delag -24 Dh, = Laan +02, -2 a = Daga(La + Legs) — 2 = LavrLige - 2 Consequently, by the Principle of Mathematical Induction, it follows that Yn e Zt SOL? = Lala ~ 2 Proof: (By the Alternative Form of the Principle of Mathematical Induction) ‘The result holds for n= and n= 1 because (n= 0) SF = 5F, = 8(1) = 5 = 7 ~2 = Ly — Ly = Loge — Lp; and (n=1) BFiy2 = 5Py = 5(2) = 10 = 11-1 = Ds ~ Ly = Lye — Ly. ‘This establishes the basis step for the proof. Next we assume the induction hypothesis — that is, that for some & (> 1), 5Faia = Ents ~ Ln for all n =0,1,2,...,4—-1,4. It then follows that forn =k +1, 106 16. it. 18. BF tayt2 = Bees = 5(Fhea + Fist) = 5(Foaa + Fasysa) = BFiga + 5Fu—tyea = (Lee ~ Le) + (Laeaysa — Lin) = (Legs — Li) + Digs — Dees) = (Lagat Liga) — (Lat Lan) = Lays Luvs = Lteerjaa— Lava — where we have used the recursive definitions of the Fibonacci numbers and Lucas numbers to establish the second and eighth equalities. It then follows by the Alternative Form of the Principle of Mathematical Induction that Wn EN 5Fyia = Lnee — Ln (a) Let H denote the set of all positive even integers. We define E recursively by (1) 2€ B; and (2) For eachn€ E,n+2€E. {b) If G denotes the set of all nonnegative even integers we define G recursively by (1) 0€G; and (2) For each me G, m+2EG. (a) Steps Reasons (1) pars To Part (1) of the definition (2) (pVq) Step (1) and Part (2-4i) of the definition (3) (>r) Step (1) and Part (2-i) of the definition (4) (Toa (-r)) Steps (1), (3), and Part (2-iii) of the definition (5) (@Vg) 4 (BACH) Steps (2), (4), and Part (2-iv) of the definition (>) Steps Reasons Q) pars Fo Part (1) of the definition (2) (-e) Step (1) and Part (2-i) of the definition (3) (Ce) o 9) Steps (1), (2), and Part (2-v) of the definition (4) (sv Fo) Step (1) and Part (2-ii) of the definition (5) (@PA(sV Fi) Steps (1), (4), and Part (2-iii) of the definition (6) ((-p) 4 9) > (PA(sV H))) Steps (3), (5), and Part (2-iv) of the definition (a) k=0: 321 182, 213, 281,312 123 4321 1492, 2143, 2431, 3142, 3214, 3241, 3421, 4132, 4213, 4231, 4312 kaa: n 1243, 1324, 1342, 1423, 2134, 2314, 2341, 2413, 3124, 3412, 4123, 1 1234 Benen 107 19. 20. (a) (m—1)-k =m-—k~1 descents. (e) (i) Five locations: (1) In front of 1; (2) Between 1,2; (3) Between 2,4; (4) Between 3,6; (5) Between 5,8. [The five locations are determined by the four ascents and the one location at the start (in front of 1) of p.] (ii) Four locations: (1) Between 4,3; (2) Between 6,5; (3) Between 8,7; (4) Following 7. {The four locations are determined by the three descents and the one location at the end (following 7) of p.] CE) tk = (K+ Ltmatse + (m= b)tm-ahat> Let 2: 21,22).-.,2m denote a permutation of 1,2,3,...,m with k ascents (and m—k—1 descents). (1) If m = z_, or if m occurs in 2;mzi42,1 ziy2 then the removal of m results in permutation of 1,2,3,...,m—1 with k—1 ascents - for a total of (1+ (m ~ k= D)}tma-a = (m— B)Rm—1a-t permutations, (2) If m = ay or if m occurs in aimeiya, 1 Si < m—2, with 2; < s;42, then the removal of m results in a permutation of 1,2,3,...,m—1 with k ascents ~ for a total of (k + 1)tm-1,4 permutations. Since cases (1) and (2) have nothing in common and account for all possibilities the re- cursive formula for 7,4 follows. [Note: These are the Eulerian numbers a... of Example 421) () (+ (4) = HE -D/2 +1 + DK /2] = (+ + B/D =F Co) (8) +4(31) +E?) = = 1)(F 2/6] +4108 + 1)H)(E—1)/6}+[(E+2)(R-41)(H)/6] = (&/6)[(k — 1)(& — 2) + 4(k + 1)(k — 1) + (& +.2)(k +1)] = (&/6)[687] = (4) Sates = Sie (@) + 400E 5") + Dts (137) = (C21) +4007) + (8) = (1/24) [(n + 1)(m)(n — In — 2) + 4(n + 2)(n + D(n)(n — 1) + (n+ 3)(n +2)(n + In) [(n+1)(n)/24][(n — 1)(n -2)+4(n+2)(n—1) +(n+3)(n+2)] = [(n+1)(n)/24][6n? + 6n] n(n + 1)7/4. (e) k= (i) +104) +1167) + (FP) In general, kt = Sc} ai, (*t"), where the a,,’s are the Eulerian numbers of Example 4.21. [The given summation formula is known as Worpitzky's identity,] (a) For n = 2,[(p1 —+ pa) A (p2 —> Pa)] => [(P1 A pa) —+ ps}, for if (1 A pa) — Bs hag value 0, then py and pz have value 1 and ps has value 0, But then p; — py and (Pp: — Pa) A(p2 — ps) both have value 0. Assume the result for n = k — 1, and consider the case af n = k. Then {(p: —> Pa) A(P2 —> Pa) A.--\ (Pant —* Pa) A (Pe —* Pesa)] => [Cpr Apa A... AP) > Pk) A (Pe —> Pata)] => [CPt Apa A... A Pk) > Pasa (b) Suppose that S(1) is true and that if S(k) is true for some k € Z*, then S(k) => S(k +1). Then we find that [S(1) => S(2), $(2) => S(3),...,5(k) => S(k + 1)] and by part (a), [(S(1) A $(2) A... A S(k)) => Sti}. So by Theorem 4.2, S(n) is true for all n. Hence Theorem 4.2 implies Theorem 4.1. (c) Wn = 1 the result follows, Assume the result for n = k (> 1), for some k € Z* and consider the case forn = k+1. If 1 € S then the result follows. If 1 ¢ S, let 108 T = {2-1 € S} £0. Then k € T and by applying the induction hypothesis to 7, T has a least clement ¢ > 1 and S has a least element t+1> 2. (a) From part (c), Theorem 4.1 implies the Well-Ordering Principle. In the solution of Exercise 27 of Section 4.1 the Well-Ordering Principle implies Theorem 4.2. Hence ‘Theorem 4.1 implies Theorem 4.2. Section 4.3 (a) a= a-1, 80 1fa;0 =a-0, 20 af0. (b) ajb => b = ac, for some c€ Z. ba =» a = bd, for some dé Z. Sob = ac = Kde) and d=¢=1or ~1. Hence a= bor a =~. (0) ald => b= az, ble => ¢ = by, for some 2,y,€ Z. So c= by = a(zy) and ale. (d) ald => ac = 6, for some c € Z => acz = br => albz. (©) Ifalz,aly then z = ac,y = ad for some c,d € Z. So z ‘The proofs for the other cases are similar. (g) Follows from part (f) by the Principle of Mathematical Induction. y= a(e~d), and alz. (a) ajo => ax = b, for some x € Zt; eld => cy = d, for some y € Z*. Then (ac)(zy) = bd, 80 aclbd. (©) aclbe => acx = be, for some x € Zt => (ax — b)e = 0 => [ax —b = 0, since c> 0) => az=b => ald, ‘The proof for part (b) is similar. Since q is prime its only positive divisors are 1 and g. With pa prime, p > 1. Hence Pig p= No. 6|(2-3) but 6 f2 and 6 {3. Proof: (By the Contrapositive) Suppose that a | b or a| c. Tal, then ak =b 3k € Z, But ak = b= (ak)c = a(ke) = be > a| be. A similar result is obtained if @ | ¢. Proof: (By Mathematical Induction) The result for n = 2 is true by virtue of part (a) of Exercise 2. So assume the result k (> 2). Then consider the case for n = k +1: We have positive integers $F Bega, bt, bay.+ 5 bes bagi, Where aj|bj for all 1 ai41{b- basis OF (as g++ +4 Ongs))(bi + Baby - Bag). ‘Therefore the result is true for all n > 2 — by the Principle of Mathematical Induction. a) Leta=1,6=5,c=2, Another example isa=b=5,¢=3. 109 10. Ww 12. 13, Ma. 15. b) Proof: 31|(5a +764 11c) => 31](102 +146 +22c). Also, 31|(31a+ 315+ 31c), so 31|[(31a +316 + Ble) — (10a + 14 + 22c)]. Hence 31|(21a + 176+ 9c). Note that each of Eleanor’s 12 numbers is divisible by 6. Consequently, every sum that uses any of these numbers oust also be divisible by 6 (because of part (g) of Theorem 4.3 ~ where each x; = 1, for 1 bax + (a+ 2)y] for all 2 y EZ. Let 2 = —1,y=1. Then b> 0 and )2, so b= 1 or 2. Let n= 2k+1,k > 0. n?-1 = (2k41)P — must be even, it follows that 8{(n? ~ 1). = 4k +4k = 4k(k +1). Since one of k,k+1 Let a = 2m +1, =2n+1, for some m,n > 0. Then a? +0? = 4(m?7+m+n?+n)+2, so 2{(a? + 5) but 4 J (a? + 1). (a) 23=3-742, 9=3, (b) -115 = (-10)-12 +5, (c) 0=0-42+0, g=0, (4) 434=14-314+0, Proof: For n = 0 we have 7*— 4" = 7 4° = 1~1 = 0, and 30. So the result is true for this first case. Assuming the truth for n = k we have 3|(7* — 4"). Turning to the case for = k-+1 we find that 7! —4h+! = 7(7#) —4(4*) = (3+4)(7*)—4(4*) = 3(7*) +4(7 — 4"). Since 33 and 3|(7—4*) (by the induction hypothesis), it follows from part (£) of Theorem 4.3 that 3|[3(7*) + 4(7* — 4*)], that is, 3[(7#*! ~ 4*#1), It now follows by the Principle of Mathematical Induction that 3[(7" — 4") for all n EN. (a) 137 = (10001001), = (2021), = (211)s (b) 6243 = (1100001100011), = (1201203), = (14143), (c) 12,345 = (1100000111001), = (3000321), = (30071)s Base 10 Base 2 Base 16 (a) 2 10110 16 (b) 887 oo0001111 20F (©) 1234 10011010010 4D2 (a) 6923 1101100001011 1B0B 110 Base 16 Base 2 Base 10 (at 10100111 167 16. (b) 4€2 10011000010 1218 () 10B2 1110010110010 7346 (d) A2DFE 10100010110111111110 667134 Base 2 Base 10 Base 16 (a) 11001110 206 cE (b) 00120001 49 31 (©) 11110000 240 FO (a) 01010211 87 87 18. The base 7. 19. Here n is a divisor of 18 - so n € {1,2,3,6,9, 18}. 20. (a) 00001111 (b) 11110001 (ce) 01100100 (a) Start with the binary representation of 65 65 tL 1000001 Interchanges the 0's and 1's to obtain the one’s complement. 10111110 4 Add 1 to the one’s complement 10111111 (@) oun {#) 10000000 2. Largest Integer Smallest Integer (@) 7=P-1 -8=-(2) (bo) 127= 27-1 ~128 = -(2") © 2-1 (a) 1 © me 22. (a) 0101 (=5) 40001 (= 1) 0110 (=6) () ont (a) 101 ¢ 1000 £1010 6) wit 0111 (#9) (overflow error) 23. ox = ay => az ~ay 0, In the system of integers, if bc € Z and be =0, then 6 =O ore and a #0 then (r~y) =O andz=y. ut 24. 25. Program ChangeOfBase (Input,Output); Var Number, Base, Remainder, Power, Result, Keep : Integer; Begin Writeln (‘Input the base 10 number - positive integer - that is to be changed.’); Write (‘Number = *); Read (Number); Writeln (‘input the base - an integer between 2 and 9 inclusive Write (* Base = *); Read (Base); Keep Power := 1; While Number > 0 Do Begin Remainder := Number Mod Base; Result + (Remainder * Power); Power * 10; Number Div Base End; Writeln (‘The number ’, Keep:0, ‘when converted to’, “base ', Base:0, ‘is writien as ’, Result:0) End. (i) a=0, choose g =r =0. (i) Leta > 0,5 <0. Then —b > 0 so there exist g,r € Z with a = 9(—6) +r, where O 0 s0 ~a = q(~b) +4" with 0 0 but rr — raf < |B. Hence jgr — gal]6| < [6]. This can only happen if gr = go. But then ry = ra, 80 9,7 are unique. Program Base_16(Input,Output); (* This program converts a positive integer lese than 4,204,967,295 (= 16% ~ 1) to base 16.*) ‘Type subl = 0..15; 2 “Writeln (‘What positive integer do you wish to convert to base 162"); Readln (2); iss 0; While m > 0 do Begin positions{i} ‘Write (‘The integer °, n:0,‘ in base 16 is written °); While j > =0 do Begin If positions|j] < 10 then ‘Write (positions{j] : 1) Begin Jarger := positionsfj]; Case larger of Write ('A’); Write (‘B"); 12: Write (10°); Write (‘D’); 1s 27. Writeln (!.’) End. Program Divisors (input,output); Var N, Divisor: Integer; Begin “Write (‘The positive integer N whose divisors are sought is N = Read (N); Writeln; IfN=1Then Writela (‘The only divisor of 1 is 1.’) Else Begin Writeln (‘The divisors of ’, N:0, ‘are Writeln (1:8); If N Mod 2 = 0 Then Begin For Divisor := 2 to N Div 2Do If N Mod Divisor = 0 Then Writeln (Divisor:8) End Else For Divisor := 3 to N Div 3 Do Jf N Mod Divisor = 0 Then Writeln (Divisor:8) End; ‘Writeln (N:8) End, Proof: Let ¥ = {3k | k € Z+}, the set of all positive integers divisible by 3. In order to show that X = Y we shall verify that X CY and ¥ CX, (@) (X CY): By part (1) of the recursive definition of X we have 3 in X. And since 3=3-1, it follows that 3 is in ¥. Turning to part (2) of this recursive definition suppose that for x,y € X we also have z,y € ¥. Now 2-+y € X by the definition and we need to show that z+ y € ¥. This follows because 2,y € ¥ = 2 = 3m,y = 3n for some myn € Zt => ety = 3m+3n = 3(m4tn), with m+n € Zt > ety € ¥. Therefore every positive integer that results from either part (1) or part (2) of the recursive definition of X is an clement in Y, and, consequently, X CY, 14 29. 4. (i) (¥ © X}: In order to establish this inclusion we need to show that every positive integer multiple of 3 is in X. This will be accomplished by the Principle of Mathematical Induction. Start with the open statement S(n): Sn is an element in X, which is defined for the universe Z+. The basis step — that is, S(1) — is true because 3-1=3 ie in X by part (1) of the recursive definition of X. For the inductive step of this proof we assuune the truth of S(£) for some k (> 1) and consider what happens at n=k-4+1. Brom the inductive hypothesis $(k) we know that 3k is in X. Then from part (2) of the recursive definition of X we find that 3(k +1) =3k+3 € X because 3k, 3. € X. Hence S(k) = S(k +1). So by the Principle of Mathematical Induction it follows that S(n) is true for all n € Z+ — and, consequently, ¥ CX. With X CY and ¥ CX it follows that X = Y. (a) Since 2{10¢ for all t € Z*,2jn if 2jro. (b) Follows from the fact that 4|10° for # > 2. (c) Follows from the fact that 8110 for t > 3. In general, 24 if 24 (r, 10? +--+ + 11-10-4170). Section 4.4 (a) 1820 = 7(281) + 203 231 = 1(203) + 28 (28) +7 7(4), 80 ged(1820,23) = 7 203 - 7(28) = 203 - 7[231 - 203] = (-7)(231) + 8(203) = (-7)(231) + 8[1820 - 7(231)] = 8(1820) + (-63)(231) (b) ged(1369,2597) = 1 = 2597(534) + 1369(-1013) (c) ged(2689,4001) = 1 = 4001(-1117) + 2680(1662) (2) Was + =2, then ged(a,b) = 1 or 2, for the ged of a,b divides a,b so it divides s+ it = (b) as +t = 3 => ged(a,b) = Lor 3. (c) as + bi = 4 = ged(a,b) = 1,2 or 4. (A) as + ot = 6 => ged(a,d) = 1,2,8 or 6. ged(a,d) = d => d = ar + by, for some zy € Z. ged(ajb) = d => a/d.b/d € Z. 1=(a/d)z + (6/d)y => ged(a/d,6/d) = 1. Let ged(a, 6) = g, ged(na,nb) = h. ged(a,b) = g ==> g = as + Ut, for some s,¢ € Z. ng = (na)s + (nb)t, s0 hlng. h = ged(na,nb) => h = (na)z + (nb)y, for some z,y € Z. f= n(az + by) => nfh => nh; = h for some hy € Z and hy = az + by. g = ged(a,b) => gihs => n(ghz) = h for some hy € Z. Since (ng)|h and Al(ng), with hyng € Z*, it follows that ged(na, nb) = h = ng = nged(a, 6). 15 8 10. uu. 12. Proof: Since ¢ = ged (a,b) we have a = er, b = cy for some 2,y € Z*. So ab = (ex\(cy) = (zy), and ¢? divides ab. (a) 2 = Un +2)+(-1)n. Since ged(n,n + 2) is the smallest positive integer that can be expressed as a linear combination of n and n+ 2, it follows that ged(n,n + 2) < 2. Furthermore, ged(n,n + 2)/2. Hence ged(n,n +2) = 1 or 2. In fact, ged(n,n+ 2) = 1, for n odd, and ged(n,n +2) = 2, for n even. (b) Arguing as in part (a) we have ged(n,n+3) = 1or 3. When n is a multiple of 3, then ged(n,n +3) = 3; otherwise, ged(n,n +3) =1. For ged(n,n +4) we need to be cautious. The answer is not 1 or 4. Here we have ged(n,n +4) = 1 or 2 or 4, For na multiple of 4, ged(n,n + 4) = 4. When n = 4t +2, 4 Z*, we find that ged(n,n + 4) = 2. For n odd, ged(nyn +4) = 1. (c) In general, for n,k € Zt, ged(n,n +k) is a divisor of k. Consequently, if k is a prime, then ged(n,n +) = k, for na multiple of k, and ged(n,n + &) = 1, for n not a multiple of k. Let ged(a,b) = h, ged(b,d) = g. ged(a,b) = h => hla,hlb => hl(a-1+ be) => hid. hib, hid ==> hig. gcd(b,d) = g => glb,g|d => gl(d-1+ (—c)) => gla. glb,glah = ged(a,d) => gfh. hig, glh, with g,he Z* => g=h. ged(a, 5) = 1 => az + by = 1 for some zy € Z. Then c = acz + boy. ale => c = ad, ble = ¢ = be, so ¢ = ablex + dy) and able, The result is false if ged(a,b) #1. For example, let a= 12,b = 18,¢ = 36. Then ale, ble but (ab) Jc. (a) Hee Zt, then c= ged(a, 5) if (and only if) (1) cfaand ec]; and (2) Vde Z [((d | a) A (41 8)] > |} (b) fc € Zt, then ¢ # ged(a,b) if (and only if) (1) ef acre J ior (2) BE Z((dlaAC@[HAG YL o] We = ged(a —b,a +6) then el[(a — b)x + (a + d)y} for all 2,y € Z. In particular, for z= y = 1,¢)2a, and for x = ~1,y = 1, ¢/26. From Exercise 4, ged(2a,26) = 2.ged(a,b) = 2, 80 ¢|2 and c= 1 or 2. ged(a,b) = 1 => ax + by = 1, for some a,b Z. Then acz + bey =. alacz, albcy (since alee) => ale. Proof: Let dy = ged(a, b) and dy = ged(a ~b,b). d, = ged(a—b, b) = {ds|(a—b) Ad;|6] => [da|[(a—b) +-8]] by part (f) of Theorem 4.3 > dyla, and [dyja A do|d] => da|ds. dy = ged(a,b) = [dyla Ady |B} => di|[a+(—1)0}, by part (£) of Theorem 4.3. Hence d,|(a—b). 116 13. 14, 15. 16. 47. Since d,|(a — b) and dj, it follows that dy dz. Consequently, we find that [dy|dz A dald; A ged(ds, da) > 0} = ged(a,b) = dy = dy = ged(a — 6,6). Proof: We find that for each n € Z*, (5n+3)(7)-+(7n-+4)(~5) = (35n+21)~(35n+20) = 1. Consequently, it follows that the ged(5n+3, 7 +4) = 1, or 5n+3 and 7n-+4 are relatively prime. 38x + 29y = 2490 ged(33,29) = 1, and 33 = (1)(29) + 4,29 = (7)(4) +1, so 1 = 29-7(4) = 29 - 7(33 - 29] = 8(29) —- 7(33). 1 = 33(—7) + 20(8) =» 2490 = 33(—17430) + 29(19920) = 33(—17480 + 29K) + 29(19920 ~ 334), for all k € Z. z= 17430 + 29k, y = 19920 — 334 2 20 => 29k > 17430 => k > 602 y 2 0 =+ 19920 > 33k => 603 > k k= 602: 2 = 28,y = 54;k = 603: 2 = 57,y = 21. ‘We need to find z,y € Zt where y > 2 and 202 + 50y = 1020, or 2z + 5y = 102. As gcd(2,5) = 1 we start with 2(—2) + 5(1) = 1 and find that 2(—2) + 5(1) = 1 > 102 = 2(—-204) + 5(102) = 2[-204 + 5k] + 5[102— 24]. Since z = —204 + 5k > 0, it follows that k > 204/5 = 40.8 and y = 102—2k > 0 implies that 51 > &. Consequently k= 41,424 50. Since y > x we find the following solutions: k 204 + 5k y=102—2b 41 1 20 42 6 18 43 ui 16 Proof: Suppose that there exist c,d € Z+ with ed = a and ged(c, d) = b. Since ged(c, d) = b, we have c= be, d= bd. Consequently, a = ed = (be:)(bdr) = #(crd:), s0 Bla. Conversely, #ja => Wx = a, for some z € Zt. Let c= bz and d= b. Then ed =a and ged(c,d) = ged(bz, b) ‘ged(84, 990) = 6, s0 842-+990y = c has a solution 29, yo in Z if 6c, For 10 < ¢ < 20,6|e—> ¢= 12 or 18, There is no solution for ¢ = 11,13, 14, 15,16, 17,19. When ¢ = 12, 842 + 990y = 12 (or, 14x + 165y = 2). 4(24) + 11 Ul) +3 ‘Therefore 1 = 3 ~ 2 = 3 ~ [11 - 3(3)] = 4(3) ~ 11 = 4[14 - 11] — 11 = 4(24) - 5(11) = 4(14) — 5165 — 11(14)] = 59(14) — 5(165) ‘1 = 14(59) + 165(-5) 2 = 14(118) + 165(—10) = 14(118 — 165k) + 165(—10 + 148). uy 18. 19. 20. 21. 22, ‘The solutions for 84z + 990y = 12 are x = 118 — 165k,y = —10 + 14k, k EZ. ‘When c = 18, the solutions are 2 = 177 — 165k,y = —15 + 14k, k € Z. Let a,b,c € Z*. If ax + by = ¢ has a solution 70, yo € Z, then azo + byo = ¢, and since gcd(a, 6) divides a and b, ged(a, )|c. Conversely, suppose ged(a,b)jc. Then c= ged(a, b)d, for some d € Z. Since ged(a,b) = as + bt, for some s,t € Z, we have a(ad) + Kid) = gcd(a, b)d = ¢ or ary + byo = ¢, and ar + by = ¢ has a solution in Z. Let ged(a,b) = 9, lem(a,b) = h. ged(a,b) = g => as + bt = g, for some 3,4 € Z. Jem(a, 6) = A => h = ma = nb, for some mn € Zt. hg = has + hbt = nbas + mabe = ab(ns-+mt) ==> ablhg. ged(a,b) = ¢ => gla, qld, s0 (a/9)b = (0/g)a is a common multiple of a and b. Consequently hi(a/9)b, and hz = (a/g)b, for some x € Z, or ghz = ab. Hence ghjab. From Theorem 4.10 we know that ab= lem(a,6) - ged(a, 8). Consequently, b= flem(a, b) - ged(a, 6)]/a = (242, 500)(105)/630 = 40, 425. tem(a,b) = (ab)/ ged(a, 6) (a) lem(231,1820) = (231) (1820)/7 = 60,060 (b) tem(1369,2597) = (1369)(2597) (c) lem(2689,4001) = (2689)(4001) ged(n,n +1) = 1, lem(n,n +1) = n(n +1) Proof: The result follows from Theorem 14.10 and Exercise 4 for this section. We find that lem (na,nb) = ple), = alata. = nf=fh] = nlem(a, 6). Section 4.5 (a) 2-3-5? 11 (b) 2469-57. 77-11? (c) 3-5-7? 11-13 ged(148500, 7114800) = 2? - 3-5? 11 = 3300 Jem(148500, 7114800) = 24. 3°. 5.72. 11 = 320166000 ged(148500, 7882875) = 3? 5°. 11 = 12975 Jem(148500, 7882875) = 2?- 3°. 5-7? 11-13 = 94594500 ged(7114800, 7882875) = 9-5?- 72-11 = 40425 Iem(7114800, 7882875) +3? 59. 77-117. 13 = 1387336000 Pepe PS 118 10. i. 12. 13. ‘The result is true for n = 1, From Lemma 4.2 the result follows for n = 2. For k > 2, assume that pla,a;--+a, => pla;, for some 1 < i < k. Now consider playa ---a,ax41. Then pi(aiai + --ax)anys => playag-+ +a, or plarys (by the case where n = 2) => pla; for some 1 pla; for some 1 @/? => pl? = a? > p| a? + p|a (by Lemma 4.2). Since p | a we know that a = pk 3k € Zt, and pi? = a? = (pk)? = p'k?, or # = pk?. Hence p | b? and so p|b. But if p|a and p| 6 then ged(a,8) = p > 1 — contradicting our earlier claim that ged(a, 8) = 1. Here 25n + 10n +40n = 100k, so 75n = 100k, or 3n = 4k. From Lemma 4.2 it follows that 3|k. Sok =3-r. Then 3n = 4(3-r) => n =4r. Son is any positive multiple of 4. (a) 3x4x4x2=96 (b) 270 (©) 144 a) There are (15)(10)(9)(11)(4)(6)(11) = 3,920,400 positive divisors of n = 2443°5*7!°11913°37", d) @) (4-341)9—4 418-7 + 110-04 13-24 15 —041)(10 ~ 24:1) = (42)(6)(2}(11)(2)(6)(9) = 171, 072 (ii) Since 1, 166, 400,000 = 2°3°5°, the number of divisors here is (14-9+1)(9-6+1)(8~ 5 +1)(10 — 0 + 1)(3 ~ 0 + 1)(5 — 0+ 110 ~ 0 + 1) = (6)(4)(4)(11)(4)(6)(11) = 278, 734. (iii) (8)(5)(5)(6)(2)(3)(6) = 43,200 Civ) (7)(3)(4)(6)(A)(3)(6) = 9072 (wv) (5)(4)(3)(4)(2)(2)(4) = 3840 (wi) (2)(1)(2)(2)(2)()(8) = 12 (wil) (3)(2)(2)(2)(2))@) = 48 From Theorem 4.10 we know that mn = lem(m,n)-ged(m, n), 80 ged(m,n) = mn/lem(m,n) = 23'S" 11! = 660. +5?- 11 = 285 +35. 5% 73. 117-13 = 4, 162, 158, 000 248390544 = 2°. 3°. 11°, so there are (8+ 1)(6 + 1)(3 + 1) = 252 possibilities for n. Since 2a is a perfect square we have a = 22%, for some x € Z*. Likewise, 3a a perfect cube + a = 3%? = (3y)*y for some y € Z*. To minimize the value of a choose y = 2 and 2 = 3y =6, Then a= 72=2-3?, a) Proof: (i) Since 10ja we have 5ja* and 2ja®. Then by Lemma 4.2 it follows that 5ja and 2a. So a = 5b for some b € Zt. Further, since 2|58 we have 2|5 or 2| (by Lemma 4.2). Consequently, a = 5b = 5(2c) = 10¢, and 10 divides a, (ji) This result ia false — let a = 2. b) We can generalize section (i) of part (a) by replacing 10 by an integer n of the form 19 14. 15. 16. at. 18. 19. PiPa-*- Pu, product of ¢ distinct primes. (So n is a square-free integer — that is, no square greater than 1 divides n.) Prooft We find that abcabe = (abc)(1001) = (abe)(7)(11)(13). Since 7! = 2*-3?-5-7, the smallest perfect aquare that ie divisible by 7! is 2¢.9?.5?.7? = (85) x (7!) = 176,400. Ifn € Zt and nis a perfect square, then n = pf'pf---pit, where p; is prime and ¢, is a positive even integer for all 1 0} And (n Mod p = 0) Then 121 Begin count 5 While n Mod p = 0 Do Begin count := count + 1; Write (p:0, ‘)', eountz0, *)") End; +2 End. 21. The length of AB = 2° = 256; the length of AC = 2° = 512. The perimeter of the triangle is 1061. 10 22. (a) [][(-1'=-1 et ) ‘to = (-1) enemy (ayo { 1, fornodd “1, forneven © ae = ED ES) Ga) G2) Ga) Sa Gad CE) G)- CFG) n/n DI (n+! = nyln— n+ x = ae . as 23. (n) From the Fundamental Theorem of Arithmetic 88,200 = 2°. 9.57.7? Consider the set F = {2,3?,52,7"}. Each subset of F determines a factorization ab where ged(a, b) = 1. There are 2 subsets ~ hence, 2 factorizations, Since order is not relevant, this number (of fnctorivations) reduces to (1/2)2 = 2°. And since 1 2. This gives us Te ~ B)= (+0 /(2k). When we consider the ease for n = k-+1, using the inductive step, we fe that, Ha -dy= (Ho- p) o-g@p=tetavenn-_As [ wer | B42 Pea | = Baer = P+ 2/2 +1) = (+1) +2)/28 +9). ‘The result now follows for all positive integers n > 2 by the Principle of Mathematical Induction. (2) When n is a prime then it has exactly two positive divisors — namely, 1 and n. (b) If n= p*, where p is @ prime, then n has exactly three positive divisors — namely, 1, p, and p?. (c) Let p,q denote two distinct primes. If n = p® or n = pg, then n has exactly four positive divisors — 1,p,p?, and p* for n = p3, and 1,p,q and pq for n = pq. (a) If n = p', where p is a prime, then n has exactly five positive divisors — namely, 1,p,p?,p®, and pt. (a) The positive divisors of 28 are 1, 2, 4, 7, 14, and 28, and 1424447414428 = 56 = 2(28), 90 28 is a perfect integer. The positive divisors of 496 are 1, 2, 4, 8, 16, 31, 62, 124, 248, and 496, and 142444 8+ 16 +31 +62 + 124 + 248 + 496 = 992 = 2(496), 90 496 is a perfect integer. (b) It follows from the Fundamental Theorem of Arithmetic that the divisors of 2n-1(2" —1), for 2°—1 prime, are 1,2,2?,25,...,2"-!, and (2"—1), 2(2"—1), 2(2"—1), 2°(2" — 2)y.eoy and 2"-(2" — 1). ‘These divisors sum to [1+2+274+254...4+2"-']+(2"—1)[L4+24+27+2°4...42"1] = (2 = 1) + (2% ~ 1)(2" ~ 1) = (2 ~ 1) + (2" — 1) = 2°02" - 1) = 2]2"-1(2" — 1)], 0 2n-1(2" — 1) is a perfect integer Supplementary Exercises a+(atd)+(a42d)+...4(a+(n—1)d) = nat [(n — 1)nd/2. Porn =1a=a+0, and the result is true in this case, Assuming that Sf,[a + (i—1)d] = ka + [(k — 1)kd]/2, we have Dia + (¢ — 1d] = (ka + [(k ~ 1)kd]/2) + (a + bed) = (k + 1a + [R(e + 1)adI/2, so the result follows for all n € Z* by the Principle of Mathematical Induction. 123 Let ¢ be the number of times the while loop is executed. Then we have sum = 10-4+17+24+...+(10-47(t—1)) = 10+ (1047) + (10+ 14) +...+(10+7(¢-1)). From the previous exercise we know that for each t € Z* at(a+d)+(a+2d)+...+(a+(t—1)d) = ta + {(t — 1)(¢)d]/2, so here we have sum = 10¢ + (7/2)¢(¢ — 1). For t = 52, we have sum = 9802, and for t = 53, we find sum = 10176. Therefore, n, the last summand, is 10 + 7(52 — 1) = 367. Conjecture: }7(—1)4i? = (-1)"" Yi, for alln € Zt. Proof: (By the Principle of Mathematical Induction) Tin = 1 the conjecture provides uC ati? = (-1)'4(1)? = 1 = (-1)'1(a) = (-1)*" Es which is a true statement. This establishes the basis step of the proof. In order to confirm the inductive step, we shall assume the truth of the result, Sore acute for some (particular) k > 1. When n =k +1 we find that kat z Keepin? = ey) 4 (ene gap a ft = DME 4+ Dh e+ = DMs N+ (Ma +? = (piety? - e+ 0/2) —1)**3(1/2)[2(k + 1)? — k(k +1) —1)9(4 /2)[2k + 4k +2 — —1)*+9(1/2)[? + Bk + 2} = (—1)7(1/2)(k + 1)(k + 2) ha = (-1)7}0i, 50 the truth of the result at n = k implies the truth at n = k+1— and & wwe have the inductive step. It then follows by the Principle of Mathematical Induction that Fayre sayy & i for all n € Zt. (a) S(n) : 5\(n* —n). For n = 1,n’—n = 0 and 5)0, so S(1) is trae. Assume S(k) : 5i(ko ~ k), For n = k + 1,(b +1) ~(k +1) = (k® — &) + Skt + 10K + 10k? + 5k. Based on S(k), 5|((k + 1)? — (& +1) so S(k) => S(k +1) and the result is true for all n € Z+ by the Principle of Mathematical Induction. (b) S(n) : 6)(n° +.5n). When n = 1,n® +5n = 6, so S(1) is true. Assuming S(k), consider S(k +1). (b+ 18 + 5(k +1) = (4 + 5k) + 6 + 3(k)(k + 1). Since one of k,k +1 must be 124 8. even, 6[[3(4\( + 1)]. Then assuming $(k) we have 6|{(# + 1)° +5(& + 1)] and the general result is true for all n € Z+ by the Principle of Mathematical Induction. (a) n n?+n44l n ntn+4l n mtn+4 1 43 4 61 im 97 2 47 5 n 8 113 3 53 6 83 9 131 (b) For n = 39,n?+n+41 = 1601, a prime. But for n = 40,n? +n +41 = (41), s0 S(39) A> S(40). (b) 44 = 119/120 = (5!—1)/5!. 55 = 719/720 = (6! — 1/6! ‘46 = 5039/5040 = (7! — 1)/7! (0) n= [n+ DI-M/(n +0)! (@) Based on the calculation in part (a) the conjecture is true for n = 1, Assuming that se = ((k +1)! —1]/(k + 2), for k € Zt, consider +441. Sia = e+ (b+ Dk +2) = (E+ DE = 1/(k+ DEF (E+ (b+ 2)! = (+2! = (RE 2) +(k+ 1k + 2)! = [(E +2)! ~ 1]/(k + 2)}, 0 the result follows for all n € Z* by the Principle of Mathematical Induction. (a) Forn = 0,21 +1 =2+1-3, so the result is true in this first case. Assuming that 3 divides 21 +1 for n = & € N, consider the case of n = k +1. Since 24H)41 41 = 22eS 41 = A(27+) 4 1 = 4(241 + 1) — 3, and 3 divides both 2+? + 1 and 3, it follows that 3 divides 2°4+)+? + 1. Consequently, the result is true for n = k + 1 whenever it is true for n = &. So by the Principle of Mathematical Induction the result follows for all nen. (b) When n = 0,0° + (0 + 1)° + (0 + 2)° = 9, so the statement is true in this case. We assume the truth of the result when n = k > 0 and examine the result for n = k +1. We find that (& + 1)° + (k + 2)® + (k +3)? = (4 +1)* + (& +2)? + [K° + 9k? + 27k + 27] = [ +(k+1)°+(k+2)"] + (9(k? +34+3)], where the first summand is divisible by 9 because of the induction hypothesis. Consequently, since the result is true for n = 0, and since the truth at n= k (> 0) implies the truth for n = k +1, it follows from the Principle of Mathematical Induction that the statement is true for all integers n > 0. Proof: There are four cases to consider. (1) n=10m-+1, Here n! satisfies the condition sought. (2) n= 10m-+3. Here n? = 100m? + 60n +9 and nt = 10000m* + 12000m' + 5400m? + 1080m + 81 = 10(1000m* + 1200m° + 540m? + 108m + 8) +1, so the units digit of n* in 1. (3) n= 10m+7. As in case (2) we need n*, For n? = 100m’ + 140m + 49, and nit = 10000rn* + 28000m° + 29400m? + 13720m + 2401 = 10(100m* + 2800m° + 2940m? + 1372m +240) + 1, where the units digit is 1. (4) n= 10m4+9. Fortunately we only need n? here, since n? = 100m? + 180m +81 = 10(10m? + 18m + 8) +1. [Note: For any n € Z*, where n is odd and not divisible by 5, we always find the units digit in n4 to be 1] 125 a. 10. i. 12. 13. 14. Converting to base 10 we find that 812+ 9y +z = 362 +6y+2, and so 80x +3y ~35z = 0. Since 5|(80z ~ 352) and ged (3,5) = 1, it follows that 5ly. Consequently, y = 0 or y = 5. For y = 0 the equation 802 ~ 352 = 0 leads us to 162—7z = 0 and 16z = Tz = 16|z. Since 0 <2.<5 we find here that 7 = 0 and the solution is 0. Hy = 5, then 802+15~ 352 = 0-9 162+3—7z =0. With0< 2,2 <5, 162 =77-3 32 is odd and z = 1,3, or 5. Since 16 does not divide 4(= 7(1) ~ 3) or 18(= 7(3) — 8), and since 16 does divide 32(= 7(5) —3) we find that z= 5 and z = 2. Hence x = 2, y = 5, and 2=5. [And we see that (2yz)y = 8le-49y +z = 81(2)+9(5)+5 = 212 = 36(5)+6(5)+2 = 362 + 6y + 2 =(zyz)s] From the Fundamental Theorem of Arithmetic we have 3000 = 2°- 3" 5, so 3000 has (3+ 1)(1 + 1)(3 + 1) = 32 divisors. ‘Since ged(n, n + 3000) is a divisor of 3000, there are 32 possibilities - depending on the value of n. For n = 2 we find that 2 = 4 <6 = () < 16 = 4?, so the statement is true in this first case. Assuming the result true for n = k > 2~ie., 2 < (7f) < 4, we now consider what happens for n= k +1. Here we find that aUee) m= (3k?) = [eenaet| (24) = 22k + 1)/(k + 1)) (78) > 22k +1)/(k + 1)}2* > 241, since (2k+1)/(k+1) = ((k+1)+4]/(k+1) > 1. In addition, ((4-+1)+4)]/(k+1) <2, so (2842) = 2f(2k + 1)/(k + 1)1(38) < (2(2)(#) < 441. Consequently the result is true for all n > 2 by the Principle of Mathematical Induction. For n = 1,7° + 8° = 855 = (57)(15). Assuming that 57|(7**? + 8?*#1), since 7+0424- gubeyen 2 7HS 4 gehts = 7(7H) + 64/99) = 64(7H2) + 64(8*H) — 57(742), we have 57|(7**9 + 8+3), so the result follows by the Principle of Mathematical Induction. Firet we observe that the statement is true for all n € Z+ where 64 64 by the Alternative Form of the Principle of Mathematical Induction. To find all such a, b we solve the Diophantine equation 12a +7b = 1. Since ged(12,7) = 1, we start with the Euclidean algorithm: 12 = 1-745, 0<5<7 T= 1-542, 0<2<5 B= 2241, 0<1<2 2= 21 126 15. 16. 17. 18. 19. Then 1 = 5 —2-2 = 5-27 — 5] = (—2)7 +35) = (-2)7 + 8(12 —7) = 12-3 + 7(-5) 12[3 + 7k] + 7[—5 — 12k], k € Z. Hence a=3+7k, b=—-5-12k, kez. (3) r= rotry 10-92-1074. +10" = ro-tri(9)tri+ro(99)trat.. tre (99...9) tre = n Oe [9r1+99ra+...+(99...9)ra]t(rotritret...tra). Hence 9r iff Of(ro-trtrat...ttn)- (c) 3]t for = 1 or 4 or 7; 9|t for x = 7. 50x + 20y = 620 => Bx + 2y = 62 ged(5,2) = 1 and 1 = 5(1) + 2(—2) so 62 = 5(62) + 2(—124) = 5(62 — 2k) + 2(—124 + 5k), kEZ. 2 =62—2k>0 = 31> ky =-1M + 5k DO kD US Solutions: (1) k= 25: 26: 2 = 10,y = 6;(3)k = 27:2 = By = 1s (A)b = 28: 5(G)k = 80: 2 = 2,y = 26;(7)k = (a) Let n= 2-39 .5% 7%. 11% where e: +¢2 + es-+e4 + €s = 9, with €; > 0 for all 1$i <5, The number of solutions to this equation is (9-1) = () © @) (a) es2eaigacn4asay (b) 24240) pateztera) (c) 20U4249)g20)04249) 741010) (a) 24243) gueait4aysaeaesaes) {e) ptg’, where e =(n + 1)(1+2+----+m) =(n+1)(m)(m + 1)/2 and Fa (MF VYLF2+--- +n) = (m+ V(nlln + /2 (f) gir’, when ¢ = (n+ 1k +11 +24+--- +m) = (n + 1)(k + 1)(m)(m +1)/2, f= (m+ Ik +I 424---4n) = (mF E+ I(n)(n + 1)/2, and m+ 1)(n-+ 1) k)(k + 1)/2. {a) 14,9. (b) 1,4,9,16,...,k where & is the largest square less than or equal to n. Proof: For 1 < i < 5, it follows from the division algorithm that a; = 5q; + ri, where 0 3,14243+4...4n=n(n+1)/2. If {1,2,3,....n} = AUB with 34 = 4p, then 284 = n(n +1)/2, or 4ag.= n(n+1). Since 4[n(n-+1) and ged(n,n+1) =1 then either 4|n or 4|(n + 1). (b) Here we are verifying the converse of our result in part (a). (i) If 4)n we write n = 4k. Here we have {1,2,3,...,k,k+1,...,3k,3k+1,...,4k} = AUB where A = {1,2,3,...,k, 3k+1,3k+2,...,4k—1,4k} and B= {E+1,k+2,...,2k,2k+ 1,3k —1,3k}, with s4 = (14+24+34...+h)+[(3k+1)+(8k+2)+...4+ (8k +h) = [mC +1)/2] + (Sk) + [W(& + 1)/2] = k(b +1) 43k? = 4k? +b, and sp = [(k +1) +(k4+2)+ ot (RR +[(Qk4+ 1) +(2h+2)+4...4(2k+K)] = b(k) + [e(44+1)/2] + b(2k) + [eC +1)/2] = 3k + k(k-+ 1) = 4k? +k, (ii) Now we consider the case where n +1 = 4k. Then n = 4k ~1 and we have {1,2,3,...,8-1,k,...,3h—1,3k,...,4k —2,4k ~1} = AUB, with A= {1,2,3,...,k— 1,3k, 3k-+1,...,4k-1} and B= {kk+1,...,2b—-1,2h, 2k-+1,...,3k—1}. Here we find $4 = [L42434...4(b-1)]+[Sk+ (BE +1) +...4+(3k-+(k—1))] = [(k-1)(4)/2] + ABH) + [(k-1)(8)/2] = 38? + Pk = 48K, and ap = [k-+(k+1) +... 4(k-+(k~1))] + [28+ (2k-+ Dt. +(2k-+(k=1))] = + 1(b—1)(6)/2)+ (2k) + [(b-1) (8) /2 = BP (RD) = 4k Be Let n be one such integer. Then Sn —4 = 6s and 7n +1 = 4t, for some s,1 € Z. Since 2/4 and 2[6, it follows that 2|5n because Sn —4 = 6s. From Lemma 4.2 we have 2jn. Consequently, as 7n +1 = 4t, we find that 2[1. This contradiction tells us that no such integer n exists, (a) The result is true for a = 1, so consider a > 1. From the Fundamental Theorem of Arithmetic we can write a = pf'p?---pi', where pi,pr).-.,Py, are t distinct primes and ¢; > 0, for oll 1 ¢; for all 1 0 for all $i 1, If n is not prime, then n = nynz where 1 < ny 1. Then ak + OF = (ary? + (BT)? = (a + Ye e-9(—y9, so a* + 5* is composite. (b) Here n is not a power of 2. If, in addition, n ie not prime, thea n = rep where pis an odd prime. Then 2°+1 = 2" 41" = 2774177 = (ery pee" (2° sDE2e-9, a ft s0 2” +1 is composite — not prime. Proof Here the open statement S(n) represents: Ha» <14n, and for the basis step we consider what happens at n = 0. We find that Hy» = Hy = Hy =1<1+0=14n,80 S(n) is true for this first case (where n = 0). Assuming the truth of S(k) for some & in N (not just Z+), we obtain the induction hypothesis Sk): Hy S1+k Continuing with the inductive step we now examine $(n) for n = k-+ 1. We find that Hos = [Ltheh+-- +3) +e t ay te + hl = He + leeey t+ oy t+ ob Since alg < gr for all 1 1, we now examine what happens at n = k +1. Here we find that 129 28. 29, Figy = Ft Fier S (5/3) + (5/3)? = (5/3)-1{(5/3) + 1] = (5/3)-4(8/3) = (6/3)*"1(24/9) < (5/3)** (25/9) = (5/3)*-1(5/3)? = (6/3)***. It then follows from the Alternetive Form of the Principle of Mathematical Induction that Fy < (6/3)" for alln EN. Proof; When n = 0 we find that so the claim is established in this first case. For some k € N, where k > 0, now we assume true that & Dot Ly tla te + Le = OL) = Lage 1. S Then for n = k-+1(> 1) we have wm (6) obi DoLit leas = Liga) tLe = (Lage tla) -1 = Digs = Laan, a and so we see how the truth at n =k implies that at & + 1. Consequently, the summation formula is valid for all n € N by the Principle of Mathematical Induction. [Note that for the equations at (*), the first equality follows from the generalized associative Jaw of addition — and the fourth equality rests upon the given recursive definition of the Lucas numbers since k +3 > 3(2 2). a) There are 9-10-10 = 900 such palindromes and their sum is £2. O89 D2.q abeba = LPL, Doo L&Lo(10001a + 1010b + 100c) = F8_, LF_p[16(10001a-+4 10108) + 100(9 - 10/2) DSL, NfLo(100010a + 101006 + 4500) = 3, [10(100010a) + 10100(9 - 10/2) + 10(4500)] 1000100 53... 2+9(454500)+9(45000) = 1000100(9-10/2)+4090500+-405000 = 49, 500, 000. for c:= 0 to 9 do sum + 10001 #4 1010 * 5+ 100*c 130 30. 31. 32, 33. Proof: Let ¢ = ged(a,5), d = ged( 34, 6). Since a,b are odd, it follows that a — bis even and a — b = 2(3¢), with #4 € Z+. Also, ¢ is odd aince a,8 are odd. Now c = ged(a,b) => ¢| a and ¢| $= | (a—B) => ¢| (84) because god(2, c) = 1. Consequently, ¢ | b and e | (34) = ¢|d. As d = ged(2z2,.), it follows that d | 2(434) +6, that is, d|a. Since d| a and d| 6, we have d|c. Since c| d and d|c and c,d > 0, it follows that c= d. Proof: Suppose that 7[n. We see that 7[n => 7[(n-21u) = 7][(n—u)—20u] = 7I{10(9a#)— 20u} => 7|[0(%% — 2u)] > 7)(AGt - 2u), by Lemma 4.2 since ged(7,10) = 1. [Note: aa € Zt since "the units digit of mn —u is 0] Conversely, if 7[(85# - 2u), thea since ak — 2u = 25214 we find that 7|("G2*) + 7-10-¢ =n ~21u, for some 2 € Z+. Since 7|7 and 7/21, it then follows that 7jn — by part (e) of Theorem 4.3. a) If 19m +90 + 8n = 1998, then m = (1/19)(1908 — 8n). Since 1908 = 19(100) + 8, the remainder for 8n/19 must be 8. This occurs for n = 1, and then m = (1/19}(1908 ~ 8) = (1/19)(1900) = 100. b) Ina similar way we have n = (1/8)(1908 — 19m). Here 1908 = 8(238) +4, so the remainder for 19m/8 must be 4. This occurs for m = 4 (and not for m = 1,2, or 3), and then n = (1/8)(1908 — 76) = If Catrina’s selection includes any of 0,2,4,6,8, then at least two of the resulting three-digit integers will have an even unit’s digit, and be even ~ hence, not prime. Should her selection include 5, then two of the resulting three-digit integers will have 5 as their unit's digit; these three-digit integers are then divisible by 5 and so, they are not prime. Consequently, to complete the proof we need to consider the four selections of size 3 that Catrina can make from {1,3,7,9}. The following provides the selections — each with a three-digit integer that is not prime. (1) {1,3,7) : 713 = 23-31 (2) {1,3,9} : 913 = 11-83 (3) {1,7,9} : 917 = 7-131 (4) {3,7,9} = 793 = 13-61 Let T = {a,b,c,¢,¢, f,g,h} represent the eight element subset of {2, 3,4, 7, 10, 11,12, 13, 15} that we use. aje]iye doje |9 itfle le ‘These numbers are placed in the table as shown in the figure. Since each row bas the same average, it follows that sthiltte — dthiek? — Listith Likewise, from the columns of the table we loarn that ast ists — Aicts — cthth” Consequently, both 3 and 4 divide s=letbt+etdtetftg +h +29), and since ged(3,4) = 1 it follows that 12 divides 4. So we may write s = 12k. The totel of the nine given integers is 77. If we let i denote 131 35. the integer not in T, then s = (77 ~ i) +29 so 77-1 +29 = 12k, or 106 As we examine the nine given integers we see that 106-2=104=12(8)+8 106-7 = 99 = 12(8) +3 106 ~ 12 = 94 = 12(7) +10 106-3 = 103=12(8)+7 106-10 = 96 = 12(8) 106 — 13 = 93 = 12(7) +9 106 —~4=102=12(8)+6 106-11 = 95 = 12(7) +11 106-15 = 91 = 1(7) +7 ‘Therefore we do not place 10 in the table. So T = {2,3,4,7,11,12, 13,15} and the 12 entries in the table total 67+ 20 = 96. It then follows that a+)4+14+e=d+5te+9= l+ftgth=3landatd+1=b+5+fel4tet+g=ect9th=%. From column 3 we have 14+ +g = 24, 90 e+ = 10. The entries in T imply that {e.g} = (3,7) 3. d = 15 (from the equation d+5-+e +9 = 32). With d = 15, from a+ d+ 1 = 24 we have a = 8, but 8¢ T. Consequently, e = 7 and g = 3, and then d= 32—21 = 11. Column 1 indicates that a+ d+1=24 so. a= 12. From column 2 it follows that 6+ f = 19, so {b,f} = {4,15}. As b= 15 => a+5+14+c > 32, it follows that 6 = 4 and f = 15. Row 1 then indicates that ¢ = 32—a~b—14 = 2 and from row 3 (or column 4) we deduce that h = 13. The completed table is shown in the figure. 12k, 12] 4 [i472 is G68] 0a 29 1 [15 {3 [1s Let x denote the integer Barbara erased. The sum of the integers 1,2,3, ...,2~1z+ 1,2 +2, ...50 is [n(n +1)/2] — 2, 50 [n(n + 1)/2] ~ 2]/(n — 1) = 852. Consequently, [n(n + 1)/2] — a = (85E)(n - 1) = (602/17)(n — 1). Since [n(n + 1)/2]— = € Z+, it follows that (602/17)(n ~ 1) € Z*. Therefore, from Lemma 4.2, we find that 17|(n — 1) because 17 does not divide 602. For n = 1,18,35,52 we have: n = [n(n + 1)/2} — (602/17)(n — 1) 1 1 18 ~431 35 ~574 52 ~428 ‘When n = 69, we find that x = 7 and (2%, i — 7)/68 = 602/17 = 353). For n = 69+ 17k, b > 1, we have z = (69+ 174K 70+ 17k)/2] ~ (602/17){68 + 174] 7+ (k/2){1159 + 280%] [7+ (1159k/2)] + (280K?) /2 > n. Hence the answer is unique: namely, n = 69 and 2 7. Let 5 = {1,2,3,..., 100} be the sample space for this experiment and let A, B, C denote the following events: A: Leslie’s selection is divisible by 2: {2,4,6,...,98, 100} B: Leslie's selection is divisible by 3: {3,6,9,...,96,99} 132 37. C: Leslie's selection is divisible by 5: {5,10, 15, (a) Pr(AU B) = Pr(A) + Pr(B) — Pr(AN B) = Here ANB = {6,12,18,...,96}, the set of integers between 1 and 100 (inclusive) that are divisible by 6 — that is, divisible by both 2 and 3.) (b) Pr(AU BUC) = Pr(A) + Pr(B) + Pr(C) - Pr(AN B) ~ Pr(AN@) — Pr(BNO) + P(ANBNC)= B+ 34+ R-B-B- $+ R= = 074 95, 100) B+B- i = & = 067. (Note: A common divisor for m,n has the form pip? pi, where 0 < ri < min{e;, fi}, for all 1Si <3. Let m = minfe;, f}, 1 a€C and bE D. Hence, a€A2a€C, 9 ACC, and bE BbED, 90 BCD. Conversely, suppose that A CC and BC D, and that (x,y) € Ax B. Then (2,y)€ Ax B= 2€Aandy € B= 2 € C (since A CC) andy € D (since BC D) = (2,y) ECD. Consequently, A x BC x D. (b) I any of the sets A, B,C, D is empty we still find that (AS C)A(BEC D)] > [Ax BOCx Dj. However, the converse need not hold. For example, let A = 0, B= {1,2}, C = {1,2} and D = {1}. Then Ax B = 4 — if not, there exists an ordered pair (z, y) in Ax B, and this means that the empty set A contains an element 2. And so Ax B= CC x D—but B={1,2}¢ {1} =D. 1 (a) Since |A] = 5 and |B] = 4 we have | x B| = |Al|B] = has 2° subsets, so [P(A x B)| = 2, (b) If |A] = m and |B] = n, for m,n € N, then |Ax B] = mn. Consequently, [P(A xB) = mm = 20. Consequently, A x B 135 10. uu. 12, 13. 14, (b) Ax (BUC) = (ele eA and ye (BUC)} = ((ayl2 EA and (ye Boor ye O)} = {(zie €A and y€B) or (cE A and ye C)} = {(z,y)z € A and vEB}U{(z,y)lz€ A and yeC}=(Ax B)U(AxC). (c) & (4) ‘The proofs here are similar to that given in part (b). 142 + 2(3) + 2(3)(5) = 39; 38 (ey) € Ax (B-C) ee re A ond yeB-C ep re A and (ye B and y@C) <=> (cE A ond yc B) and (r€ A and y¥C) => (z,y)€AXB and (2,y) €Ax C 9 (2,y) € (Ax B)~(AxC).. 2018) = 4096 => 3|B] = 12 => |B = 4. (a) (1) (0,2) € R; and (2) If (a,b) € R, then (a+1,b+5) ER. (b) From part (1) of the definition we have (0,2) € R. By part (2) of the definition we then find that @) (0,2) € R= (41,245) = (1,7 € Ri (i) (1,7) € R > (141,745) = (2,12) € R; (ii) (2,12) € R= 241,124 5) = (3,17) € R; and (iv) (8,17) ERS (B+1,17+5) = (4,22) ER. (8) (1) G,D,(2,1) € Rand (2) If (a,6) € R, then (a+1,6+ 1) and (a +1,8) are in R. (b) Start with (2,1) in R — from part (1) of the definition. Then by part (2) we get @ QYER+ +1141) =(3,2 ER (i) (3,2) € R> (B+ 1,2) = (4,2) € R; and (ii) 4,2)€ Rs (441,2)=(5,2)ER. Start with (1,1) in R — from part (1) of the definition. Then we find from part (2) that @ GYERs (+1141) =@,2ER; (i) (2,.2€R>(2+1241 (ii) G3) ER> 341,341) =(4,4 ER. Section 5.2 (8) Funetion: Range = (7,8,11,16,23,...} (b) Relation, not a function. For example, both (4,2) and (4,~2) are in the relation. (©) Funetion: Range = the set of all real numbers. (@) Relation, not a function. Both (0,1) and (0,1) are in the relation. {e) Since |R| > 5, R cannot be a function. ‘The formula cannot be used for the domain of real numbers since f(\/2), f(-V) are undefined. Since V2,—/2 ¢ Z the formula does define a real valued function on the domain Z. 136 10. we (a) {(,=), (2,2), (3,#), (4,2)}, {2 9), (2, 9), (3), (4,¥)}, {C2}, (2,2), (3, 2), (4 2)} {(1,2), (2,4), (3,2), 4,)}, (2,2), (2,9), 2), (4,2)} (b) 3¢ 0 (a) (e) 24 © % () (h) 3 Bil = 2187 ==> |Al =7 (a) ANB = {(z,y)ly =2e +1 and y = 32} Ww+la=seoe /2. 1/2, 3(-7/2)} = {(—7/2, -21/2)} (2, y)ly = 2¢+1 and y =2~7} RP ~ {(—1/2,-21/2)} = ((ew)ls # ~7/2 08 y # 21/2). @ © ANB= (0,9) GB (ai) -8,-15)} (iv) (ob) G@) ANB={(1,3)} Gi) (ii) AUC=0 (iv) B (a) [23-16] = [0.7)=0 (b) (23) -[1.6)=2-1=1 (c) [3.4] [6.2] =4-6 = 24 (a) [3.4)f6.2] =3-7= 21 () [2x] =6 (© Ir] =8 (a) Tre (b) False: Let a= 1.5. Then [1 (c) True (a) False: Let a= 15. Then » (a) ...(-1,-6/7) U (0, 1/7) U [1,8/7) U [2,15/7)U... () [1,8/7) () % @) R R (9) .-AK7/3, 2] U(—4/3, - 1) U-1/3, 0] 2/3, 1] UG/3, 2]. = Y (m~1/3,m) (b) -U(-2n= 1)/n, ~2] U(—n = 1)/n, U1 /n, O} Un T)/n, YU(2n—1)/n,2)U... = U (m-1/nmj 187 12. 13. 14. Proof: (Case 1: kin) Here n = gk for g € Zt, and (n —1)/k = (gk ~ 1)/k = g~ (1/k) with ¢~1 2 and |[a]/a] > 2 4 1. However, for 0.5 1 and all n = 1,2,3,...,k—1,k. Forn =k+l we have ay41 = 2ay(nsy/2j < 2|(k + 1)/2], where the inequality follows from the assumption ‘of the induction hypothesis. When & is odd, then, {(k + 1)/2| = (k +1)/2 and we have apis < 2{(k + 1)/2] = k+1. When & is even, then [(k + 1)/2| = [(k/2) + (1/2)] = (4/2), and here we find that gy, S Ak/2) = RS RTL In either case it follows from ayasiyjaj < [(# + 1)/2] that axe, < E+ 1. So we have established the inductive step of the proof. Therefore, it follows from the Alternative Form of the Principle of Mathematical Induction that We Zt a, Sn. 138 1B. 16. iw 18. 19. 20. 21, 22. (a) One-to-one. The range is the set of all odd integers. (b) One-to-one. Range = Q (c) Since f(1) = f(0),f is not one-to-one. The range of f = {0, £6,124, £60....} = {n? —njn € Z}. (a) One-to-one. Range = (0, +00) = R+ (c) One-to-one. Range = [1,1] (f) Since f(x/4) = f(3x/4), fis not one-to-one. The range of f = (0,1). (a) {4,9} (b) {4,9} (ec) (0,9) (4) [0,9) (©) [0,49] (f) (9,16) U [25, 36) ‘The extension must include f(1) and f(4). Since |B] =4 there are four choices for each of 1 and 4, so there are 4? = 16 ways to extend the given function g. Let A= {1,2},B = {3,4} and f = {(1,3),(2,3)}. For Ai = {1}, Az = {2}, f(AiMAn) = £(0) =O while f(As)M f(Az) = {3} 9 {3} = {3}. (a) f(ArU Aa) = {y € Bly = f(z), 2 € AyU Ay} = {y © Bly = f(z), 2 € A or 2 € Aa} = {y € Bly = f(x), 2 € Ai} U {y € Bly = f(z), 2 € Ar} = f(Ar)U f(Ad). (©) y € f(Ai) 1 f(A) => v = F(z1) = Fea), a € Ar, 2 © Ar => y = f(z1) with 21 = 22, since f is one-to-one => y € f(A 42). ‘The number of injective (or, one-to-one) functions from A to B is (|BU!)/(\B|-5)!= 6720, and {B|=8. No. Let A= {1,2}, X = {1}, ¥ = {2}, B= {3}. For f = {(1,3), (2,3)} we have flx, fly one-to-one, but f is not one-to-one. (a) A monotone increasing function f : Xy — Xs determines a selection, with repe- titions allowed, of size 7 from {1,2,3,4,5}, and vice versa, For example, the selection 1,1,2,2,8,55 corresponds to the monotone increasing function g : X; + Xs, where g = {(1,1), (2,1), (3,2), (4,2), (5, 3), (6, 5), (7,5)}. (Note the second components.) Consequently, the mumber of monotone increasing functions f : X;~» Xs is (7-4) = (#) = 330. (&) (5) = (¢) = 003. (c) For m,n € Z*, the number of monotone increasing functions f : X,, + X, is (*"""). (a) Since (4) = 4, it follows that f({1,2,3}) © {2,2,3,4} and f({5,6,7,8,9,10}) C '4,5,6,7,8} because f is monotone increasing. The number of these functions is ast) (F464) = (¢)(12) = (20)(210) = 4200. ©) (2)G) = 4080. () Let m,n,k,é € Zt with 1S k B where f(a) = f(b) = 1 and J (c) = 2. Hence {S| = 1. (b) Since f(c) = 3 we have two choices — namely 1,2 — for each of f(a) and f(b). Consequently, |S3| = 2°. (c) With f(c) =i +1 there are i choices — namely 1,2,3,...,i~ 1,1 — for each of f(a) and f(b), 80 [Si] = 7. (a) Any function f in 7; is determined by two elements 2,y in B, where 1 <2 0) we have A(1,é) = k-+2. ‘Then we find that A(1,#+1) = A(O, A(L, 4) = A(1, A) +1 = (k+2)+1=(k+1) +2, 60 the truth at n = k implies the truth at n = +1, Consequently, A(1,n) =n +2 for all n€N by the Principle of Mathematical Induction. (c) Here we find that A(2,0) = A(1,1) = 142 = 3 (by the result in part(b)). So A(2,0) = 3+2-0 and the given (open) statement is true in this first case. Next we assume the result true for some k (> 0) — that is, we assume that A(2, k) = 3-+2k. For k +1 we then find that A(2,k + 1) = A(1,A(2,&)) = A(2,4) + 2 (by part (b)) = (3+ 2k) +2 (by the induetion hypothesis) = 3 + 2(k +1). Consequently, for all n € N, A(2,n) = 3 +2n — by the Principle of Mathematical Induction. (d) Once again we consider what happens for n = 0. Since A(3,0) = A(2,1) = 3 +2(1) (by part (c)) = 5 = 2°*9 — 3, the result holds in this first case. So now we assume the given (open) statement is true for some k (> 0) and this gives us the induction hypothesis: 4(3,k) = 2493. For n = k+1 it then follows that A(3, E-+1) = A(2, AQ, k)) = 3 +2A(3, k) (by part (c)) = 3 +2(24 — 3) (by the induction hypothesis) = 2(+)+9 — 3, so the result holds for n = k + 1 whenever it does for n = k. ‘Therefore, A(3,n) = 2"*°—3, for all n € N — by the Principle of Mathematical Induction. (@) (S)4t+ (4+ + (Jat = 4 +8 - (as — (ar = 58-4 1 (0) (rant + (eet tot (F)nt = (et Dt =m 1. Section 5.3 1,2,3,4},.B = {v,w,zy,z} (a) f= {(1,»),(2,»), (3,0), (4,2)} (2,¥), (2,2), (3,9), (4,2)} 10252}, F = {(1, w),(2,w),(3, 2), (4,4),(5, 2)}- 2,4, 2},F = {(1,w), (2,2), (3.4), (4,2)}- (2) One-to-one and onto. (b) One-to-one but not onto. The range consists of all the odd integers. (c) One-to-one and onto. (4) Since f(-1) F = {0,1,4,9, 16, (e) Since f(0) = f(-1), f is not one-to-one. Also f is not onto. The range of f= {0,2,6,12,20,...}, (One-to-one but not onto. The range of f = (... = f(1), f is not oneto-one, Also f is not onto. The range of 7, ~8, -1,0,1,8,27,...}. (a), (b), (6), (£) One-to-one and onto. (a) Neither one-to-one nor onte, Range (e) Neither one-to-one nor onto. Range 10. (a) 6; 6!/2!; 0 {b) 4°; (4)5(6,4); 0 For n= 5,m = 3, Dhao(—1)*(65,)(5—)? = (—1)°(9) 6+ (1) (+1) G+ (1 (8) 2) + 1)" + (1) (8)? = 125 - 320 + 70-8045 = 0 @ SOAs = Hays. + Qense.2) + Oepscr.s) + Qaysa.9+ (§)G!)S(7,5) = (5)(1)(1) + (10}(2)(63) + (10)(6)(301) + (5)(24)(350) + (1)(120)(14) = 78,125 = 5". (b) The expression m" counts the number of ways to distribute n distinet objects among m distinct containers. For 1 (7)(i!)S(n, 4) also counts the number of ways to distribute n distinct objects among m Hence m* = 3-(s)(i)S(n,i). inct containers. (a) @_ 218(7,2) (i) ets, 2)] ii) 315(7,3) Gv) Q)is!s(7,3)1 (w) 419¢7,4) (wi) GQ) e907,4)} (b) (2) S(n, &)) Let A be the set of compounds and B the set of assistants. Then the number of assignments with no idle assistants is the number of onto functions from set A to set B. ‘There are 515(9,5) such functions. For each r€ R there is at least one a € R auch that a? —2a?+a—r = 0 because the polynomial x°— 227+ 2—r has odd degree and real coefficients. Consequently, f is onto, However, f(0)=0= (2), so fis not one-to-one. (@) (4)S(7,4) (>) (3!)S(6,3) (Here container II contains only the blue ball) + (4!)5(6,4) (Here container II contains more than just the biue ball). {c) S(7,4) + S(7,3) + (7,2) + (7,1). 142 M1. 12 13. 14, 15. 1 255 3025 7770 6951 2646 462 36 1 10 | 1 511 9330 34105 42525 22827 5880 750 45 1 (a) Since 31,100,905 = 5 x 11 x 17 x 29 x 31 x 37, we find that there are (6,3) = 90 unordered factorizations of 31,100,905 into three factors — each greater than 1. (b) If the order of the factors in part (a) is considered relevant then there are (3!)5(6,3) = 540 such factorizations. (©) 58(6, i) = S(6,2) + $(6, 3) + 5(6,4) + $(6, 5) + S(6,6) = 31+90+654+15+1 = 202 a (@ SUYSU6,x) = )S(,2) + (8)5(6,3) + (4S(6,4) + G1)S(6, 5) + (61)5(6,6) = a (2)(31) + (6)(90) + (24)(65) + (120)(15) + (720)(1) = 4682. (a) Since 156,009 = 3 x 7 x 17 x 19 x 23, it follows that there are 5(5,2) = 15 two-factor unordered factorizations of 158,009, where each factor is greater than 1. (b) 56,8) = S(5,2) + S(5,3) + $(5,4) + S(5,5) = 15+254+10+1=51. a () OS(n,4). a Dim S(12, 12) For I =1To 12 SW) =1 Next I Print “M For M ele To 12 4 For N = 2 To M-1 S(M,N) = S(M-1,N-1) + N*S(M-1,N) 100 Print S(M.N}; 4"; 10 Next N 120 Print “ 1” 130 Next M 140 End SSassseys ajn=4 7 nab: Sas,s) st is 143 16, it. 18. In general, the answer is }i!S(n, i). 12 b) (8) So is(42,i). Fa a) (i) 10! (ii) The given outcome — namely, {C2,Cs,Cr}, {C1,Cs,Co, Cio}, {Cs}, (Cs,Cs} — is an example of @ distribution of ten distinct objects among four distinct containers, with no container left empty. [Or it is an example of an onto function f : A > B where A = {C1,C3,...,Cio} and B = {1,2,3,4}.] There are 4!5(10,4) such distributions or functions}. 10 ‘The answer to the question is J” i!5(10, ). 4 cain (BREA, 1 >) @yas.a) ©) For 0 m we have (m,n) =0, because there are more tables than people. 144. 19. (b) For m 2 1, (i) s(m,m) = 1 because the ordering of the m tables is not taken into account; and, (ii) s(m, 1) =(m~1)!, as in Example 1.16, (c) Here there are two people at one table and one at each of the other m — 1 tables. There are (’s) such arrangements. (a) When m people are seated around m—2 tables there are two cases to consider: (1) One table with three occupants and m ~3 tables, each with one occupant — there are (5})(2!) such arrangements; and, (2) Two tables, each with two occupants, and m — 4 tables each with a single occupant — there are (1/2)() (5?) of these arrangements, We then find that (5)(21)+(1/2)(5) ("52) = (1/8){rm)(m—1)(m—2)+(1/2)1(1/2)(en)(m—I)]{(4/2)(m— 2)(m~3)] = (rn)(m —1}(m—2){(1/3) + (1/8)(om —8)} = (1/24)(mn)(m ~ 1}{m ~2)(3m 1). (a) We know that s(m,n) counts the number of ways we can place m people — call them pi, pzy-+-+Pm — around n circular tables, with at least one occupant at cach table. These arrangements fall into two disjoint sets: (1) The arrangements where p; is alone: There are s(m ~1,n ~1) such arrangements; and, (2) The arrangements where p, shares a table with at least one of the other m —1 people: There are s(m — 1,n) ways where PasPoy.++>Pm can be seated around the n tables so that every table is occupied. Each such arrangement determines a total of m ~ 1 locations (at all the n tables) where p: can now be seated — this for a total of (mn — i)s(m —1,n) arrangements. Consequently, (m,n) = (m—1)s(m ~ 1,n) + s(m ~ In = 1), for m > n> 1. (b) For m = 2, we have s(m,2) = 1 = 11(1/1) = (m— Et. So the result is true in this case; this establishes the basis step for a proof by athe induction, Assuming the result for m = k( 2) we have a(f,2) = (k — yd Using the result from part (a) we now find that 6(k-+1,2) = ke(k,2)+0(4,1) = k(k ys 24-0! = . é HO 4. The result now follows for all m 2 2 by the Principle of Mathematical Induction. = Sayayet = Section 5.4 Beere we find, for exemple, that F(a, f(b,6)} (a) For all a,b € R, f(a,b) = [a +5] = [b +a] = f(b,a), because the real numbers are commutative under addition, Hence f is a commutative (closed) binary operation. (b) This binary operation is not associative, For example, F(F(B.2,4.7),6.4) = f([3.244.7], 6.4) = f([7.9],6.4) = f(8,6.4) = [846.4] = [14.4] = 15, 145 nL while, £(8.2, f(4.7,6.4)) = (8.2, [4.746.4]) = f(8.2, [1L1]) = f(8.2,12) = [8.2419] = [15.2 (c) There is no identity element. If a € RZ then for any } € R, fa +8] € Z. Soif z were the identity element we would have a = f(a,2) = [a+2] with a € R—-Z and fate] eZ. (a) f(2,y)=2+y—2y =y+z2—ye = f(y,z), so the binary operation is commutative. Fw, 2)u) = fw, 2) +9 flw2)y = (ws wa) + y-(wt2—wr)y=wtety~ we — wy —2y + way. fl, f(@,y)) = w+ flesy) —w- flay) = wt (e+y—2y)—w(ety—zy) =wtety— we — wy — cy + wry. Since f(f(w, 2), y) = f(w, f(z, y)), the (closed) binary operation is associative. (b), (4) Commutative and associative (c) Neither commutative nor associative. (a) The identity is = = 0. (a) The identity is z= 3. (b), (c) Neither of these (closed) binary operations has an identity. () 2% (b) 5 ( (@ 5° (a) (b) 3 {c) 3-58, because neither a nor b can be an identity. (@) 3-89 (a) Yes (b) Yes (©) No Each clement in A is of the form 2! for some 1 < i <5, and ged(2,2°) = 80 2° = 32 is the identity element for f. (32)(38) = 1216. (b) The identity element for f is pq". = ged(2*, 2), For n € Zt let pi,pay-.-/Bp be distinct primes and for each 1 0 and ged(2,m) = 1. ‘There are 150 possibilities for m: namely, 1,3,5,...,299. In selecting 151 numbers from {1,2,3,...,300} there must be two numbers of the form 2 =2*-m,y=2'-m. I z 3, 32,y € S where z,y are both even or both odd. In either case t+y is even. (&) (= 22+) (©) = 242) 147 (a) For n€Zt let $= {(ay,02,...,an))a; € 24,1 (Wis¥2y-+-sYn) such that 25+ yy is even Wisin. {e) 5 ~ os in part (b). (a) Forany ¢ € {1,2,3,...,100},1 < Vé < 10. Selecting 11 elements from {1,2,3,...,100} there must be two, say 2 and y, where |/z] =| /ij], so that 0 <|Yz— J <1. (b) Let n€Z*. If n+1 clements are selected from {1,2,3,...,n7}, then there exist two, say z and y, where 0 <|¥e— Ji] <1. 4s 10, 12. 13. 4. 15. In triangle ABC, divide ench side into three equal parts and form the nine congruent triangles shown in the figure. Let Ry be the interior of triangle ADE together with the points on segment DE, excluding D,B. Region Ry is the interior of triangle DFG together with the points on segments DG, FG, excluding D,F. Regions Rs,...,R9 ave defined similarly so that the interior of A ABC is the union of these nine regions and Rj 0 Rj = 0, for i # j. Then if 10 points are chosen in the interior of A ABC, at east two of these points are in Rj for some 1 7m — 21 or 148 > 7m, Hence 7 $m <2. 149 16. i. 18. 19. 20, 2. 22, 23. Proof: Consider the k +1 integers: (1) 3; (2) 33; (3) 333; ...; and (k +1) 333 where for all 1 b, Then a~6= (qi ~q2)k, s0 ki(a— 6) and the only digits in a —} are 0’s and 3's, [Note:The integer 3 is not special. The result is also true if we replace 3 by any of the digits 1, 2, 4, 5, 6, 7, 8, 9. However, we cannot obtain the result without using the digit 0,] (a) 24,13 (b) 3,6,9,2,5,8,1,4,7 (c) For n > 2, there exists a sequence of n® distinct real numbers with no decreasing or increasing subsequence of length n+1. For example, consider n,2n,3n,...,(n—1)n,n?, (n— 1), Qn—1),...,(n?=1), (n-2), (2n~2),...,(n?—2),-.-41, (N41), (2N41),-..,(n—Wn +l. (4) The result in Example 5.49 (for n > 2) is best possible ~ in the sense that we cannot reduce the length of the sequence from n?+1 to n? and still obtain the desired subsequence of length n +1. This follows from the result due to Paul Erdés and George Szekeres: A sequence of 50(= 7? +1) distinct real numbers contains a decreasing or increasing subsequence of Jength &=7+1). Proof: If not each pigeonhole contains at most k pigeons — for a total of at most kn pigeons. But we have kn +1 pigeons. So we have a contradiction and the result then follows. (@) 7 (b) 13 (©) 6-1) +1 (a) 1001 (b) 2001 (©) Let k,n € Z+. The smallest value for |S| (where $C Z*) so that there exist n elements 21,22,...,2, €S where all n of these integers have the same remainder upon division by & is k(n — 1) +1. Proof: If not, each pigeonhole contains at most [(m —1)/n] pigeons ~ for a total of n{(m—1)/n} < m—1 pigeons. But this contradicts the fact that we have m pigeons. The result then follows. {Note: This result is true even if m acz + ad+b = acz +be+d => adt+b=be+d (a) (foghx) =3x-1; (go f(z) = 82-1); Pa? + (2ab—a)a + (6? 6 +1). By -1 or a=~3,b=2, tonya) ={ A ae (ho gz) ={ : cod” (Fo(ao hia) = (a 0 hY2)) = { 3 oa enya)={ Fon seu a fh eee ©) Pe) = Mle) = 2-2 P(e) = 2-3; G2) = 965 g(e) = 2a; Ws =H =H, (a) If c€C, there is an element a€ A such that (go f)(a) =e. Then g(f(a)) =e with f(a) € B, so g is onto. 151 10. wa 12. 13. (b) Let 2,yEA. fe) = fly) => o(f(2)) = o( fw) => (90 Ie) = (90 Fy) = = y, since go f is one-to-one. (a) fe) = }(énz - 5) (b) For 2 €R*,(f 0 f(z) = f(E(enz — 5) = eM(UAMEne-B)N48 a fre 845 we glee = 2 for 2 ER, (f-to f)(z) = f-'(e**) = 3[en(e***) — 3] = 122+ 5-5] =z. (a) fo ={(,v)Qy+32= 7} (b) ft = {(e,y)lay + bz =0, b #0, a AO} (ce) fl = {le w)ly = 2°} = ((z, yz = 0} (d) Here f(0) = f(-1) = 0, so f is not one-to-one, and consequently f is not invertible. fig invertible => cach of f,g is both one-to-one and onto ==> go fis one-to-one and onto => of invertible. Since (go f)o(f-tog™) = Io and (fog )o(gof)= la, fv? og7 is an inverse of go f. By uniqueness of inverses f~? 0 g~! = (go f)"'. (a) F1(2)) = {a € Alfa) € {2} {ae Alf(a) € {6}} = {a € Alf(a) = (a € Alf(a) € {6,8}} = {a € Alf(a) = 6 or f(a) = 8} = {2,3,4,5,6}, (3) = f(5) = 6 and f(4) = f(6) = 8. (d)_ f-2({8,8, 10}) = {2,3,4,5,6} = f-"({6,8}) since f-*({10}) = 0. (e) £-*({6,8, 10, 12}) = {2,3,4,5.6,7} 6) F*H39, 12}) = {7} (a) f7{-10) = {x ER] 2 $10 and ¢ +7= ~10} = {-17} £7(0) = {~7,5/2} SA) = {-3,1/2,5} £76) = {-1,7} FD) = {0,8} £-(8) = {9} 152 14. 15. 18. 17. (b) @) f-(-5,-1) = {2 E R| 2 2. But we also find that (fo 9)(2) = f(max{1,0}) = F(1) = 2, s0 (f og)(1) # 1, and, consequently, fog # 1z+. 153 18. 19. 20. 2 22. (a) (0,0) = 0 = f(@, {1}) and (0,9) # (0, {1}), so f is not one-to-one. 9({1},{2}) = {1,2} = 9({1, 2}, {2}) and ({1}, {2}) # ({1,2}, {2}), 80 9 is not one-to- one. A({1}, {2}) = {1,2} = h({2}, {1}) and ({1}, {2}) # ({2}, {1}), 80 A is not one-to-one. (b) For each subset A of Zt, f(A, A) = 9(A,A) = h(A4,8) = A, so each of the three functions f, g, and h, is an onto function. (c) From the results in part (a) it follows that none of these functions is invertible. (a) The sets f-*(0), h-*(B), F'({1}), A"{3}), F*(L4,7}), and A-*({5,9}), are all infinite. (©) [-*(8) = {(0,0)}, 80 |o~*(B)| = 2. 9 *(42}) = {(8, {2}), ({2},8), ({2}, {2})}, s0 lo *({2})] = 3 lg *{8,12})] = 9. (a) @€ f*(BiNB2) => fla) € BAB, <= f(a) € By and f(a) € B, => a€ f-(By) and a € f-'(By) => a € f*(Bi)N f-(B2) (©) a€ f"(Bi) => fla) € Bi > f(a) ¢ Bi > ag fDi) > ae FB) (a) (i) f(x) = 22; (i) f(z) = [z/2] (b) No. The set Z is not finite. (a) Suppose that 21,2 € Zand f(x;) = f(x). Then either f(z,), f(z2) are both even or they are both odd. If they are both even, then f(z1) = f(22) = —2e1 = —2ra = a; = 22. Otherwise, f(21), f(¢2) are both odd and f(2:) = f(v2) + 20; —1 = 2x, —1 > 2x = 2x4 => m, = 7. Consequently, the function f is one-to-one. In order to prove that f is an onto function let n € N. If n is even, then (~n/2) € Z and (-n/2) <0, and f(—n/2) = -2(—n/2) = n. For the case where n is odd we find that (n+1)/2 €Z and (n +1)/2 > 0, and f((n +1)/2) = 2(n + 1)/2]-1=(n41)~1=n. Hence f is onto. (b) ft: NZ, where _f/ Per), =1,3,5,7... eae sass It follows from Theorem 5.11 that there are 5! invertible functions f : A —+ B. (2) For all n EN, (go fn) = (ho fy(n) = (ko fin) =n. (b) The results in part (a) do not contradict Theorem 5.7. For although go f = ho f = ko f = In, we note that @) (f09)) = £({1/3]) = £0) = 3- Gi) (Fo A)(1) = f({2/3]) = $0) =3-0= 04 1, 50 foh # Ip; and Gi) (FBG) = F((3/3]) = £0) = 3-1 = 3 #1, 90 Fok IN. Consequently, none of g, h, and k, is the inverse of f. (After all, since f is not onto it is not invertible.) OF 1,80 fog # IN; 154 5 7 Section 5.7 (a) fe O(n) (b) fe 00) () fe O(n’) () fFEOm) (e) FEO(n) — f) FE O(n’) (8) f€ O(n?) Let m = 1 and k = 1 in Definition 5.23. Then Vn > k |f(n)| =n < n+ (1/n) = |g(n)i, s0 f € O(9). howd m=2 and k=1. Then Vn > k (g(n)| =n + (1/n) ) For n = 6, 2" = 64 < 3096 = 4096 ~ 1000 = 2"? - 1000 = 2 — 1000. Assuming that 2* < 2?*— 1000 for n =k > 6, we find that 2 < 2? =» 2(2) < 2°(2%* — 1000) < 292% — 1000, or 2441 < 22+) — 1000, so f(n) < g(n) for all n 2 6. Therefore, with k=6 and m=1 in Definition 5.23 we find that for n > k {f(n)| < mig(n)| and Fe Oy). (c) For all n > 4, n? < 2" (A formal proof of this can be given by mathematical induction.) So let k= 4 and m=3 in Definition 5.23. Then for n> k, |f(n)| =3n? < 32") < 3(2” + 2n) = mlg(n)| and f € O(g). Let m=11 and k=1. Then Yn > k |f(n)| =n +100 < 11n? = mlg(n)|, so f € O(g). However, Vim € R* Vk € Z+ choose n> mar{k,100+m}. Then n? > (100-+m)n = 100n + mr > 100m + mn = m(100 +n) = mif(n)I, so g ¢ O(f). To show that f € O(g), let k= 1 and m = 4 in Definition 5.23. Then for all n> k, If(n)| =n tn k) A (lo(n)| > mif(n))]- So not matter what the values of m and & are, choose n > maz{4m,k}. Then [o(n)[ = (1/2)n® > (1/2)(4m)n? = m(2n2) > m(n? +n) =mlf(n)|, 90 9 ¢ OCF). Vm € Rt Vk € Z+ choose n> max{k,m} with n odd. Then n= |f(n)]>m=m-1= mig(n)|, 30 f ¢ O(g). Ina similar way, Vm € Rt Vk € Z* now choose n > maz{k,m} with n even. Then n= |g(n)i>m=m-1=mlf(n)l, and g ¢ O(f). For all n > 1,logyn < n, so with k =1 and m=1- in Definition 5.23 we have ig(n)| =log,n m, or [f(n)| =n > mlogyn = mlg(n)|. Hence f ¢ O(g). f € O(g) => 3m, € Rt 3k, € Zt 50 that Yn > hy [f(n)| < milg(n)]. g € O(h) => mg € Rt Fk, € Z* so that Yn > kz |o(n)| < ma|h(n)|. Therefore, Vn > max{ky, ka} we have [f(n)| < miJg(n)| < mmjh(n)| and f € O(h). Since f € O(g), there exists m€ R+,k € Z* so that |f(n)| k. But then [f(n)| < [m/lel]leg(n)| for all n> k, so f € O(cg). (a) Let k=1 and m=1 in Definition 5.23. (b) If he O(f) and f € O(g), then h € O(g) by Exercise 8. Likewise, if h € O(g) and g € O(f) then h € O(f) - again by Exercise 8. (©) This follows from parts (a) and (b). (a) For all n > 1, f(n) = Sn? +3n > n? = g(n). So with M = 1and k |f(n)| > Mlg(n)| for all n > k and it follows that f € 2(g). (b) For all n > 1, (n) = n® = (1/10)(5n? + 5n*) > (1/10)(5n? + 3n) = (1/10)f(n). So with M = (1/10) and k = 1, we find that |g(n}| > M|f(n)| for all n > & and it follows that g € Of). (c) For all n > 1, f(n) = 5n?43n > n= A(n). With M = 1 and & = 1, we have [f(n)| = Mlh(n)| for all n > k and so f € 2(h). (a) Suppose that h € M(f). If so, there exist M € R+ and k € Zt with n = |a(n)| > Mij(n)| = M(5n? +3n) for all n> &, Then 0 < M < n/(5n?+3n) = 1/(5n+3). But how can M be a positive constant while 1/(5n +3) approaches 0 as n (a variable) gets largex? From this contradiction it follows that h ¢ 2(f). Proof: Suppose that f € (9). Then there exist M € R* and k € Zt such that If(@)| > Mlg(n)| for all n 2 k. Consequently, |g(n)! < (1/M)If(n)| for all n > k, so ge OF). Conversely, 9 € O(f) => 3m € Rt 3k € Z* Vn > k (|g(n)] < mif(n)|) > 3m € Rt 3k € Zt Yn > k (If(n)] > (1/m)lo(n))) > 3M € Rt 3k € Zt Vn > k (If(n)] > Mig(n)}) > f € %(g). [Here M =1/m.] [Note: Upon replacing each occurrence of + by 4 we can establish this “f and only if” proof without the first (separate) part in the first paragraph.] (a) Porn 21, fin) = Dhy i = nln +: 1)/2 = (n2/2) + (n/2) > (n?/2). With k = 1 and M = 1/2, we have |f(n)| 2 M|n{ for all n > &. Hence f € Q(n?). (bo) Dh? = P42 Het? > [afte tn? > [nfo + [nf]? = fla + 1)/2\{n/2)? > n3/8. With k = 1 and M = 1/8, we have {g(n)| > Mjn°| for all n > k. Hence g € (n°). Alternately, for n > 1, 9(n) = Di, i? = n(n + 1)(2n + 1)/6 = (2n* + 3n* + n)/6 > n3/6. 1, we have 156 14, 15. 16. With & = 1 and M = 1/6, we find that |g(n)| > M|n®| for all n > k ~ so g € Yn°). (0) Chg if = UHR tnt > [r/2]tp---tnt > [n/2]t4---+[n/2}t = f(nt1)/2] [0/2]! > (n/2)). With & = 1 and M = (1/2), we have |h(n)| > M|n‘t#| for all n > k. Hence he Mn), Proof: f € O(g) = Fmi,m, € Rt Fk € Zt Vn 2 k milg(n)| < [F(n)| < malg(n)] > Bm, € RY Ak € Zt Yn F |fln)l < malg(n)| => f € O(g) and f € O(g). Conversely, f € 2(g) = 3m: € Rt 3k € Zt Vn > ky milg(n)| < [f(n)]. Likewise, f € O(g) => my E R* 3h; € Zt Yn > ke [f(n}| S raalg(n)|. Let k = max{hy, kp}. Thea for all n > k, mulg(n)| < |f()] < malg(n)], 50 f € Of). Proof: f € O(g) => f € Mg) and f € O(g) (from Exercise 14 of this section) => g € O(f) and g € 2 f) (irom Exercise 12 of this section) > g € O(f). Proof: Part (a) follows from Exercises 14 and 13(a) of this section and part (a) of Example 5.68. ‘The situation is similar for parts (b) and (¢).. Section 5.8 (a) FEO) — (b) FE O(n°) (©) f € O(n?) (d) f € O(log.) (€) f € O(nlog, n) (a) FE On) (b) fe O(n) (a) For the following program segment the value of the integer n, and the values of the array entries A(1), (2), A(3},..., A[n] are supplied beforehand, Also, the variables i, Max, and Location that are used here are integer variables. jegin Max := A(t}; Location := 1; In =1 then Writeln (The first occurrence of the maximum °); Write (entry in the array is et position 1.’) End; If Max < Afi] then Begin 187 4. Location End; Writeln (’ The first occurrence of the maximum °); Write (’ entry in the array is at position °, End End; (b) If, as in Exercise 2, we define the worst-case complexity function f(n) as the number of times the comparison Max < Afi] is executed, then f(n) =n ~1 for alln € Z+, and FE O(n). (2) For the following program segment the value of the integer n, and the values of the array entries A(t}, A(2], 4(3),...,A[n] are supplied earlier in the program. Also the variables i, Max, and Min that are used here are integer variables, jegin If Ali] < Min then Min := Ali If Afi] > Max then Max := Ali; End; Writeln (° The minimum value in the array is ’, Min :0); Write (’ and the maximum value is’, Max:0,".’) End; (b) Here we define the worst-case time-complexity function f(n) as the number of com- parisons that are executed in the For loop. Consequently, f(r) = 2(n — 1) for all n € Z+ and f € O(n). (e) Here there are five additions and ten multiplications. (b) For the general case there are n additions and 2n multiplications. (a) For each iteration of the for loop there is one addition and one multiplication. Theze- fore, in total, there are five additions and five multiplications. (b) ‘For the general case there are n additions and n multiplications, , we find that a; = 0 = |0{ = {logy 1], so the result is true in this first Proof: For n = case. Now assume the result true for all n = 1,2,3,...,k, where k > 1, and consider the cases forn=k+1. 158 10. nL. (i) n=k+1= 2", where me Z+: Here a, =1+4 ajpjaj = 1+ ayn = 1+ flog, 2-1 1+ (m—1) =m = [log, 2") = flog, nf; and (i) n=k+1=2" +r, where me Zt and 0 1) and consider what happens at n= k +1. () n=k+1=2, where m € Zt: Here ay = 1+ apy) = 1+ ayn-s = 14 flog, 2") = 14 (m~ 1) =m = flog,2”] = flogyn]. (i) n=k+1=2" +r, wherem € Zt and0 2, let f(n) count the maximum number of times the second while loop is executed. The second while loop is executed at most n—1 times for each value of i, where 2 2, let f(n) count the maximum number of comparisons made in the while Joop. This is n — 1, which occurs if the integers in the array are in ascending order or if ay (x € A and z € B) and (y € Aandy € B) = (z,y) € AxB and (z,y) € Bx A= (x,y) € (Ax B)N(Bx A). Consequently, (A x B)N(B x A) = (ANB) x (ANB). (b) Heither A or B is ® then Ax B= 0 = Bx A and the result follows. If not, let (2,y) € (A x B)U(B x A). Then 160 (zy) € (Ax B)U(B x A) = (2, y) € Ax B or (z,y) € (Bx A) > (2 € A andy € B) ot (¢ € Bandy € A) +(e € Aorz € B) and (y€ Aory € B) + z,y € AUB S (x,y) € (AU B) x (AUB). (a) True (b) False: Let A= {1,2},B = {x,y}, f = ((,2),2,y)}- (c) False: Let f:Z—+Z,f(e)=22, (4) True. (@) False: Let A= {1,2}, B = (1,2,3},0 = {1,2,3,4},f = {(1,1),(2,2)}, 9 = {(1,1), (2,2), (3,3)},& = (1, 1), (2,2), (3,4)}. () False. Let A= {1,2,3,4}, B= {5,6}, Ar F = {(1,5), (2,6), (3,5), (4,5)}. Then f(AiN Ay (g) True (a) fl) = fQ-1)=1- FG) +1- £4), 80 FQ) = (b) f(0) =0 (c) Proof (by Mathematical Induction): When a = 0 the result is true, so consider a #0. For n = 1, f(a") = f(a) = 1-°- f(a) = na"“*f(a), so the result follows in this first case, and this establishes our basis step. Assume the result true for n = k(2 1) ~- that is, f(at) = ka®~' f(a). For n = k +1 we have f(a?) = f(a-a*) = af(a') + a*f(a) = aka*! f(a) +a*f(a) = ka* f(a) + a*f(a) = (k + 1)a*f(a). Consequently, the truth of the result for n = k + 1 follows from the truth of the result for n = k. So by the Principle of Mathematical Induction the result is true for all n € Z+. 1,2}, Aa = (2, (2) = {6}, Be Caan) = {5,6}. 14x21 = 262, 144 => [A x Bl = 18 => |Aj = 2,[B] =9 or [Al = 3,13] = (x,y) € (ANB) x (CMD) = 2 € ANBy € COND «> (2 € Ay € C) and (© € By € D) = (2,y) €AXC and (2, y) € BX D = (2,y) € (AX C)M(Bx D) () 5! (b) 4 WO<2 <1, then [x] = 0 and 2? jy. Wi <2 <2, then |r| =1 and 2? 3/2. For k € Z* and & 2 2, if k Sz 2 we find that &(k ~1) > 0, so k(k—1) > 1>1/2, and k? ~ k > 1/2. Now kt > k + (1/2) = k > e+ (1/3) = x and we do not have kSack+1 Finally, let & € Z+ and consider —k < 2 < —k+1, Then 2? — [2] = 24-(~k) =a? +h, and 2? — [z] = 1/2 = 21 = —k +1/2 <0, so z cannot be a real number. Consequently, there are only two real numbers that satisfy the equation 2*— [2] = 1/2 — namely, 2 = 1//S and 2 = /3/2. Proof: First we show that the result holds for the first part of the recursive definition. Since 2.1 = 2> 1 we find the result true in part (1). In order to complete the proof we need to verify that every ordered pair (s, t) in R that results from part (2) of the definition satisfies the condition 2s > £, We consider three cases: 161 10. wa (i) (@+1,8) with (4,0) € R: Here we have 2a > 6, and since a+ 1 > a it follows that Ya +1) > 2a> bj (i) (a+1,5-+1) with (a,0) © R: Now we find that 2a > b => 2a +22 6+1= 2%a+1) 2 641; and (ii) (a+ 1,64 2) with (a,0) € R: In this last case it follows that 2a > b > 22+2> b4+2>Aat1)> 042. Consequently, for all (a, 6) € R we have 2a > 8. (a) P(z) = F(F(@) = af F(z) +b) — b= al(a(z +5) ~b) +B] — b= a(z48)—b P(2) = F(P(2)) = fla(x +b) — d) = af(a?(z +b) —B) + —b = a(x +b) —b (b) Conjecture: For n € Zt, f*(z) = a*(x +8) — 8. Proof (by Mathematical Induction): The formula is true for n = 1 - by the definition of f(z). Hence we have our basis step. Assume the formula true for n = k(> 1) — that is, f(z) = a*(2 +) — b, Now consider n=k+1. We find that f4"(2) = f(f*(2)) = f(a*(e+8)—8) = al(at(x+)—b) +5]— a*1(z +6) —b. Since the truth of the formula at n= & implies the truth of the formula at n = k+1, it follows that the formula is valid for all n € Z* ~ by the Principle of Mathematical Induction. Let n = |A]—|Ay]. Since |B)? is the number of ways to extend f to A and |B)? then n = 3 and [4] = 8. (a) (7x6 x 5 x 4x 3)/(75) + 0.15. (b) For the computer program the elements of B are replaced by {1,2,3,4,5,6,7}. = 216, 10 Random 20 Dim F(5) 30 Forl=1To5 40 F(1) = Int(Rnd*7 + 1) 30 Next I 60 ForJ=2Tod5 70 For K=1ToJ-1 80 ‘If F(J) = F(K) then GOTO 120 90 Next K 100 Next J 110 GOTO 140 190 C=C+1 130 GOTO 10 140 C=C+iI 150 Print “After ”; C; “ generations the resulting” 160 Print “function is one-to-one.” 170 Print “The one-to-one function is given as:” 180 Forl=1To5 190 Print “(51 4)"5 FOS “” 162 12. 13. 14. 15. 16. 17. 18. 19. 20. 200 Next I 210 End For each subset A of S, let +4 denote the sum of the elements of A. Consider only those nonempty subsets A of $ where |A| < 5. There are 2”—1~1—7= 119 such subsets and here 1 <8 $ 20+21+22423-424 = 110. The result follows by the Pigeonhole Principle for there are 119 subsets (pigeons) and 110 possible sums (pigeonholes). For 1 1, flo ft = fro ft. Then fit! of" =(fo fo ft = fo(flof) = fo(froft) =(fofofi=(Moflof = fro(foft) = fro fi, so FP 0 f" = fro f™ for all m,n € Zt, (b) vy € f(Mier Ai) => y = f(z), for some z € Nes Ai => v € f(A), for all i € T= y € Nicer f(Ad)- (c) From part (b), f(Mier Ai) © Mer f(Ai). For the opposite inclusion let y € Myer FAs) Then y € f(Aj) for all i € I, so y = f(z;),2; € Aj, for each i € I. Since f is one-to-one, all of these 2;'s, i € I, yield only one element = € Mier Ai- Hence y = f(z) € f(Mer Ai), 50 (ker f(Ai) © F(Mier Ai) and the equality follows, ‘The proof for part (a) is done in a similar way. - Proof: Let a€ A. Then Ja) = a FF(@)) = FG FFF(@)) = Fla 0 F@)). From f(a) = 9(f(f(a))) we have f7(a) = (f 0 f)(a) = f(a f(F(a))). So f(a) = Fg 0 F(a) = FG FF(F(@)))) = PUF@) = PU P(@)) = FFF) = F(g(F(a))) = 9(a)- Consequently, f = g. 2 (a) nf") = ptr?) (b) nf) (c) ae”) (a) Since [A] = n, there are n choices for each selection of size k, with repetitions allowed, from the set A of size n. ‘There are r = (#7) possibie selections and n™ commutative E-ary operations on A. a) Note that 2 = 2', 16 = 2*, 128 = 27, 1024 = 2!°, 8192 = 2", and 65536 = 2°, Consider the exponents on 2. If four numbers are selected from {1,4,7,10, 13, 16}, there is at least one pair whose sum is 17, Hence if four mumbers are selected from S, there are two numbers whose product is 2" = 131072, b) Let a,,c,d,n € Z*. Let S = (6%, 004, b+... b+=4), If [2] 4-1 numbers are solected from S$ then there are at least two of them whose product is b?¢*™4_ (a) xans,xa*Xe both have domain &/ and codomain {0,1}. For each z € U, x4na(z) = Liff 2 € ANB iff z € A and z € B iff xa(z) = 1 and yp(z) = 1. Also, xuna(z) = 164 27. 28. 29, 31. 32. O if x ¢ AN Biff 2 ¢ Aor 2 ¢ Biff xa(z) = 0 or xn (2) = 0 if x4-xa(2) = 0. Hence XanB = XA*XB> (b) The proof here is similar to that of part (a). (©) xa(v) = Lif x € Aff c ¢ Af y4(x) = O18 (1—x4)[z) = 1. yale) = 01 « ¢ Aiff x € Aiff yq(z) = Lif (1—x4)(e) = 0. Hence xg =1— x4. fog={(2,2), (vu), 2k gf = {(2,2), (v2), (ev) f* = {(2,2),(4,2), (vig = (2,9) 2) (2) (go fy" = {2 2), (2), (eu)} = ftom hg tof = K(x, 2), (yy), (z,2)}. (2) f-(8) = {al5z +3 = 8} = {1}. (b) fx? + 8a +1) = 1 => 2? + 8241 = Lora? + 3241 = -1 => 2? +32 = 0 or 22+ 3242 =0 => (a)(2 +3) =0 or (z + 2z +1) =0 => 2 = 0,3 or e = -1,-2. Hence g~*(1) = {—3, —2,—1,0}. (©) {-8/5, -8/3} Under these conditions we know that f-"({6,7,9}) = {2,4,5,6,9}. Consequently we have (i) two choices for each of f(1), f(3), and f(7) ~ namely, 4 or 5; (ii) two choices for each of f(8) and f(10) — namely, 8 or 10; and (iii) three choices for each of f(2), f(4), f(5), £(6), and f(9) ~ namely, 6, 7, or 9. Therefore, by the rule of product, it follows that the number of functions satisfying these conditions is 2° 2? - 3° = 7776. Since f! = f and (f-')! = f-1, the result is true for n = 1. Assume the result for nak: (AT = (FA Born = b+ (PT = (fo ft = (fh oF) = (£2) 0 (f= (F-1)0 (F-)F (by Exercise 21) = (f-1)#1. Therefore, by the Principle of Mathematical Induction, the result is true for all n € Zt. (a) (ro0\(z) =(comz)=2 (b) (2) = 2 —njo%(2) = 2 +n(n > 2). (0) (a) = 2+ njo-"(z) = 2 —n(n > 2). (a) r(n) = (er + ler +1) ---(ee +1) (b) :7(2) = r(3) = 7(5) =2 ke 3:1(2) = 1(3%) = 1(57) = 3 k= 4:4(6) = 7(8) = r(10) =4 k=5: 7(24) = 284 = 7(54) =5 k= 6: 1(12) = r(18) = 7(20) = 6 (c) For all k > 1 and any prime p, 7(p*-!) = k. (@) Let a = pity spit and b= aftgl? gi, where pispay.-. Pls disdas---9ge are +E distinct primes, and ¢;,¢2,...,¢4: fis fay--- fr € Z*. Then r(ab) = (6 +1 Mer +1)--(ee + MA +h +--+) 165 33. 34. 35. 36. 37. = [Cert ler +1) + (ee + MMC + Da + 1) (fe + D) = ra)r(8) (8) Here there are eight distinct primes and each subset A satisfying the stated property determines a distribution of the eight distinct objects in X = {2,3,5,7, 11,13, 17, 19} into four identical containers with no container left empty. There are $(8,4) such distributions. (b) S{n,m) Define f : Zt > R by f(n) = 1/n. (a) Let m= 1and k =1, Then for all n > &,|f(n)| $2 <3 < Ig(n)l = F € O(9). (b) Let m = 4 and k = 1. Then for all n > k,|g(n)| <4 = 4-1 < 4/f(n)| = mif(n)], s0 9 € O(f). (a)f € O(f:) => 3m, € Rt 3k; € Z* such that [f(n)| < milfi(n)] Yr > ki 9 € O(G1) => 3m, € R* 3k, € Z* such that |g(n)| < malgi(n)] Vn > ke. Let m = maz{rm,m;}. Then for all n > maz{ki,ko},|(F + o)(n)l = fn) + 9(n)| [F(P)| + lo(m)] < malfi(r)| + mala(n)| < m(fir)| + ln(r))) = mifilr) + 9:(n)) ml(fi + ar)(n)], 90 (fF + 9) € OC +91). (b) Let f,fiygygr sZt —9 R be defined by f(n) =n, fi(n) = 1—n,9(n) = 1, 3(n) =n. lg(n)I, 80 First note that if log, n =r, then n = a” and log, n = logs(a’) = r log; a = (log, a)(log, n). Now let m = (log,a) and k = 1. Then for all n > k,|g(n)| = log,n = (log, a)(log, n) = mif(n}}, 90 9 € OCF). Finally, with m = (log,a)"? = log,6 and k = 1, we find that for all n > &,|f(n)| = log, n = (log, b)(log, 2) = mig(n)]. Hence f € O(9). 166 10. a CHAPTER 6 LANGUAGES: FINITE STATE MACHINES Section 6.1 (a) 25; 125 (b) Dike 5! = 3906 (a) 4 &) (a (6) 8° (4) 3° + ()3°+ ({)3 12 (@) 0 (o) 0 _ _ (e) 3 (f) 4 (s) 1 (h) 0 rhs There are 100 substrings of longth 2: 21,22,-.- 205 99 substrings of length 2: 2122, 222%, +} Leubstring of length 100: 2122...2199. So there sre 100-+ 100)(101)/2 = 5050 nonempty substrings in total. (a) { 00,11, 000,111, 0000,1111} (b) {0,1} (c) X*—{A, 00, 11, 000, 111, 0000, 1111} (a) {0,1, 00,11} &) o (£) t= {0, 1, 00, 11} = {A,01, 10} U fw] |] w [2 3} (2) AB = (2000, 101, 1100, 111} (b) BA = {0010,0011, 110,111} (c) A? = {101010, 101011, 101110, 111010, 101111, 111011, 111220, 111111} (a) B? = (0000, 002, 100, 11). (a) 2 € AC =} 2 = a0, for some a€ AcE C => 2 € BD, since AC B,C CD. (bo) HAD #0, let 2 ¢ AD. 2 € AG => x = yz, for some y € A,z ED. But 2 € 0 is impossible. Hence A = 6. {In like manner 0A = 6). (a) AB = {zy,2y2} (b) BA = {2y,22y} (©) B= (A2,2%,25} (d) Bt = {x"|n € Zt} (c) AP = (A, zy, cyey,...} = A} U {(2y)"In € Zt} For any alphabet SI, let BC 5. Then, if A = BY, it follows from part (f) of Theorem 6.2 that A* = (B*)' = Bt = A, 167 12, 13. 14, 15, 16. at. 18, (a) Yes (b) Yes (c) Yes (a) Yes (e) No ® Yes (8) Here A* consists of all strings 2 of even length where if 2 # A, then z starts with 0 and ends with 1, and the symbols (0 and 1) alternate. (b) In this case A* contains precisely those strings made up of 3n 0's, for n € N. (c) Here a string z € A” if (and only if) (@) = is a siting of n 0's, for n € N; or (ii) 2 is a string that starts and ends with 0, and has at least one 1 ~ but no consecutive Vs, (€) For this last case A* consists of the following: (i) Any string of n 1's, for n € N; and (ii) Any string that starts with 1 and contains at least one 0, but no consecutive 0's. There are five possible choices: (1) A= {4}, B= {01, 000, 0101, 0111, 01000, 010111}; (2) A= {01,000,0101,0111, 01000, 010111}, B = {); (3) A= {0}, B= {1,00, 101,111, 1000, 10111}; (4) A= {0,010}, B= {1,00,111}; and (3) A= {(,01), B= (01,000, 0111}. Let 5 be an alphabet with @4 ACE". IA] =1and z € A, then zz == since A? = A, But zz [= 2] 2 [=[| 2 l=>l] x j= 0 => x =r. fA} > 1, let 2 € A where fz ||> O but | || is minimal. Then x € A? => 2 = yo, for some y,2 € A. Since {fz =I y I] +12 Ih if {j y [jl] z [> 0, then one of y,z is in A with length smaller than || z ||. Consequently, one of || y [| or || z [is 0, s0 Ae A. (2) Pay Sas7 (b) yd ate onto; pa(5") = (a}E"sa4(E*) = D*a} (c) r is invertible and r~" =r. (a) 25; 125; 5°? for n even, 5#1/? for n odd. (¢) dop)iz)=2 = (rodoros,)(2) () r(B) = {ea, ia, 00, 00, oie, unoie} Pe(B) fos o}- se \(B) ja-"(B)| = Pes '(a)| = Den dz) = Deen 5 = 6(5) = 30 If A = A? then it follows by mathematical induction that A = A® for all n € Z*. Hence A= At, From Exercise 15 we know that A= A? => \€ A, 80 A= A‘, ‘Theorem 6.1(b): 2 €(AB)C += 2 =(ab)e, for some a€ Abe Bee C a= B= (ajaz.,.¢bybz... bm Keres -..¢,), Where a € A,1 2 = yz where y = 4103...0q,2 = dhai,...a,, with a;,d, € A, for 1 00111 € A; and (ai) 00111 ¢ A => OD0IIIi € A. (c) f 00001111 were in A, then from step (2) we see that this word would have to be generated from 000111 (in A). Likewise, 000111 in A => 0011 is in A => O1 is in A. However, there are no words in A of length 2— in fact, there are no words of even length in A. (a) (1) A€ A; and (2) fz € A, then each of the following is also in A: @ al (i) Ie (i) 002 Gv) 200 (v) 020 [And no other string of 0's ond 1’s is in A (b) () A€ 4; and (2) For each ¢ € A the strings 1z and 20 are also in A. 169 23. 24, 25. 26. 27. 28. (a) Steps Reasons 1 (isin A. Part (1) of the recursive definition 2 (()) isin A. Step 1 and part (2(ii)) of the definition 3 (OM) isin A. Steps 1, 2, and part (2(i)) of the definition (b) Steps Reasons 1. ()isin A. Part (1) of the recursive definition 2 (isin a. Step 1 and part (2(ii)) of the definition 3 ()M ) isin A. Steps 1, 2, and part (2(i)) of the definition 4. ()OO isin A. Steps 1, 3, and part (2(i)) of the definition (c) Steps Reasons L (isin AL Part (1) of the recursive definition 2 (\()isin A. Step 1 and part (2()) of the definition 3. (CQ) isin A. Step 2 and part (2(i)) of the definition 4. (OQ) isin 4. Steps 1, 3, and part (2(i)) of the definition (1) A€ Aand s € A for all s € D5 and (2) For each 2 € A and s € 5, the string sx is also in A. {No other string from 5 is in A] Length 3: (3+ () = ree BrBt Length 6: (5) +(¢)+ ({)+ (2) = 13 [Here the summand (§) counts the strings where there are no 0s; the summand (3) counts the strings where we arrange the symbols 1,1,1,1,00; the summand ({) is for the arrangements of 1,1,00,00; and the summand (3) counts the arrangements of 00,00, 00.) [Here (f) counts the arrangements for one 111 and eight 00's; (2) counts the arrangements for three 111’s and five 00's; and (f) is for the arrangements of five 111’s and two 00's.] o A: (Q) EA (2) Ifae A, then Oa0, Oa), 120, lal € A. B: (1) G1¢4. (2) Hae A, then 0a0,0a1, 100, lal € A. Of the 3-3-3-3 = 34 = 81 words in SY, there are 3-3-3-2 = 27-2 = 54 words that start with one of the letters a,b, or c and end with a different letter. Consequently, one naust select at least 54 +2 = 56 words from [* to guarantee that at least two start and end with the same letter. 170 3. Section 6.2 (a) 0010101; s: (b) 0000000; +, (c) 001000000; s0 Because of the first output of 1 we must be at state s; when the third input is read. This then forces the first three inputs to be 1,0,1. To get the second output of 1 we must be at state #2 when the fifth input is read. This forces the remaining two inputs to de 0,1. Hence z = 10101. (a) 010110 (b) 171 § = {s:|0 . 173 OQ” Lo 0 0,0 LY (®) >) @) Input 1m Or " Output O11 (i) Input 1910 on Oui 2 (iii) Input 00011 Output 00001 (©) The machine outpute a 0 followed by the first n — 1 symbols of the n symbol input string 2. Hence the machine is a unit delay. (a) ‘The machine here performs the same tasks as the one in Fig. 6.13 (and has only two states.) 175 6. Suppose the contrary and let the machine have n states, for some n € Z*. Consider the input string 0°11". We expect the output here to be 0"*'1", As the 0’s in this input string are processed we obtain n +1 states s1,52,---)Sn)Sn41 from the function v. Consequently, by the Pigeonhole Principle, there are two states s;,8; where i < j but 4; = s;. So if the states s,, for i+1< m 0), but AG B. 3. Let 2 € E and A = {2}. Then A? = {27} and (A) = {A,2%,24,...}. However A Q2,27,...} and (4°)? = AY, 50 (A ¢ (47). 4. (a) A*CB*. [For example, 111 € B* but 111 ¢ 4+} (b) At=C". 5. Opa : Starting at sq we can return to so for any input from {1,00}*. To finish at state 6 requires an input of 0. Hence Oo: = {1,00}*{0} Ora : {0}{1,00}"{0} On:8 Ova: {1,00}* ~ {A} Oyo + {3}{1,00}* U {20}{2,00}* 176 6. (a) ve ov ijo7 so{so 8/0 0 si] 4 42 |0 0 sil sz $3 /0 0 $353 4 |0 1 (b) For any input string 2, this mechine recognizes (with output 1) the occurrence of every fourth 1 in x. (©) (3) +) + (6) = 7. (The first summand is for the sequence of eight 1’s, the second summand for the sequences of four 1’s and four 0’s, and the last summand for the sequence of eight 0s.) For || z {J 12, there are (12) + (12) + (12) + (12) = 992 such sequences. 7. (a) By the Pigeonhole Principle there is a first state s that is encountered twice. Let y be the output string that resulted since s was first encountered until we reach this state a second time. Then from that point on the output is yyy... (b) (2 8. 9. 10, | fo iyo 7a a} a 6/0 1 fsa 4/1 0 oa) 42 82/1 0 ss{ sr so{9 1 Here the table for w is obtained from Table 6.15 by reversing @ and 1 (and, 1 and 0) for the columns under 0 and 1. aT 1. 12 a if (0183) | ($0184) (s1+43) (80,84) | (80,83) (81554) (81,83) | (81583) (2,84) (8154) | ($1584) (#2583) (22,83) | (8253) (0,84) (s2y$a) | (S284) (80983) (b) ($0, 43); 1101) = 1111; My is in state sp and My is in state s4. @) ee el ‘The following program determines the output for the input string 1000011000. 10 Dim A(3,2), B(3,2) 20 Mat Read A,B 30 Data 2,1,3,1,3,1,0,0,0,0,1,1 40 Dim P(100), $(100) 50 Read N 60 Forl=itoN 70 Read X 80 KI <> 1 Then 120 90 Hf X = 0 Then P(1) = B(1j1) Else P(1! 100 If X = 0 Then S(1) = A(1,1) Else S(1) 10 Go To 140 120 Y=X+1 130 P(1) = B(S(L1)Y) : S(I) = A(S(I-1),Y) 140 Next I 150 Data 10,1,0,0,0,0,1,1,0,0,0 160 Print “The output is”; 170)“ ForI = 1 To N-1 180 Print P(D); 190 Next I 200 Print P(N) 210 Print “The machine is now in state”; S(N) 220 End 178 CHAPTER 7 RELATIONS: THE SECOND TIME AROUND Section 7.1 A. (a) {(1,1),(2,2),(8,8).(4,4),(1,2),(2,1),(2,8),(8,2)} (b) {,1),2,2),(8,8),(4,4),,2)} (c) {(1,1),(2,2),(2,2),(2,1)} 2, ~9,-2,5,12,19 3. (a) Let fi fasts € F with fi(n)=n+1, foln) =5n, and fa(n) = 4n+1/n. (b) Let 91,92,99 € F with or(n} = 3, a(n) = 1/m, and fa(n) = 4, (a) The relation R on the set A is (i) refiexive if Ve € A (2,2) €R (ii) symmetric if Vz,y € A [(z,y) € R => (y.2) € R (iii) transitive if Vz,y,z € A {(z,y),(y,2) € R => (2,2) € R] (iv) anticymmetric if Vz,y € A [(z,y),(y,2) € R= ¢ = y). (b) The relation R on the set A is (i) not reflexive if 3x € A (2,2) ¢R (ii) not symmetric if 3z,y € A [(z,y) € RA(y, x) ¢ R) (ii) not transitive if 3e,y,z € A {(2,y),(y,z) € RA (2,2) ¢R] (iv) not antisymmetric if 3z,y € A [(2,y),(v.z) € RAZ y)- 5. (a) reflexive, antisymmetric, transitive (b) transitive (c) reflexive, symmetric, transitive (4) symmetric (e) (odd): symmetric (f) (even): reflexive, symmetric, transitive (g) reflexive, symmetric (h) reflexive, transitive 6. The relation in part (a) is a partial order. The relations in parts (c) and (f) are equivalence relations, 7. (a) Forall c € A, (2,2) € Rs, Ra, 80 (2,2) € Ri Re and Ry N Re is reflexive. 179 10. i. (b) All of these results are trne. For example if R1,Ra are both transitive and (2, y),(y,2) € Ri NR then (2, y),(y,z) € Ri, Rea, s0 (x, 2) € Ri, Ra (transitive property) and («,z) € Ri Ra. [The proofs for the symmetric and antisymmetric properties are similar.) (a) For all 2 € A,(2,2) € Ri,Ra © Ry U Ra, 50 if either Ry or Ry is reflexive, then Ry U Re is reflexive. (>) (Ixy € A and (2,y) € Ry U Rp, assume without loss of generality, that (ey) € Rr. (x,y) € Ri and R symmetric => (y,z) € Ri => (y,2) € Ri U Re, 80 Ri U Re is symmetric. (i) False: Let A = {1,2},R1 = {(1,1),(1,2)}, Ra = ((2,1)}. Then (1,2),(2,1) € Ri U Ry, and 1 # 2, 80 R, UR, is not antisymmetric. (ii) False: Let A= {1,2,3}, Ri = {(1,1), (1,2)}, Re = {(2,3)}. Then (1,2), (2,3) € Rs U Re, but (1,3) ¢ Ri U Ra, 80 Ri U Ry is not transitive. (a) False: Let A= {1,2} and R = {(1,2),(2,1)}- (b) (i) Reffexive: True (ii) Symmetric: False. Let A= {1,2},Ra = {(1,1)}, Ra = (01,1), (1,2). (iii) Antisymmetric & Transitive: False. Let A= {1,2}, = {(1,2)}, Re = {(1,2); (21)}- (©) (i) Reflexive: False. Let A = {1,2}, ®i = {(1,1)}, Ra = {(1,1),(2,2)}. (i) Symmetric: False. Let A= {1,2},Ri = {(1,2)}, Re = {(1,2),(2,)}. (iii) Antisymmetric: True (iv) Transitive: False. Let A= {1,2),Rs = {(1,2),(2,1)}, Re = {(1,1),(,2), (2,1), (2,2)}- (d) True (=) 2 ) COQ = 2 (©) (d) 2" (e) (28)(25) = 2° (f) 2-38 (s) 2-3" @) @1 ©) CP )C) = G) &) PHYO) = ( fe) (Ese to eye = © C)'=6)= (Q) Since 13, 860 = 2?-3*-5-7- 11, it follows that R contains as a (-1)° = 3 a" (@y = (36)(27) = 972 ordered pairs. u RB i 2 180 12. 13. 14, 18. 16. at. 18. Since 5880 = neste ce (ae bi (7) = Ganj + 20 +), we find that 56 = (k+2)(k+1) and k=6. For n = pipSp$ there are (5 + 1)(3 +1)(6 + 1) = (6)(4)(7) = 168 positive integer divisors, so [A] = 168. There may exist an clement a € A such that for all b € B neither (a, 6) nor (b,a) € R. There are n ordered pairs of the form (2,2),2 € A, For each of the (n? ~ n)/2 seta {(,u).(y,2)} of ordered pairs where z,y € A,x # y, one element is chosen. This results in a maximum value of n+ (n? ~n)/2 = (n? +n)/2. The number of antisymmetric relations that can have this size is °°-"/2, rn counts the elements in R of the form (a,5),a # b. Since R is symmetric, r—n is even. (2) @Ry fe (2,2) € R. (2,2) €R,(z,2) € R=? (2,2) ROR=R?. (a,d) € (Ri 0 Ra) o Ra => (a,c) € Rio Ra, (c,d) € Rs for some c € C => (a,b) € Ru, (b,c) € Ra,(c,d) € Rs for some b € B,c € C =» (a,b) € Ry, (b,d) € Ryo Rs => (a,d) € Ry 0 (Rao Rs), and (Ry 0 Rr) o Rs C Ri 0 (Rao Rs). 181 WW. is (a) Ri o(R2U Ra) = Rr © {(w, 4), (w, 5), (x, 6), (uv, 4), (ys 5), (v, 6)} = {(1,4), (4, 5), (8,4), 3,5), 2,6), (1,6)} (Ry 0 Ra) U (Ri o Rs) (1,5), (3, 5), (2,6), (1,4), (1,6)} U {(1,4), (1,5), (3, 4), (3, 5)} = {(1,4),(1, 5), (1, 6), (2,6), (3,4), (3,5)} (b) Ri o(R2M Rs) = Rr o {(w,5)} = {(1, 5), (3,5)} (Ra 0 Ra) 1 (Ry © Rs) = {(1,5), (3, 5), (2, 6), (1,4), (1,6)} 9 (2,4), (1,5), (3,4), (3,5)} = {(1,4), (1,5), (3,5)}- Ry o(RaM Ra) = Ra o {(m,3), (mm, 4)} = {(1,3),(1,4)} (Rx 0 Ra) M (Rr © Rs) = {(1,3),(1,4)} 9 {(1,3), (1,4)} = 40, 3), (1,4) }. (a) (2,2) € Rio (Re U Ro) => for some y € B,(2,y) € Ra, (y.2) € RaU Ra +> for some y € B,((e,u) € Rr,(y, 2) € Ra) or ((z,y) € Ra,(y,z) € Ra) => (zz) € Rio Ry or (2,2) € RyoRy > (2, 2) € (RyoRa)U(RyORs), so Ry 0(Ry0Rs) C (Ry ORs) U(Ri ORs). For the opposite inclusion, (x, 2) € (Ri 0 Ra) U (Ry © Ra) => (2,2) € Ri oR or (2,2) € Ry Rs, Assume without loss of generality that (x, 2) € Ryo Ra. Then there exists an clement y € B so that (z,y) € Ri and (y,2) € Rz. But (y,2) € Ra => (yz) € RaU Ra, 30 (2,2) € Ry 0(RaU Rs), and the result follows, (b) The proof here is similar to that in part (a). To show that the inclusion can be proper, let A= B 1,2,3} with Ry = {(1,2),, Dh, Ra = ((2,3)},Rs = {(1,3)}- ‘Then Ry 0 (Ry oR) = Ri 00 =, but (Ry o Ry) o (Ry © Ra) = {(1,3)}- ‘This follows by the Pigeonhole Principle. Here the pigeons are the 2" +1 integers between 0 and 2”, inclusive, and the pigeonholes are the 2” relations on A. Let $= {(1,1),(1,2), (1, 4)} and T = {(2,1), (2,2), (1,4)}- Here there are two choices for each ajj,1 < i < 6, For each pair aj;,aj1 Si 1 by the Principle of Mathematical Induction. (a) R reflexive <> (x,2) € R, for all c € A <=> mzy = 1 in M = (mis)nxn, for all reAeol, [Vz,y € A (2,y) € R= (2) ER) => [ey EA may =1in M => my =1in M] <=> M=M". 183 14. 10! BEESS SSERRESERS g 3 g ‘THIS PROGRAM MAY BE USED TO DETERMINE IF A RELATION ON A SET OF SIZE N, WHERE N <= 20, 15 AN EQUIVALENCE RELATION. WE ASSUME WITHOUT LOSS OF GENERALITY THAT THE ELEMENTS ARE 1,2,3,...,N. INPUT ‘N =";N PRINT“ INPUT THE RELATION MATRIX FOR THE RELATION” PRINT “BEING EXAMINED BY TYPING A(I,J) = 1 FOR EACH” PRINT “1 <= I<=N,1<= J <= N, WHERE (IJ) IS IN” PRINT “THE RELATION. WHEN ALL THE ORDERED PAIRS HAVE” PRINT “BEEN ENTERED TYPE ‘CONT’ ” sTOP DIM A(20,20), C(20,20), D(20,20) FORK=1TON T=T+A(KK) NEXT K IF T =N THEN & PRINT ‘R IS REFLEXIVE”; X = 1: PRINT “R IS NOT REFLEXIVE” FORI=1TON FORJ=I+1T0N IF A(,J) <> AGI) THEN GO TO 260 NEXT J NEXT I PRINT “R IS SYMMETRIC”: Y = 1 GO TO 270 PRINT ‘R IS NOT SYMMETRIC” MATC=A MAT D = A*C FORI=1TON FORJ=1TON IF D(I,J) > 0 AND A(1,J) = 0 THEN GO TO 360 NEXT 3 NEXT I PRINT “R IS TRANSITIVE”; GO TO 370 PRINT “R IS NOT TRANSITIVE” IFX+Y+Z=3 THEN & PRINT “R IS AN EQUIVALENCE RELATION” & ELSE PRINT “R IS NOT AN EQUIVALENCE RELATION” END =1 15. (a) a g f b ‘ c ) 5 x 8 L_—y w z 16. (a) True (b) True (c) True (@) False 17. (i) R= {(a,4), (6,2), (ae), (€, 4), (6, €), (c,5), (6,4), (4, b), (6, €), (618), (de) (4), (4), Fa} (a) () (A) (e)(F} (@) fo10010 @lrorid () |010000 MB= 1010011 (@|1109e100 ()looo100 For parts (i), (ii), und (iv), the rows and columns of the relation matrix are indexed as 185 in part (i). (&) R= {(a, 2), (6,€), (4,0), (4,0), (6, A} o1g000 ooo0010 oo00000 M®=\o 11000 oo0000 ooo00n0 (iii) R= {(a, 4), (4,8), (6,4), (6.4), (4,0), (40), (6.4 (4 A (60, (6 (het 110000 100000 ooo0100 MR =lo 91011 oo00101 000110 (iv) R= {(b, 4), (b,€), (65), (0, €), (6,4), (e,4)} M(R) = oooore eooHoe eooone erHones eocore ecooce 18. (a) R= {(v,w),(v,2), (w,v), (w,z), (w,y)s(w, 2), (2,2), (ys 2} v (b) R= {(v,w),(%, 2), (059), (w, 0); (2), (2,0), (2,0), (2, 2), (9,0): (¥s2), 2) ew) 19. R: Ry: Rand Rt: 20. (a) @) @) (ii) Each directed path corresponds to a subset of {2,3,4,5,6}. There are 2° subsets of {2,3,4,5,6} and, consequently, 2° directed paths in G from 1 to 7. @) @ () =12h Gi) There are 2"~? directed paths in G from 1 to n. {iii} There are 2lt(-s1)-2) = 2"! directed paths in G from a to b, 187 21. 22, 23. 24, 23. 2, (28)(219) = 235 BS, (28)(229) = 15 (a) Ri: Ra 11000 11100 11000 11100 0011.0 11100 oo1i0 oooi1t 00001 oooi2 (b) Given an equivalence relation R on a finite set A, list the elements of A so that elements in the same cell of the partition (See Section 7.4.) are adjacent. The resulting relation matrix will then have square blocks of 1’s along the diagonal (from upper left to lower right). (i Es 5 s (a) Let ke Z*. Then R™* = {(1,1),(2,2),(3, 3), (4,4), (5,5), (6,6), (7, 7)} and RUM = R. The smallest value of nm > 1 such that R" = R isn = 13. For all multiples of 12 the graph consists of all loops. When n = 3,(5,5),(6,6),(7,7) € R°, and this is the smallest power of ® that contains at least one loop. (b) When n = 2, we find (1,1), (2,2) in R. For all & € Z*,R™ = {(2,2))2 € 241 S 2 $10} and R™+ = R. Hence R is the smallest power of R (for n > 1) where R* = R. 188 (©) Let ® be a relation on set A where |Al =m. Let G be the directed graph associated with R — each component of G is a directed cycle C; on m, vertices, with 1 aRyc,cRia and bRad,dRob => a = cb = d => (a,b) = (c,d), #0 R is antisymmetric, Finally, (a,8)R(c,d), (c,d)R(e, f) => aRye,cRye and PRad,dRaf => aRye,¥Rof => (a,))R(e, f), and R is transitive. Consequently, Ris 1 partial order. No. Let A= B = {1,2} with each of Ri, Ry the usual “is less than or equal to” relation, ‘Then R is a partial order but it is not a total order for we cannot compare (1,2) and (2,1). @< {1} < {2} < {3} < {1,2} < {1,3} < {2,3} < {1,2,3}. (There are other possibilities.) (a) @ ©) © @ ©) (@) i a 5 i 1 (bo) jo 1 0 1 1 M(R)= (c) |0 0 1 1 1 (a) Jo 0 0 a 1 () Lo 0 0 0 1 (>) (Jacb 2 = a. So if M(R) is the relation matrix for R, the column under ‘a’ has all 0's except for the one 1 for the ordered pair (a,a). (b) Let 6 € A, with b a greatest element. Then the column under ‘6’ in M(R) has all 1's. Ifc€ A and cis a least element, then the row of M(R) determined by ‘ec’ has all 1’s. lub glb lub glb lub gib (@) {12} 6 (c) {1,2} 6 (e) {1,23} 0 (b) {1,23} 0 (4) {1,28} {1} (a) (G) Only one such upper bound ~ {1,23}. (ii) Here the upper bound has the for: {1,2,3,2} where x € Uf and 4 a = b, so R is antisymmetric 192 20. a. 22. Consequently, the relation ® is a partial order for Z. But it is not a total order. For example, 2,3 € Z and we have neither 2R3 nor 3R2, because neither ~1 nor 1, respectively, is a nonnegative even integer. (a) For all (a,8) € A, a = a and & < b, s0 (a, 5)R(a,) and the relation is reflexive. If (a,b), (c,d) € A with (a, b)R(c,d) and (c, d)R(a, 6), then if a # ¢ we find that (a, 8)R(e,d) a ¢ Sd, and (q.d)R(a, b) +d Gy = fig, 80 E = F - and the “precedes” relation is antisymmetric. Finally, suppose that E = (¢ij)mzny F = (fij)nxns and G = (gi;)mxn are (0,1)-matrices, with E < F and F< G. Then, for all 1 SiS m,1 ¢4j $ gij, 80 E ty = #23 (22,4a)R(es, Ys) => ta = zs. With 21 = 22,22 = 2g, it follows that 21 = zy, so (21,41) R(x3, ys) and RF is transitive. (b) Each equivalence class consists of the points on a vertical line. The collection of these vertical lines then provides a partition of the real plane, (a) For all (2,y)€ Ae ty =2+y = (x,y)R(e,y). yw )Reyw) SS atnu=antnntp=nth = (2a; y2)R(z1,91)- (21, vn) Ra, va) (22, v2) Res, ys) => 195 10. i. 2 th = Ta + Yay ta + Ya = ts +s; 80 21 +41 = ay + ys and (41,41) R(es, 4s). Since R is reflexive, symmetric and transitive, it ia an equivalence relation. (b) (4,3)} = {,3),2,2),8,0} (2,4)] = {0,5),(2,4),6.3),(4,2),6,)}; (G0) = {1}. (c) A= {(1,1)}U {(1,2), (2, D}U {, 3), (2,2), (3, JU {(1, 4), (2,3), (3, 2), (4,19) U {(2, 5), (2, 4); (3,3), (4,2), (5, 1)}U {(2,5), (3,4), (4,3), (5, 2)} U {(3, 5), (4,4); (5,3)} U {(4,5), (5, 4)} U {6,5)}. (0) For alla € Aya ce Z => b-a=3(- and aRb, bRe, then a—b = 3m,b—c = 3n, for some m,n € Z => (a—b) +(b—c) = 38m + 3n => a—c=3(m +n), 9 aRe. Consequently, R is transitive. (b) 1] = [4] = [7] = (1,4, 75 [2] = [5] = {2,5}; [5] = [6] = {5,6}. A= {1,4,7} U {2,5} U {3,6}. (a) For all (a, 5) € A we have ab = ab, so (a, 8)R(a, 6) and R is reflexive, To see that R is symmetric, suppose that (a, ), (c,d) € A.and that (a, 6)R(c,d). Then (a, 8)R(c,d) => ad = be = ch = da = (c,d)R(a,)), so R is symmetric. Finally, let (a,), (c,d), (e, f) € A with (a, b)R(o, d) and (c,d)R(e, f), Then (a, b)R(c,d) = ad = be and (c, d)R(¢, f) = cf = de, 80 adf = bef = bde and since d #0, we have af = be. But af = be = (a,5)R(e, f), and consequently R is transitive. It follows from the above that R is an equivalence relation on A. (b) [(2,14)} = {(2,14)} ((-3,-9)] = {(-3,-9), (-1, ~3), (4,12)} (4,8) = {(-2,-4), (1,2), (8,5), (4,8)} (c) There are five cells in the partition — in fact, A= [(-4,~20)] U [(-3, -9)] U [(-2, -4)] U (-1, -12)} U [(2, 14). (a) For all X © A,BN.X = BAX, so XRX and R is reflexive. If X,Y € A, then XRY =2 XNB=YNB = YNB = XNB => YRX, so Ris symmetric. And finally, if W,X,Y C A with WRX and XRY, then WN B=XNBand XNB=YNB. Hence WNB=YNB, so WRY and R is transitive. Consequently R is an equivalence relation on P(A). (bo) {0,433} U {£2}, (1,5}3 U {2}, {2,3}} U {1,2}, (1,2, 3}} (c) [X] = {{1,3}, (1,3, 4}, (1,3, 5}, (1, 3,4, 5}} (a) 8~ one for each subset of B. ®) (B)() - The factor (}) is needed because each selection af size 3 should account for only one such equivalence relation, not two. For example, if {a,),c} is selected we get 196 12, 13. 14, 15. 16, it. the partition {a,b,c} U {d,e, f} that corresponds with an equivalence relation, But the selection {d,e, f} gives us the same partition and corresponding equivalence relation. (b) ()[. +3] = 4({) - After selecting 3 of the elements we can partition the remaining 3 in (2) 1 way into three equivalence classes of size 1; or (i) 3 ways into one equivalence class of size 1 and one of size 2. © (a+ =2() @ DE) +4@) +20) + +@) (a) 21° = 1024 (b) DE, S(5, i) = 1415 42541041 = 52 (c) 1024 — 52 = 972 (a) 8(5,2) = 15 (©) i194) = 1474641215 (HOR, SBi)=14341=5 (e) Dh SG) =1t3+1=5 (b) (Shes SB.) — (ha S24) = 3 300 (a) Not possible. With R reflexive, |R| > 7. (b+) R={(e,z)e €Z1sest. (c) Not possible. With ® symmetric, [R| — 7 must be even. (@) R= ((z,2)e €Z1 z,y € Ai, for some i € [=> y,2 € Aj, for some i € I => yRz, 60 R is symmetric. If zRy and yRz, then 2,y € Aj and y, 2 € A; for some i,j € I. Since A;M A; contains y and {Aj}ier is a partition, from A; A; = 0 it follows that A; = Aj, so i= j. Hence 2,2 € Aj, 80 #Rz and R is transitive, Let P = UjerA; be a partition of A. Then E = Ujer(4; x A,) is an equivalence relation and f(E) = P, 90 f is onto. Now let E;,E2 be two equivalence relations on A. If E, # E;, then there exists x,y € A where (2,y) € H, and (2,y) ¢ Ey, Hence if f(E,) = P, = UierA; and f(y) = Py = UjerAj, then (2,4) € By => ,y € Ay, Fi € I, while (2,y) ¢ Ey => Vj € J (@ GA; Vy ¢ Aj). Consequently, P, # Ps and f is one-to-one. Proof: Since {B,, Bz, Bs,..., By} is a partition of B, we have B = ByUB,UBsU...UB,. Therefore A = f-'(B) = f-(B,U...UB,) = f-(B,)U...Uf"(B,) [by generalizing part (b) of Theorem 5.10}. For 15 i (a,a) € Nie/R; for all a € A => (a, a) € R; for alla A and all i € I <=> R; is reflexive for all i € I. (i) (a) False. Let A = {1,2},Ri = {(1,2)}, Ra = {(2,1)}. Then R, U Ry is symmetric although neither R; nor Ry is symmetric. Conversely, however, if each R;,i € I, is symmetric and (2, y) € UjerRj, then (2, y) € R; for some i € I. Since R; is symmetric, (y,z) € Rj, so (y,z) € UserR; and UserR; is symmetric. (b) If (2,y) € MicrRi, then (z,y) € Ri, for all i € I. Since each R; is symmetric, (y.2) € Rj, for all i € L, s0 (y,z) € MierR; and NierR; is symmetric. ‘The converse, however, is false. Let A = {1,2,3}, with Ri = {(1,2), (2,1),(1,3)} and R; = {(1,2),(2,1),(3,2)}. Then neither R, nor Ry is symmetric, but Ry Rs = {(1,2),(2,V)} is symmetric. (iii) (w) Let A = (1,2,3} with R, = {(1,2)} and R) = {(2,1)}. Then both Ry, Ra are transitive but R, UR, is not transitive. Conversely, for A = {1,2,3} and Ry = {(1,3)}, Re = {(1,2),(2,3)}, Ri U Ra = {(1,2),(2,3),(1,3)} is transitive although Ra is not transitive. (b) If (x,y), (y,2) € Migs Ri, then (x,y), (y,2) € Ry for all i € J. With each R;,i € I, transitive, it follows that (x, 2) € Ry, 80 (x, 2) € Nie/Ry and NyerR; is transitive. Conversely, however, {(1,2),(2,3)} = Ry and R, = {(1,2)} result in the transitive relation Ri Ra = {(1,2)} even though R, is not transitive. (i) The results for part (i) follow in a similar manner. (a,c) € Rao Ry => for some b € A, (a,b) € Ra, (b,c) € Ri. With Rj, Ry symmetric, (b,a) € Ra,(e,b) € Rr, 80 (ca) € Ry oR, © Ryo Ry. (c,a) € Ryo Ry => (c,d) € Ray (d,a) € Ry, for some d € A. Then (d,c) € Ro,(a,d) € Ry by symmetry, and (a,c) € 199 10. Ryo Ra, 80 Ry Ri S Ry 0 Ry and the result follows. (a) Reflexive, symmetric. (b) Equivalence relation. Each equivalence class is of the form A, = {t € 7| the area of t=ryr€R*}. Then T =Ujer+A,. (c) Reflexive, antisymmetric. (a) Symmetric. (©) Equivalence relation. {(1,1)] = {(2,1), (2,2), (8,3), (4,4); ((2,2)] = {(1,2), (2, 1), (2, 3), (3, 2), (3,4), (4,3); (1, 3)] = {(1,3), (8, 1), (2, 4), (4, 2)}; (2, 4)] = {(,4), (4). A=[(,0]V (A, 2) 4 (2,3) U0,4)). (ca) € (Ry 0 Ra)° => (a,c) € Ry oRy + (a,b) € Ry, (b,c) € Ra, for some bE Be (c,b) € 5, (6, a) € RG, for some b € B => (c,a) € R§o Ry. (a) If P is a partition of A then P < P, so R is reflexive. For partitions P,P; of A if P, < P; and P; < P, then P; = P; and R is antisymmetric, Finally, if P,P), P, are partitions of A and A-RP;, PRPs, then P; < P; and P; < Py, so each cell of P; is contained in a cell of Py and P; < Py. Hence R is transitive and is a partial order. ®) . ZN, ~ 3 Py ie Let U = {1,2,3,4,5},4 = PU) — {4,0}. Under the inelusion relation A is » poset with the five minimal elements {z},1 < 2 <5, but no least element. Also, A has five maximal elements ~ the five subsets of Uf of size 4 - but no greatest element, (b) (G1) = {11}; (2.2)] = {(1,4),(2,2),(4.))5 ((8,2)] = {€,6),(2,3),(3,2),(6.1)}; [(4,3)] = {(2,6),(3,4),(4,5),(6,2)}. n=10 (a) For each f € F,|f(n)| < 1/f(n)] for all n > 1, a0 FR, and R is reflexive. Second, if f,g € F, then fRg => (f € O(g) and g € O(f)) = (g € O(f) and f € O(e)) => 9Rf, 60 R is symmetric. Finally, let f,g,h € F with fRo,oRf,gRh, and hRy. Then there exist m,,m2 € Rt, and ky,k, € Zt so that [f(n}]| < milg(n)| for all n > ky, and |g(n)| < ma|h(n)| for all n > ky. Consequently, for all n > maz{hy, ka} we have |F(n)| < my|g(n)| < mymz|h(n)| so f € O(h). And in a similar manner h € O(f). So FRA and R is transitive. {b)_ For each f € F, f is dominated by itself, so [f]${f] and Sis reflexive. Second, if {a}, {h] € #* with [g}S{h] and {h]S{g}, then gh (as in part (a)), and {g) = {A}. Consequently, Sis antisymmetric. Finally, if [f],[y], [A] € ¥’ with [f]5[g] and [g]5{h], then f is dominated 200 by g and g is dominated by h. So, as in part (a), f is dominated by A and [f]S{h], making S tronsitive, (c) Let f, fis fa € F with f(n) = n, fi(n) = +3, and fa(n) = 2—n. Then (fi+-Aa)(n) and fit fa ¢ [f], because f is not dominated by fi + fa 5, ‘Kdjacency [Tndex . iseaicy | tae List | List eee ea ee eer ile i a Wt TT 2 iy 2] 3 j2i2 Hl a aia 2{ 3 |2}2 @{S} 1 [3/31 M)]31 5 [sls] @js} 1 [3}3 4} 4 [4] 5 Al te Waite 4] 4 jale 5} 5 |5i6 aa leis 5} 5 [5l7 6] 3 |6/8 | ale 6| 1 lels 75 J ald 201 12. 13. 14 (a) For each v € V,v = v so oRv, If vRw then there is a path from v to w. Since the graph G is undirected, the path from v to w is also a path from w to v, so wRv and R is symmetric. Finally, if vRw and wRz, then a subset of the edges in the paths from v to w and w to ¢ provide a path from v to x. Hence R is transitive and R is an equivalence relation. (b) The cells of the partition are the (connected) components of @. (a) Pr: {51,8387}, {82) 8485, 96, 88} Py: {51,55 87}, {825 $5) 5}; {84 36} {51}, {85187}, {525 $5, 58}, {54h {56} =P vy fe a ijoi $3 3) 1 0 fs 8310 0 83 | 43 32/1 0 ss | 82 83] 0 0 se _|sa_ si] 0 (b) ys {or}sssyr)s (62545598), {54)5 (80) oy Pat fansite} (sates) (oe 40) 00 0,0 Pri {8128387}, {82) 84) $55 80555} 01 | 0,0 202 Hence w(s4,000) = 001 # 000 = (s6,000), s0 000 is a distinguishing string for 2, and se. 15. One pombe onder x 10,38, 6, 7,941,445, 2 where program 10 is run first and programa 2 last. 16, (a) @)n=2: (i)n=4 (ii) n=6: 4 6 I 2 e 2 3 L t 4 (iv) n=8 (vi) n= 30: 16 2 : a 4 6 ‘ : 2 t 4 : (viii) n = 24: (vill) n = 30 (ix) n= 32: 32 a sos Oo it. Se | {b) For 2. 1, there are 3" ordered pairs in the relation R. Since | = n,{P(U| = 2" and so there are (2")(2") = 4" ordered pairs of the form (A,B) where A,B CU. From Exercise 18 (above) there are 3° order pairs of the form (A, B) where AC B. [Note: If (A,B) € R, then so is (B,A).] Hence there are 3° + 3" — 2" ordered pairs (A,B) where either A C B or BC A, or both. We subtract 2* because we have counted the 2° ordered pairs (A,B), where A = B, twice. Therefore the number of ordered pairs in this relation is 4" — (2-3" — 2") = 4" — 2-3" 42", (a) There are 2” equivalence classes ~ one for each subset of B. (am (a) @) BRARC; (ii) BRORF BRARORF is a maximal chain. There are six such maximal chains. (b) Here 11 R 385 is a maximal chain of length 2, while 2 R 6 R 12 is one of length 3. The length of a longest chain for this poset is 3. (©) @OC {1} ¢ (4,2) ¢ {1,2,3) Cus (ii) OC {2} {2,3} ¢ {12,3} Cu. ‘There are 4! = 24 such maximal chains. (a) nt If c; is not a minimal element of (A,), then there is an element a ¢ A with aRe;. But then this contradicts the maximality of the chain (C,R’) ‘The proof for c, maximal in (A, 2) is similar. Let a)Ra,R...Ra,1Ra,, be a longest (maximal) chain in (A,). Then a, is a maximal element in (A, R) and a,Ro,R...Ra,.1 is & maximal chain in (B,R’). Hence the length of a longest chain in (B,?’) is at least n—1. If there is a chain bR’,R’ ... R'b, in (B,R') of length n, then this is also a chain of length n in (A,). But then b, roust be a maximal element of (A,R), and this contradicts &, € B. (@) {2,35}; {5,6,7,11}; {2,3,5,7,11} 204 25. 26. 27. (b) {(1,2},{3,4}), 11,2,3}, {2,3,4}}; 4 (©) Consider the set M of all maximal elements in (A,R). If this set is not an antichain then there are two elements a,b € M where aRb or 6Ra. Assume, without loss of generality, that @Rb. If this is so, then a is not a maximal element of (A, R). Hence (M,(M x M)NR) is an antichain in (A,R). ‘The proof for the set of all minimal elements is similar. Ef on=1, then forall x,y A, if e#y then 2Ry and yRe. Hence (4,R) isan antichain, and the result follows. Now assume the result true for n =k > 1, and let (A,R) be a poset where the length of a longest chain is k+1. If M is the set of all maximal elements in (A,R), then M40 and M isan antichain in (A,R). Also, by virtue of Exercise 23 above, (A — M,R’), for R! =((A—M)x(A~M))NR, is a poset with k the length of a longest chain. So by the induction hypothesis A—_M = C,UC,U...UCg, a partition into k antichains. Consequently, A= C,UC,U...UC,UM, a partition into k +1 antichains. (a) Since 96 = 25-3, there are }('2) = 192 ways to totally order the partial order of 12 positive integer divisors of 96. (b) Here we have 96 > 32 and mus: now totally order the partial order of 10 positive integer divisors of 48. This can be done in }("f) = 42 ways. (c) Aside from 1 and 3 there are ten other positive integer divisors of 96. The Hasse diagram for the partial order of these ten integers ~ namely, 2,4,6,8,12,16,24,32,48,96 ~ is structurally the same as the Hasse diagram for the partial order of positive integer divisors of 48. So as in part (b) the answer is 42 ways. (a) Here there are 14 such total orders. (a) There are n edges ~ namely, (0,1), (1,2), (2,3),-..,(a = 1yn). (b) The number of partitions, as described here, equals the number of compositions of n. So the answer is 2-1. (c) The number of such partitions is 29-1 . 25-1 = 64, for there are 2°-! compositions of 3 and 2° compositions of 5(= 12 - 7). 205 PART 2 FURTHER TOPICS IN ENUMERATION CHAPTER 8 ‘THE PRINCIPLE OF INCLUSION AND EXCLUSION Section 8.1 Let ¢ € S and let n be the number of conditions (from among ¢,¢2,¢s,¢4) satisfied by #: (n= 0): Here « is counted once in N(@;252,) and once in N (22,2364). ( If z satisfies c; (and not cz,¢5,¢4), then x is counted once in N(@€3%4) and once in N(créx63%). If satisfies ¢;, for i # 1, then is not counted in any of the three terms in the equation. (n= 2,3,4): If 2 satisfies at least two of the four conditions, then z is not counted in any of the three terms in the equation. ‘The preceding observations show that the two sides of the given equation count the same elements from $, and this provides a combinatorial proof for the formula N(@@%4) = N(crBxtats) + N(Gi@rtst.)- Proof (By the Principle of Mathematical Induction): If t = 1, then we have W = N(@) = the number of elements in S that do not satisfy condition cy = N — N(cy). This is the basis step for the proof. Now assume the result true for k conditions, where k (> 1) is fixed but arbitrary, and for any finite set $. That is, N(@2at... 2) = N — [N(cx) + Nex) + N(cs) +--+ + N(ce)] + [IN (crea) +N (eres) +++ +N (cree) +N (crea) +: + +N (cace) ++ +N (ecg) +> + +N (c4-102)]— [N(creaes) +--+ N(ch-2ce-iee)} +++ + (- TAN (cxcace--- cx) ‘Now consider the case for ¢ = k +1 conditions. From the induction hypothesis we have N (GG. Zecets) = N(cu41) ~ [N (creas) + N(caceer) + N(cackes) + °° + N(ceeees)] IN (ereacnys) + N(crcaciga) + +++ + N(crcecegs) + N(cacscess) + +++ + N(creecess) here N(eacxcugs) + +++ + N(ce-acncugs)] ~ [N(ereaeascees) +07 + N(ch-a¢h-164¢e41)] + +++ + (~1)EN (creacs »-. cxceys)- Subtracting this last equation from the one given in the induction hypothesis we find that N(GjGats---Bitiin) = N(Gskaea.. Ge) — NGtres..-Fecues) = N ~[N(cx) + N(ea) +++ + N(ca)] + [M(ciea) + N(cres) + +++ + N(cica) + N(caes) tore (cacy) +++ N (cae) +----+N(ce-104)} ~[N(ereres) +++ N(cn-2ee-ace)] 007+ (SDN (ereaes « C4) N (eee) +EN (ereear +N (exenar) + --+N (exeets )I— EN (creaciss) + N(Cxeacigs) + +++ + N(Ch-aCeeeea)] + 20+ (1) N (erences. + CeCe41) = 209 N~[N(c1) +N (ca) -+-+-+ N(cu) + N(cuss)] +1 (crea) +++ +N (crea) + N(crcear) t+ N(cx-1cee1) + N(cecegs)} —[N (create) + +++ + N(ce-ach-r04) bo +N (cu-seuceya to + (=D)EN (cyeze3 ... ceCe41 So the Principle of Inclusion and Exclusion is true for any given finite set $ and any number # (> 1) of conditions ~ by the Principle of Mathematical Induction. N= 100 N(ex) = 35; N(c2) = 30; N(es) = 30; N(c4) = 41 1; N(cxes) = 13; N(czes) = 10; N(caea) = 145 N(oocs) = 10. = 6; N(cresca) = 6; N(caesea) = 6 (a) N(Gikresta) = N (Gees) — N(Gieatse4) N(@itats) = N -[N(cr) + N(62) + Nca)] +{N (e102) + N(caca) + N(e2ca)] ~ N(cxcace) = 100 — [35 + 30 + 41] + [9 +13 + 14] -6 = 100 ~ 106 + 36-6 = 24 N(@:@034) = 12 (as shown in Example 8.3) So N(@e,¢s@4) = 24-12 = 12 Alternately, NG N ~ [N(c1) + N(e2) + N(ca)] + [N (ere2) + N(cree) + N(e2e4)] — N(crezea); 50 N(@éaes@s) = N(es)—[N (eres) + N(cres) + N(csea)] + [N(ercres) + N(cresca) + N(cresca)] —N(cyeregea) = 30 ~ (11 + 10 +10] + [5 +646] -4=30~31417-4=12. (b) N (Giza) = N - [N(cx) + N(ca)] + N(erea), 80 N(Zre2e52) = N(c26s) ~ [N(ereaes) + N(cacses)] + N(crercscs) = 10 — [5 + 6] +4 =3. cx: Staff member brings hot dogs cq: Staff member brings fried chicken eg: Staff member brings salads ce: Staff member brings desserts N=65 N(c) = 21; N(ea) = 35; N(¢s) = 28; N(c4) = 32 N(ce2) = 13; N (exes) = 10; N(cres) = 9; N(cxca) = 12; N(caca) = 175 N(caea) = 14 N(cxe2¢3) = 4; N(cxcocs) = 6; N(cresce) = 5; N(cacgca) = 7 N(exeyeae4) = 2. (8) N(Geests) = G5 ~ (21+ 35+ 28-452] + [13+ 10494 12417414] ~ [446454742 = 65-116 +75—22+2=4. (b) N(Exbsi4) = N ~[N(c2)+N(ca)-+N(ca)] +[N (e200) + N(caca) + N(esc4)] ~N (cacaca), 80 N(cxEx63t4) (es) LM (exea) +N (cies)-+ N (ere4)] + LN (creat) +N (ereaca) + N(eresca)]— N(cycq¢3¢4) = 21 ~ (13 + 10 + 9] + [4464 5]-2= 21-324+15-2=2. (c) N(Zieaés@s) = N(e2) — [N(ere2) + N(eaes) + N(eaes)] + [N(ereaes) + N(eveaea) + N(cxesea)} — N(creea¢s) = 35 ~ [13 +12 +17] + [446+ 7] -2= 95 -42417-2=8 210 N(ca)—[N (eres) +N (cats) +N (cses)) +N (creates) +N (creaca) +N (creaca)]~ — [10 + 12 + 14] + [445 +7]—-2 = 28-36 +16 -2=6. N(c4)—[N (crea) +N (cars) +. (caca)] + [NV (crcace) +N (cresca) +N (eresca)] — —B+17 +14] + [6+54+7]-2= 32-404 18-2=8. So the answer is 2+8+6+8= 24. (a) ci: number n is divisible by 2 cz: number n is divisible by 3 es: number n is divisible by 5 N(cy) = [2000/2] = 1000, N(cs) = {2000/3] = 666, N(cs) = [2000/5] = 400, N(ere2) = |2000/(2)(3)| = 333, N(caes) = |2000/(3)(5)} = 133, N(cics} = |2000/(2)(5)] = 200, N(e,e2ca) = {2000/(2)(3)(5)| = 66. N(&é2¢3) = 2000 — (1000 + 666 + 400) + (383 + 200 + 133) ~ 66 = 534 (b) Let c1,02,¢5 be as in part (a). Let cq denote the number n is divisible by 7. Then N(ca) = 285, N(crca) = 142, N(caea) = 95, N(eaca) = 57, N(crcaea) = 47, N(cxcace) = 28, N(cacaca) = 19, N(creresce) = 9. N(&e,85¢4) = 2000 ~ (1000 + 666 + 400 + 285) + (933 + 200 + 133 + 142 +95 + 57) — (66+ 47 + 28 + 19) + 9 = 458 (c) 584-458 = 76. ayaa tant ty = 19. (@) O 6; ¢2: #227; es: 2925; i 426. war )= (8 N(ey), Nea): ex tea tes baa 7 Nae) ayt+atratm= cr) =) N(ea): a1 +224 23+24=6: (*47) = (3) Nea): 21+ a24+25+24=8: (37) = (3) N(eyes) = 1 N(cies) : 21+ 22t20424=2: (7%) = (2) 21b . a. 10. N(cres) : y+ 22+ 03+ 24 = Cr)=@ N(cxes) = (f), N(eaca) = 1, N(caea) = N(Geaeaes) = (i) ~ (2(7) + (@) + ()1-+ 201+ () + Gh ‘Let c, denote the condition where an arrangement of these 11 letters contains two occur- rences of the consecutive pair IN. Define similar conditions ¢2,¢3,¢4,¢s, and cs, for the consecutive pairs NI, 10, O1, NO, and ON, respectively. Then N = Sy=111/(28) Nex) = 91/(28), S; N(cxe2) = N(exes) N(Csco) = 0, N(cxea) S3 = Sy = Ss = Se=0. G)ernenty N(cye0) = N(caca) = N(exes) = N(caes) = N(cses) = N (cae) = 71/21, and S, = (6)(71/2!}; and Consequently, the number of arrangements under the given restrictions is N(& So— Si + Sr = [111/29 - (Slo! 4, 460, 400. ) !)*] + (6)[7!/2!] = 4,989,600 — 544,320 + 15, 120 ‘The number of integer solutions for 21+ #2 +25 +24 = 19, -5 <2, $10, 19 (or 25210). N(ci) is the number of integer solutions for yy +29 +25-+...+27 = 21, 05m, 0S % for 2 4 (or y; > 3) and yj > 0 for 1 4. Then i<4 let ¢; denote messed = (2) 0) +00: Let cy denote that the arrangement contains the pattern spin. Likewise, let ¢2,¢3,¢4 denote this for the patterns game, path, and net, respectively. N(&\2,éa¢4) = 26!~[3(23!)+ 24] — (201 +21!) Let a,b,c,d,e, f denote the six villages. For 1 19 (> 20), ¢= 1,2,3,4. Then M(q) = ("2") = (B), isis 36) New) = ("5") = (si 6. Then the number of integer solutions for tht tat us tue t us = 15, where 0 < yi $5 for 1 n=2. (a) (6000) = 9(2* - 3 - 5) = 6000(1 — (1/2))(1 — (1/3))(1 — (1/5) = 1600. (b) 6000 ~ 1600 — 1 (for 6000) = 4399. Proof: #(n™) = (n™) TI (1 a But for every prime p it follows from Lemma 4.3 that if, = pin then pin. Therefore, @") Tla- pian $n -g(n). mmo TT a 4(17) = 4(82) = ¢(48) = 16. For ¢(n) to be a power of 2 we must have one of the following: (1) n=24, for k 21; 215 29, (2) n=pip2-++ ps, where t > 1 and each prime p; has the form 2 +1, for 1 1, t > 1, and each prime p; has the form 24 + 1, for lsist. If 4 divides 4(n) then one of the following must hold: (1) nis divisible by 8 (2) nis divisible by two (or more ) distinet odd primes; (3) n is divisible by an odd prime p (such as 5, 13, and 17) where 4 divides p~ 1; and (4) nis divisible by 4 (and not 8) and at least one odd prime. For 1 < i < 5 let condition o; denote the situation where the seating arrangement has family i seated all together. Then the anawer to this problem is N(22,2,2405)- Here Sp is the number of ways one can arrange 15 distinct objects around a circular table. This is (15 — 1)! = 14! N(cx) = 6(13 — 1)! = 6(12)), for there are (13 — 1)! = 12! ways to arrange 13 distinct objects [family 1 (considered as one object) and the other 12 people] and 6 ways to seat the three members of family 1 so that they are side by side. Consequently, 5; = (°)6(12!). Similar reasoning leads us to N(cie2) = 6710!) Sy = (ero) N(creaes) = 6(8!) Ss = (5) 6%8!) N(ciexescs) = 66!) Sa = (‘)o4(6!) N(creaeacacs) = 64!) Sy = (°) 64). ‘Therefore, N( Wf) = So ~ S; + Sy ~ Sy + Se - Ss = Fh.o(-1)'(*)6(14 - 2)! = 87,178, 291, 200 ~ 14, 370, 048, 000 + 1, 306, 368, 000 ~ 87, 091, 200 + 4, 665, 600 — 186, 624 = 74,031, 998, 976. Section 8.2 Eq = 168; By = 205; By = 40; Ey = 10; Ey= 0; By =1. LB = 04 =. & (a) Let denote the condition that the two A’s are together in an arrangement of ARRANGEMENT. Conditions ¢2,c3,¢, are defined similarly for the two B's, N’s, and Ris, respectively. N = (111)/{(2!)"] = 2494800 For 1 + (I(S-7-6-5)e4 +... + (3)(8N)a* = Theo (1) Paz". (b) Eo (1) Pride! (Cy, 2) = 14 40 + 3a? = r(Cy,z) (a) (i) (+22) (i) 14 82 4 142? + 42° (ii) 1492 + 257+ 2125 (iv) 1+ 82 + 162? + 72° (b) Ifthe board C consists of n steps, and each step has & blocks, then r(C,2) = (1+ ke)". (a) Select the & row positions in @) ways. As we go from row 1 to row 2 to ... to row 1m, for the first row containing a rook there are n column choices. For the second such row there are n—1 column choices, ..., and for the row containing the &-th rook there are n—k+1 column choices. Hence we can arrange the & identical nontaking rooks on © in (F)@\n- 1) =F +1) = CD(T) waye (b) r(Cy2) = 1+ (rinje + (4) (m)n — De? + tytn =A(n = 229 +--+ (M)(n)n — Ife — 2) +++ (es + 1)e™ = (3) + (Free + (F) 0 - Ye? + (Joa I(u = 2) + + (s)(a)(n = 1Xn—2)--- (n= m+ Da” = Do (Fane -2)--- (nF Det = Tita (7) 220 [Perl SQL (1) Jeanne (2) Charles (3) Todd (4) Paul (3) Sandra r(C,x) = (1+ 4a + 32°)(1 + de +22”) = 1+ 80 + Qe? + 202° + 624 For 1 9 (or n; > 10). 7437-1) _ (43) saw =( 37 )-(@) (cx) is the number of nonnegative integer solutions for 2) +2, +23 +...+27 = 27 here 21 +10 = ny, and 2; = nj for 2 5 (or yi 2 6) and yj 2 0 for all 1 $j $4, j #4. Then, for example, N(c1) is the number of nonnegative integer solutions for toy + wy + toy + oy = 10. [Here w +6 = y; and wi = yj fori = 2,3,4] So N(a) = (“137) = (2) and 5, = (1) (8). Similar arguments show us that N(c\c) = (477) = ({) and S, = (3) ({); and S,=S,=0. Therefore the number of distributions for the given restrictions is woos) =(*)-('('8) (0). 223 and Joseph and Jeffrey can arrange the 24 balls in reareons|()-() 60) +) Here 5 = {1,2,3,...,1000} and NV = Sp = 1000. We define the conditions c1, ¢, ¢3 on the elements of S as follows: eu: n€ Sand nis a perfect square; ox n€ Sand nis a perfect cube; and ex: n € Sand nis a perfect fourth power. Then N(e) = 31, N(er)=10, N(es)=5, N (cre) = 3, N(eres) = N(cs) =5, Nieres) = 1, and N(cieacs) = N(eaes) = 1. Consequently, N(E:&2%3) = So— Si + Sy — Sy = 1000 ~ [31+ 10+ 5] + [3 +5+1]—1 = 1000-46 +9~1 = 962. Let ¢ denote the occurrence of the pattern i(i4+1) for 1 m and 2; is not in the selection. N=() Mead=()asism s = ()(5') 225 12, 13. i. 15. N(cjiej) = (*2),1 Si <5 Sm; S, = (5) (777), ete (52) = NG@ie-.-&n) = Dhol) (7). (2) Define conditions ¢:, 1 1, Then $n) = TT ye (1 ~ (/p)) $ _ _ contradiction! (a) S = {1,5,7, 11, 13,17} Sy = {2,4,8, 10,14, 16} Ss = {3,15} Se = {6,12} {9} Six = {18} 16. it. 18. (b) [51] = 6 = 6(18) |Ss| = 2 = 4(6) [52] = 6 = (9) {Sel = 2 = 9(3) (a) Let k € Z+,1 < k < m. Then ged(k,m) = d < m, for some d € Dy. If k € Sa,,Sa, then dy = ged(k,m) = dy. So the collection Sz,d € Dra, provides a partition of {1,2,3,4,...,m—1,m). (b) Recall that ged(n,m) = d if and only if ged(n/d,m/d) = 1, s0 [Sel = [{n]0 1 and m is odd, Then 2n = 24m and (2n) = (24°) ~ P)b(ra) = 244 (rn) = 224) 9 (on) = 2[2*(1 — })o(m)] = 2[g(24mn)] = 24(n). (b) When n is odd we find that $(2n) = (2n)(1~4)[](— >” where the product is taken a over all (odd) primes dividing n. (If n = 1 then [](1 > is 1.) But (2n)(1—-HTTa— 5 = Pin pin nf] - 2) = 6m). win PB Proof: Let a = pip! ...p™ and b= ph pi? ---pM, where pi,p2,---,P: Ps are distinet primes, and shy gy cosas aves EN. Then c= ged(a, 8) = pan pinnae) nn) So 4(ab)¢(e) = bret ppm. mmm) Gg A area p) and 40 Sgt sovive=| eo-2||n4 w-4 (n. sein. For 1 0: (The same type of argument applies if 0 9) =1-@)- = SH=Hd = 18 2 0.326591. Alternately, Pr(¥ > 3 PO cay = OG og FPG G+ = GPF DTG? + =e a {e) Pr(¥ 2 5) = Des(F)"1(8) = GG) + (HP) + HG) + D+ G+ GP += OO = Gt = Bh ao t0cba2. 233 29, 30, 31. 32. 33. _ Pr¥ > 5 and ¥ > 3) (@) Pr 2 SY 28) = “Sasa Gy. ft (e) Pr(¥ > )lY 2 4) = (4 = (4. (© Var (Y) = 9/p*, where ¢ = 1—p = 7. So Var (¥) = (7)/(2Y = F/G) = QB) = F- Consequently, oy = \/28/9 = 1.763834. (a) The differences are 3—1,6~3,8—6,15—8, and 15-15 — that is 2,3,2,7, and 0, where2+34+2+7+0=14. (b) {35,815} (c) {lta,lta+bl+atbteltat+b+c+d} = Pr(y 2 ay/PHY 23) = Gy = 4 Using the ideas developed in Example 9.17, we consider one such subset: 1<1<3< 6 < 10 < 15 < 30 < 42 < 50. This subset determines the differences 0,2,8,4,5,15,12,8, which sum to 49. A second such subset is 1 $7 <9 < 15 < 21 < 32 < 43 < 50 < 50, which provides the differences 6,2,6,6,11,11,7, 0, which also sum to 49. These observations suggest @ one-to-one correspondence between the subsets and the in- teger solutions ofc + cp +cat... ca = 49 where c,ce > 0 and oq >2 for 2 5. (b) Q-z+a2?-29+-)Q-242?-23 +...) = wig = (1 +2)", the generating function for the sequence (77), (57), (3), (3),-.~ Hence the convolution of the given be ir of sequences is co, ¢1, 62... Where @=C apemet) 2 -1r(“) = (-1)\(n+1),neN. {Thies the alternating sequence 1, 2,3, —4,8,-6,7,..-] Section 9.3 7; G+; 52; FAL+N; 4435 44241; 4414144; 34941; 34-242; 8424141; BEIFD 4141; 2424241; 221414]; QL ELL 4 4; 1414141414141 (a) f(@) = (1/0 ~ 21/0 ~ 29/0 ~ 2)9}-+ = A/G ~ 27) {b) o{z) = (142?) + 241 +2°)-- = TNE, +2) (c) A(e)=(+z)(1 +291 +25)-- (L$ 24) The number of partitions of 6 into 1’s, 2’s, and 3's is 7. (@) G/a~*))0/0 -#)1N/G - A/C ~ #7) (>) / ~ AYE /G = #17 — EEA 7, (a)and(b) (ita? +at+a%+...)(L+atta%+.. tees e + = Ma ee (a) fa) =(tete+...¢ 21 e227 ¢28+...¢2%) = T+ of tae% +... + 2%) = 1 (1 — 2)/(1 — 24)] (b) TAG +24 42% 4.04 28) = TAI ~ 2) - 2)] Let f(z) be the generating funcion for the number of partitions of n where no summand appears more than twice. Let g(z) be the generating function for the number of partitions of n where no summand is divisible by 3. Bee dei (l+z+27\(l+2? avi +2°)(ltattzt) bgp eet = oe) Let f(z) be the generating function for the number of partitions of n where no summand is divisible by 4; (2) is the generating function for the number of partitions of n_ where no even summand is repeated (odd summands may be repeated). $@)= ate eae ie 235, 10. gis: ae pie (1 +29) = he ES ae ‘This result follows from the one-to-one correspondence between the Ferrers graphs with summands (rows) not exceeding m and the transpose graphs (also Ferrers graphs) that have m summands (rows). Consider the Ferrers graph for a partition of 2n into n summands (rows). Remove the first column of dots and the result is a Ferrers graph for a partition of n. This correspondence is one-to-one, from which the result follows. Section 9.4 (a) oF (b) && @ew (d) = (e) ae" (f) re* (a) fle) = 3e* = 80%, 82, so f(x) is the exponential generating function for the sequence 3,3?,3°,... (>) f(a) = Ge 3c = 6 DE, SA aE, 2H, so f(z) is the exponential generating function for the sequence 3,24, 138,...,6(5") ~ 3(2%),... (©) 1,1,3,1,1,1,1,..- (a) 1,9,14,-10,24,25, 28... () f)=leetergert+ function for the sequence 0!, 1!,2!,3! (£) f(2) = 3[1 422+ (22)? + (22) +...]+ Dino , 50 f(z) is the exponential generating function for the sequence 4,7,25,145,...,(3n!)2"+1,... (a) 2) = f(z) + [3 ~ aal{z°/3!) (b) of) = f(z) + [-1 ~ a3](2°/31) = e* — (12625)/3! (c) g(a) = 2f(a) + [2 — 2a|(a"/1!) + [4 — 2aa}( 22/28) (G) oz) = 2f(z) + Be? + [2— 2a — B(x" /1!) + [4 — Zag ~ 3](x?/2!) + [8 — ay ~ 3]{z°/3!) fe) (+ (2/2!) + (2°/3)) +...) =(e — Ht =e — (Jet + (Je (er + ((). The cocfficient of 219/12! in (e* ~1)* is 41? ({)3 + ($2 - (Za (b) How many onto functions are there from A = {1,2,3,...,12) to B= {red, white, blue, black}? (©) fle) = (+a t (27/21) +... PG + (22/21) + (tA + , 80 f(z) is the exponential generating Mee +) /2P = 236 10. (1/4)(e™*)(e* + 2 + e-%*) = (1/4)(e + 2e* + 1). Here the coefficient of 219/(12!) is (1/4)[4!? +2(2!)] and this counts the number of signals where the number of blue flags is even and the number of black flags is even. oz) = (L42+(z7/21)+....)(e+ (09/31) +...)! = 2[(e* ~e7*)/2}? = (1/4)(e —2e** +1). ‘The coefficient of 2!7/(12!) in g(x) is (1/4)[4'? — 2(2!)], and this counts the signals where the numbers of blue and black flags are both odd. Consequently, the number of signals where the total number of blue and black lags is even is (1/4)[4? + 2(2"*)] + (1/4)[4"? — 2(2"9)] = (1/2)(49). We find that oe is ltatet gate OFFA +OE+ ONE +, so 1/(1 ~ z) is the exponential generating function for the sequence 0!, 1!,2!,3!,.... (a) @) (1+27(Q +2 + (27/21) (i) (Lp 2d x + (27/21) +x + (@?/2!) + (29/31) + (4/41) (ii) + 2p +24 (0/2) (b) (L+z)-(1+24(2?/2!))-(L+2+4(x?/2!)+(29/3!) + (24 /4!))-((2?/2!) +(29/3!) +-(24/4))). uu The answer is the coefficient of i in (+ at4...4 48)". A(z) = F(z)g(x) = co + ez + co(z*/2!) + c9(29/3!) + ..., where en(2"/n!) = heal afi) ( Oya [(n — 3!) = [Staub ne)/Ciln — s)DJa" = [Ltaolnl/Cil(n ~ s)]asb.d(2" /nl) = [Choo (F) aba dl(2*/nl) (a) (1/2)/9% + 1)/(9) (b) (1/4)[3% + 3]/(3°) fe) (1/2) — 11/(8%) (a) (0/2)13* - )03") {e) (2/2)[3” + 1]/(3") (a) F(x) = (a + (27/31) + (2/51) +...) (a+ (29/28) + (29/98) +...) eK e*) = (1/2)(e* — 1)*(€?*) = (1/2)(e* — 1Y(e% — e*) = (1/2)(e% — e* ~ €* + €*). ‘The answer is the coefficient of 2%/(20!) in f(z) which is (1/2)[4— 3° — 2 4 1], (b) ghz) = (Lt a + (29/3!) + (ot /At) +.) = (e* ~ (27/2))! = ef - (JePa(x4/2) + (Set(a2/2)? — ()er(a?/2)° + (22/2), The coefficient of 2% /(20!) in g(x) is 4°°~ ({)¢a/2)¢8"")(20)(29)+ (2)(1/4)(2"*)(20)(19)(18)(27)~ (3) (2/8)(4"*)(20)(19)(28)(27)(16)(15) (©) Wz) = (1 +2 + (2/8!) + (24/4) +.) = Ce ~ (27/2)! = ef — (e*(n9/8) + 237 (4) e%*(28/6)* ~ (4)e*(25/6)* + (2°/6)'. The coefficient of 27°/(20!) in A(z) is 4° — e 3 ({)a7ey(a"*)(20y(29y(a8) + (2)(4/6)*(2"*)(20)(19)¢18)(1716)(45) ~ ($) (2/6)*(20)/(421). (d) The coefficient of 2%°/(20!) in (e*)%(1 + (22/2!) = e + (27/2!) is 3 + (1/2)(3*)(20)(19). Section 9.5 + (a) 142 +27 is the generating function for the sequence 1,1,1,0,0,0,..., so (1+2+2%)/(1~2) is the generating function for the sequence L1+L1+141,14+1+1+40,... ~ that is, the sequence 1,2,3,3,.... (b) 1+2 +2? + 2° is the generating function for the sequence 1,1,1,1,0,0,0,..., 80 (l+2+2?+2°)/(1—2) is the generating function for the sequence 1,1 +1,14+1+1,1+ T4+141,1414+1+1+40,14+14+1+1+4040,...~- that is, the sequence 1,2,3,4,4,4,.... (c)_142z is the generating function for the sequence 1,2,0, 0,0, 50 (14+2z)/(1~2) js the generating function for the sequence 1,1 +2,1-+2+ 0,1 0+0,... ~ that is, the sequence 1,3,3,3,.... Consequently, (1/(1~2))[(1 + 22)/(1 ~ 2)} = (1+ 22)/(1~2)? is the generating function for the sequence 1,1 + 3,14+3+43,1+3+4343,... — that is, the sequence 1,4,7,10,.... © @= (@) 2/Q-2) Gi) 2/0 -2) iv) 2/0-29 Dhak the coefficient of 2” in 2/(1~z)* the coefficient of 2” in 2(1—2)~* the coefficient of 2*-! in (1 — 2) apr = yr RS) nt) = Mn +1)(n) F(z) = [e(1+2)}/(1—z)* generates 0?,1°,2?,3%,...; [(1t2)|/(1—2)* = 07412242222 Peart. (d/dollats/1—z)| = P42 tbo? 2(d/dz){(2+2?)/(—2)] = OF Pr + %- 2? 439-22 4...; (d/de)(x + 2?)/(1 — 2) (2? + de + 1/11 —2)', so a(z? + 4a + 1)/(2 —2)§ generates 0°,0° + 19,0 + 19+ 2°,..., and the coefficient of 2" is Dhoi®. (e44e4+2)(1—a)* = (8442742) ((Z)+(5 1 (B)i-2)*+...]. Here the coefficient of a® is (B)- ayn? 44(c8)(~ ay? + (8) (aad = (mt) + 4(083) + (43) = (1/4) f(r + Tn )(n — Dn ~ 2) + 4(n + 2}(n + 1)(n){n = 1) + (n + 3)(n + 2X(n + I(n)] = [Gn + 1}()/41](Gn? + 6n) = (1/4)(n + 1(n)(n? + n) = (nr + (n)/2 (b) ee aon . The function (1 + 2)f(x) generates the sequence ap, ao + 41,41 + 43,42 + s,.... For the BEQUENCE Mg, Go + G1, Oo + G1 + G2, 01 + G2 + Gy, G2 + G3 + a4,..., the generating function is 238 (Q+242%)f(2). (1-2) f(2) = (1-2)(ag-+ar24-ay2?4052+...) = ay +(a; ag )e-+(a2— 43 )2? +-(a3—ay)29-+ +180 (1—2)f(z) is the generating function for the sequence do,a1—ao,42~4},43—a2,..+ Lf(2) — FQYI/@ — 1) = (1 ~ 1))(¢0 — a0) + (are ~ 4) + (a22? — a) +... For n> 0, (@q2" — @,)/(2 — 1) = aa" — D(a - 1) = a(2" $29 +... +22 4241), 50 [fe — FM/(@ = 1) = a taal t Dt ane? +241) tage? +e? +241) +... Hence the coefficient of 2%, for n>0,is D2aq a Since e* is the generating function for 1,1,1/21,1/3!,..., it follows that e*/(1 — 2) generates the sequence 9,01,42,..., Where dq = FRe(1/il). (0) py = 142427 42° +++ is the generating function for the sequence 1, 1, 1,1, -.+ Applying the summation operator, we then learn that (;1z)? is the generating function for the sequence 1,14+1,1+1+1,1+1+1+1,...~ that is, the sequence 1, 2, 3, 4, .... Consequently, z/(1 — z)? is the generating function for 0, 1, 2, 3, 4, ... and «/(1—z)* the generating function for 0,0+1,04+1+2,0+14+24+3,0414243+4,... that is, the sequence 0, 1, 3, 6, 10, ... (where 1, 3, 6, 10, ... are the triangular numbers). (b) The sum of the first n triangular numbers is the coefficient of 2* in the generating function ¢/(1— 2) = 2(1—2)* = af(t) + (54)(-2) + (F)(-2)? +--4. So the answer is the coefficient of 2"? in (1—2)~* and this is (“4)(—1)"-? = (-1)"71 (“#O7} 1) (aye = (222) = G/6)n(n + 1)(n +2), as we learned in Example 4.5. Supplementary Exercises (a) 6/Q-2)+1/4-2)? — (b) 1/(-az) (©) Wl-G+a)z] (a) 1/Q-2)+ 1/0 - az) Let f(z) = (2S+28 +2 4244217) = 2%(1 423 4+2%+42%42"), The coefficient of 2 in f(z) equals the coefficient of 2* in a 1 2¥8)/(1 — 29)! = (1 — 2!) — 2?) = a(t? 2 (9 2 — 20}. 1(-2) 4 (O20 vee P)(-2)? +... This coefficient mCi (ICI CIC = CIE) + ONE. ‘The generating function for each type of bullet is S datttes aM bet att +2°)}', The coefficient of 2" in (1~2°)*(1-2)-* = [1 — ({)z® * a 50) + *) G)Cd+ ICH 1 & GIO) OG) = )+G)- By the rule of product the answer is {(}3) ~ (1) (6) + ()F- Fa)=(e ree $eh$ bdo pate $.). SNR tal te% 24.) 239 8 10. Let f(z) be the generating function for the number of partitions of n where no even summand is repeated (although an odd summand may be repeated); g(z) is the generating function for the number of partitions of nin which no summand occurs more than three times. Then g(2) = (1+2+2?+0)(1t2?+a*+2°(L¢2% 42°49) 1+2)(1+27)][(+ YA + 2QIG +29) + 29)... = (A 2?)/(1 2) +2 2/1 ~ 2) + 2A) ~ eA) +2)... = 1/2) +2) /O~ 291424) 1/02) +: aferta%t... lta? 1t2% taf po%4.. i +et\(l tao +2424. lta! (z). This result is the coefficient of 2'°/(10!) in (1+(z?/2!)+(2°/3!)-+...)! = (ef 2)! = (Daze + (s)a%et ~ (S)zte* + (et. This coefficient is 4°°— (4) (10)(3°) + (4) 10)(9)(28)— (s)caoy¢oy¢s). (a) (1 22)-#? 21 Ep, LHAMHM= NAPA Ae ACH/—r4_pgVr = 14 D%, MMe=42 gr, 59 g(z) is the exponential generating function for 1,5,5(7), 5(7)(9),-.- (b) (az) = 14 58, Miemeadetor (ag = 1 ~ abs + Wb 1a2a?/2t +. Consequently, by comparing coefficients of like powers of , we have ~ab = 7, (b—i)a? = Tell and a=4,b=-7/4. For ench partition of n, place a row of n+k dots above the top row in its Ferrers graph and the result is a Ferrers graph for a partition of 2n+k where n+k is the largest summand, This one-to-one correspondence yields P, = P3. Taking the transpose of a Ferrers graph for a partition in P; yields the Ferrers graph for a partition in P,, and vice versa. The result now follows from these two observations. For each n € 2+, (1+2)" = (5) +(t)2+ (p)2?+(s)2*+...+(t)2". Taking the derivative of both sides we find that et ee @) +a(p)er ap) + ta(Men warns) f(z) = (+ 2)i te? + etl te +284 2% oP Tz) mies n(1 + 1)°t = n(2" Atak ot pope p ah) = coms 12, 13. 14. 15. 16. (a) The coefficient of z™ in (c+2?+...)% = 2%1+e+2+...)" is the coefficient of 2 in (Ltztz?+...)!? = (1-2), and thisis (-?)(-1)8 = (-1)8(487)(-1)8 = (¥7). (b) The coefficient of 2° in (e+2?+...)9=2%(1+2427+...)° is (7)(-1)*= (2). The probability for this type of distribution is (4) (2)/(%). Fix m, 0| = &, for k a fixed positive integer, we have a, = k" and the generating function is g(z) = 1+ ke + Kz? ++ = 1+ (ke) + (ka) +-- = ple. {@) 2*f(z) 0) (fhe) = (09 aye bags +o baat)" (a) 1= Deby H(A) = AL + 3+ (2) +] = Bacal = HIL/(8/4)] = (4/3), 20 & = 9/4, 244 17. 18. (b) Pr(X = 3) = (3/4)(1/4)? = 3/256 Pr{X < 3) = The Pr(X = 2) = (9/4)[1 + (1/4) + (1/4)? + (1/4)] = (3 /4)(85/64) = 255/256 Pr(X > 3) =1~Pr(X <3) = 1 — (255/256) = 1/256 {Alternately, Pr(X > 3) = Pr(X > 4) = Dy Pr(X = x) = (3/4)|(1/4)* + (1/4) + G/4ye te] = (3/4)(1/4)*[1 + (0/4) + (0/4)? ++ 1 = (3/4)(1/4) faa] = (2/4) = 1/256] Pr(X 2 2) = Dey Pr(X = 2) = D,(3/4)(1/4)" = (8/4)(1/4)"[1 + (1/4) + (1/4)? + +=] = (8/64) [gap] = (1/4)? = 1/16. (6) For n € Z*, Pr(X > n) = DE, Pr(X = 2) = E2,(8/4)(1/4)" = (8/4)(1/4)" Lo(1/4)" = 1/4)". ME Ry Consequently, Pr(z > 4|X > 2) = EO ge) = Pr(X > 4)/Pr(X > 2) = (1/4)4/(1/4)? = (1/4). Likewise Pr(X > 104, > 102) = (1/4). For k € Z+, k fixed, we find that Pr(¥ > &) = DE, q""'p (where g = 1—p) =a iptatpt aps = plltgt ete] =o gly =a pd) = 1. Consequently, Pr(¥ 2 mY > n) = Pr(¥ > mand ¥ > n)/Pr(¥ 2 n) = Pr(¥ > m)/Pr(¥ > n) = g™"/gr? = g™*. [This property is the reason why a geometric random variable is said to be memoryless. In fact, the geometric random variable is the only discrete random variable with this property.] (a) The car travels the first mile in one hour, the second mile in 1/2 hour, the third mile in 1/4 {= (1/2)? hour, and the fourth mile in 1/8 {= (1/2)°] hour. Consequently, the average velocity for the first four miles is 4/{1+(1/2)+(1/2)*+(1/2))} = 4/{[1—(1/2)4]/f1—-(1/2)]] = 4/|2(25/16)] = 32/15 = 22 miles per hour. (b) The average velocity for the finst n miles is n/[1 + (1/2) + (1/2)? +--+ (1/2)"4] = neff — (1/2)"1/( — 2/2)]] = n/[2[(2* ~ 1)/2"]] = n(2"-*)/[2" — 1] miles per hour. (©) For n= 19 the average velocity is 4980736/524287 = 9.500018120 miles per hour. For ni = 20 the average velocity is 2097152/209715 = 10.00000954 miles per hour. Hence the smallest value of n for which the average velocity for the first n miles exceeds 10 miles per hour is n = 20. 242, CHAPTER 10 RECURRENCE RELATIONS Section 10.1 (a) Gq = Baya, 2 21, ao = (b) a, = —8an-1, n 21, ag =6 (a) augt = L5aq) Gy = (1.5)"ao, 0 2 0. (b) ay = Sanaa, dy = (1.25)"ao, 2 0. (6) Bany1 = dy, Bay = 15 = dag, a = 15/4, 50 4, = (4/3)"a0 = (4/8)"(15/4) = 6(4/3)""', n 2 0. (2) ay = (8/2)tnn1, te = (8/2) toy 81 = a4 = (8/2)'aq 80 ap = 16 and oy = (16)(3/2)", n 2 0. @n41 — day, = 0, 2 20,80 a, = dao. 153/49 = ay = Pap, 1377/2401 = as = dag => as/as = d? = 9/49 and d = 43/7. (©) a, = (2/8)aq1, 221, a9 = Gy 41 = Gy + 2.5a,, 0 > 0. @,, = (8.5)"aq = (3.6)"(1000). For n = 12, a, = (3.5)!2(1000) = 3,379,220, 508. P, = 100(1 + 0.015)", Po = 100 200 = 100(1.015)" => 2 = (1.015)" (1.015)* = 1.9835 and (1.015)* = 2.0133. Hence Laura must wait (47)(3) = 141 months for her money to double. Py = Po(1.02)" 7218.27 = Py 1.02), so Po = (7218.27){1.02)- = $2200.00 (a) 194184174...410= 145 (bo) 94+84+74...41=45 (a) Suppose that for i =k, where 1 < k Section 10.2 (a) Gy = 5ay1 + 6aq-2, 222, a = 1, a = 3. Let a, = er", c,r #0. Then the characteristic equation is r?—-5r—6 = 80 1,6 are the characteristic roots. a, = A(—1)" + B(6)" B A+6B,s0 B=4/7 and A=3/7. (3/7)(—1)" + (4/7)(6)", n > 0. (b) a, = 4(1/2)" ~ 215)", n> 0. ©) dna +m = 0, 2 20; a9 = 0, ay = 3. With a, = cr", cr #0, the characteristic equation r?+1=0 yields the characteristic roots ti. Hence a, = Afi)" + B(—i)" = A(cos(n/2) + isin(x/2))" + B(cos(x/2) + isin(—1/2))* = C cos(nx/2) + Dsin(nx/2). 0 = ay =C, 3 = a; = Dsin(x/2) =D, so a, =3sin(nx/2), n> 0. (4) 4, ~6a,1 + 9a,-3 = 0, n> 2, ao = 5, ay = 12. Let a, = or", cr #0, Then r?~6r+9 = 0 = (r—3)?, so the characteristic roots are 3,3 and a, = A(3") + Bn(3*). Bay = A; 12=a, =3A4 3B = 1543B, B= ~1. a, = 5(3") — n(8") = (5 ~ n)(3*), n> 0. (0) dy + 2onet + dy =0, 2B 2, ay = 1, ay = 3. 4 2r $20, r=—1ti (-1 48) = Vi(cos(3x/4) + isin(3x/4)) (-1— i) = V2(cos(5x/4) + isin(Sx/4)) = V2(cos(—34/4) + i sin(—3%/4)) = V/2(cos(3x/4) ~ isin(3x/4)) (/2)"[A cos(3n/4) + B sin(3an/4)] V2jvos(3x/4) + Bsin(3x/4)] = v3(-1/v2) + B(1/v2)], so 3=-14+B, B=4 a, = (72)"|eoa(3nn/4) + 4sin(37n/4)), n> 0 (a) Example 10.14: a, = 10ay-1 + 20a,-2, n > 2, a) = 10, a = 100. 1? —10r ~29 = 0, r= 5 £6V6. a, = A(5 + 6V6)" + B(S — 66)" a = 100 = 10a; + 29a = 100 + 2919, 80 ag = 0 Oa = A+B, 00 B=—A. a, = 406 + 6¥5)" (5 -6v6)"] 10 = a; = Al + 6V6 — 3 ovi\=12VEA, A= 5/6v8. a, = (5/6V6)[(5 + 6V6)" — (5 ~6V6)"], n 0. ex(2") +ean(2"), 2 > 0, ag =1, a = 3. a = 2+ e1(2), e0 = 1/2, ay = (2" yt + “oD, n2>0. (b) Example 10.16: a, = a,-1+dg-2, 2 22, ap = 1, 4 = 2 Sees ee te a + ¥5)/2] + BIC — V5)/2] a= AQ4 5) 4.0 V5) = (A+B) +V5(A—B) = 14-V5(A—B), s0 3 = V5(A—B) and A~B=3/v5. 2A = (A+ B)+(A-B) =143/V5 = (3 + V5)/V5, A = (3 + V5)/2V5; B (v5 —3)/2V5, ay = [(v8 + 8)/2VB]|C1 + ¥5)/2F + [v5 ~ 3)/2V8I{(a — V5)/2]", 2 20 A= (N= 0): ay + bay + cay = 0 = 44 KI) +c(0), 80 b= 4. (n= 1): a3 —4ay + ca = 0 =37~-4(4) +c,80 c= —21. An42 ~ Ady ~ 21a = 0 —4r 2 =0=(r- Yr +3), r= 7,-3 A=1/10, B= ~1/10 and a, = (1/10){(7)"—(—3)"], n 20. sn = Oy + gay D2, dg = ay = 1 rly —1=0, r= (14 V5)/2 a, = A((i + ¥5)/2)" + B((L~ vB)/2)" Oy = a = 1 => A=(1+ ¥5)/2¥5, B= (V5~1)/2V5 ay, = (1/VB)I((1 + ¥5)/2)""* ~ (02 ~ ¥B)/2)"*4] . For all three parts, let a,, 2 0, count the number of ways to fill the n spaces under the condition(s) specified. (a) Here ap = 1 and a, = 2. For n > 2, consider the nth space. If this space is occupied by @ motorcycle ~ in one of two ways, then we have 24,1 of the ways to fill the n spaces, 6. Further, there are ay ways to fill the n spaces when a compact car occupies positions n—1and n. These two cases are exhaustive and have nothing in common, so Gy = ay) +Gn-2, ZZ, dg=1, ay =2. Let dq = cr", c # 0, r #0. Upon substitution we have r? —2r—1=0,s0r =1+ V2 and a, = e:(1 + V2)" + c(1 — V9)", n > 0. From 1 = a9 = cy +e) and 2 = a = ex(1 + V3) + en(1 — V2), we have ¢, = #42 and e = +28. So a, = ((V2+2)/4)(1 + Wa) 4 (2 ~ VB) ~ VE = C/A + VEY — Ch VBA, n SO. (b) Here ay = 1 and a; = 1. For n > 2, consider the nth space. This space can be occupied by a motorcycle in one way and accounts for ay... of the a, ways to fill the n spaces. If a compact car occupies the (n ~ I)st and nth spaces, then we have the remaining 3a, ways to fill n spaces. So here ay = dy + 3dq-2, > 2 dy = 1, a) = 1. Let a, = er, e# 0, #0. Upon substitution we have r? —r—3=0, 80 r= (14 Vi3)/2, and a, = ex{(1 + VI3)/2)" + c9{(1 ~ V13)/2)", n > 0. From 1 = ap = ey +02 and 1 = a; = e{(1 + v13)/2] + ca[(1 — V13)/2], we find that c, = ((1+ V13)/2V73] and eq = [(-1+ V13)/2VI3}. So ay = (1/Vi13)[(1 + Vi3)/2""" — (/VI3)[ - Visa, n>0. (c) Comparable to parts (a) and (b), here we have ay = 2a,-1 + 34,2, n > 2, a9 = 1, a = 2 Substituting a, = cr”, ¢ # 0, r # 0, into the recurrence relation, we find that r= 2r—3 = 050 (r—3)(r+1) = O and r = 3,7 = —1, Consequently, a, = 1(3")+6,(~1)", n 20. From 1 = ap = c; + ¢7 and 2 = a; = 3e, ~ cp, we learn that cy = 3/4 and c= 1/4. ‘Therefore, a, = (3/4)(3") + (1/4)(-1)", n 2 0. For all three parts, let 5, n > 0, count the number of ways to fill the n spaces under the condition(s) specified ~ including the condition allowing empty spaces. (a) Here by = 1, bj = 3, and b, = 3b, +bq-2, n > 2. This recurrence relation leads us to the characteristic equation r’ — 3r — 1 = 0, and the characteristic roots r = (3 + V13)/2. Consequently, b, = ex{(3 + V13)/2]" + co{(3 ~ VT3)/2)", n > 0. From 1 = by =a +c and 3 = by = cyf(3 + ¥13)/2] + cp{(3 — V13)/2], we find that cy = (3 + 13)/2Vi3 and en = (“3+ Vi8)/2Vi8. So by = (1/VIS)I3 + VI8)/2I" ~ (1/Vi8)(3 — ViayaP4, n20 (b) For this part we have b, = 2b,-; +3b,-2, n 2 0, by = 1, = equation is r? — 2r ~ 3 = 0 and the characteristic roots are r . Here the characteristic r= 1. Therefore, 5, = ex(3") + co(—1)", n > 0. From 1 = by = cy + cz and 2 = by = 3c, ~ c2, we find that cr = 3/4, c= 1/4. So by = (3/4)(3") + 1/41)", n 2 0. (c) Here by = 1, b; = 3, and 6, = 3b; + 3d:-2, n > 2. The characteristic equation 1? = 3r +3 gives us the characteristic roots r = (3 + V21)/2. So b, = ey{(3 + V21)/2° + ods V2i)/2)", n 2 0. From 1 = bp = 0 +e; and 3 = by = o4{(3 + V21)/2] + of(3 — 91) /2}, we have c, = [(3 + ¥21)/2V2I} and cy = [(—-3 + V21)/2V2). Consequently, 2, = (/VEI)(@ + V31)/2)"*" - (8 — V21)/2)")], n> 0. 247 (a) Fant = Fan — Fan-2 Conjecture: For all n € Z+, Fi + Fs+ Fy +--+ Fant = Fin — Fo = Fin Proof: (By the Principle of Mathematical Induetioy For n= 1 we have Fj = Fy, and this is true since F, = 1 = Fy. Consequently, the result is true in this first case (and this establishes the basis step for the proof). Next we assume the result true for n = k (> 1) — that is, we assume Ait K+ B+ + Bia = Fe When n = k +1 we then find that Fy + Ft Fote++ + Fon + Fae = (Fit Fat Bot -++ + Fagen) + Foes = Fae + Facts = Fousa = Fags). ‘Therefore the truth for n = & implies the truth at n = k +1, so by the Principle of Mathematical Induction it follows that for all n € Z+ Pit Fat Fot--++ Fant = Fane (b) BR R-K Ro=R-K Fe F,-Fs Fin = Fanti — Fant Conjecture: For alln € N, Fy +Fy+-+++ Fan = Fat Fat Fut +++ + Fan = Fant — Fi = Fag — 1. Proof: (By the Principle of Mathematical Induction) ‘When n = 0 we find that 0 = J, = Fi — F, = 0, so the result is true for this initial case, and this provides the basis step for the proof. t Assuming the result true for n = k (> 0) we have 37 Fy; = Fagyy — 1. Then when n = k-+1 g ’ it follows that en Fait Faust) = Fas ~ 1+ Fanta = (Fae + Fao) Fang — 1 = Fyaryaa ~ 1 Consequently we see how the truth of the result for n = & implies the truth of the result for n = k +1. Therefore it follows that for all n € N. Pot Fit Fite + Fin = Fins 1, 248, 10. i by the Principle of Mathematical Induction. Stan Fatt = I asVEns vipa (a /Syayr" (0) Figen EA an Oe - 4/02)" —(-/9)/a" S 900 H+ ¥5)/2)°— (5/2) = Tita os SHEL" (where a = MY, p= 1sy8) Bynat ; 1 = Eitan EE Since || <1 and jal > 1, it follows that |} <1 and ||" +0 as n — 00. Consequently, lity Fit = hy = a= YS, (b) @) AC/AX = sin AXC/sin ACX = sin 108°/ sin 36° = 2sin 36° cos 36°/ sin 36° = 2.08 36° (i) cos 18° = sin 72” = 2sin 36° cos 36° = 2(2sin 18° cos 18°)(1 ~ 2sin?18°) => 1 4sin 18°(1 — 2sin? 18°) = 4 sin 18° — 8sin? 18°, 0 = 8sin® 18° — 4sin 18° +1, so sin 18° isa root of 8z9—4z2+1=0. 825 — 42 +1 = (22 —1)(42? + 22-1) =0. ‘The roots of 427+ 22—1=0 are (~1+ V)/4. Since 0 < sin 18° < sin30° = 1/2, sin18° = (-1+ V5)/4. (©) (1/2)(AC/AX) = cos 36° = 1 — 2sin? 18° = 1 — 2[(-14 V5)/4)? = (1+ V5)/4. AC/AX = 2(1 + ¥5)/4 = (1 + V5)/2. ees aga tena M20 gosa=t (Append 41”) (Append 42’) ay = Al(a + v8)/2)" + BCL — v8)/2)" L=ay)= A+B; 1 =a = A(1 + ¥5)/2+ B(1— V5)/2 oF 2=(A+B)+V5(A- B)=14V5(A-B) and A-B 5, 1S A+B, /Vb = A~B => A = (1+ V8)/2V5, B= (V5—1)/2V5 and a, = (a/V5)[((1 + ¥5)/2)"* — (C1 — ¥5)/2)""4], n 20. Here a; = 1 and a = 1. For n > 3, ay = ay~1 + Gq-2, because the strings counted by ay either end in 1 (and there are a,_. such strings) or they end in 00 (and there are a, euch strings). Consequently, ay = Fa, the nth Fibonacei number, for n > 1. a) The solution here is similar to that for part (b) of Example 10.16. For n = 1, there are two strings - namely, 0 and 1. When n = 2, we find three such strings: 00, 10, 01. For n> 3, we can build the required strings of length n (1) by appending ‘0’ to each of the yx strings of length n ~ 1; or (2) by appending ‘01’ to each of the a,-2 strings of length 249 12. 13. n—2. These two cases have nothing in common and cover all possibilities, so Gp = Anat FOnn2, MZ I,a; = 2,0) = 3. We find that a, = Fu42 = (a+? ~ $"42)/(a— 8) where a = (1+ ¥5)/2 and 8 = (1- ¥8)/2. b) Here 4, = 1 since 0 is the only string of length 1 that satisfies both conditions. For n= 2, there are three strings: 00, 10, and 01 ~ s0 by = 3. For n > 3, consider the bit in the nth position of such a binary string of length n. (1) Ef the nth bit is « 0, then there are a,_1 possibilities for the remaining n — 1 bits. (2) If the nth bit is a 1, then the (n ~ 1)st and Ist bits are 0, and so there are ay_s possibilities for the remaining n ~ 3 bits. Hence by, = Gn-1+ Gn-2 = Fata + Fn-1, from part (a). So by = (Fn + Fat) + (Fu-a + Fa) = (Fa + Fa-a) + (Fa-t + Fava) = Bana + dana. ‘The characteristic equation 2* — x — 1 = 0 has characteristic roots a = (1+ ¥5)/2 and B = (1 — V5)/2, 80 b, = cra” +28", From 1 = C10 + eof and 3 = by = ca? + c28? we learn that ¢ =o = 1. Hence}, =a" + 6" = Lq, the nth Lucas number. [Recall that in Example 4.20 we showed that L, = Fuji + Frat.) Let a, count the number of ways to arrange n such chips with no consecutive blue chips. Let 6, equal the number of arrangements counted in a, that end in blue; ¢, = a, —b,. Then dn31 = Bln + Cn = 3(bn + on) + tn = By + Baya Hence aay, — 3a, ~ 3,1 = 0, n > 1, ao = 1, a; = 4, This recurrence relation has characteristic roots r = (3+ V/21)/2 and a, = A((3 + ¥21)/2)" + B((3 ~ V21)/2)". do =1, a =4=> A= (5+ V2)/2V21, B=(V21—5)/2V27 and aq = [(5+ VBI) /(2VAA)IB + V21)/2)" — [(6 — V31)/(2V21)]{3 — V21)/2)*,n > 0. For n > 0, let a, count the number of words of length n in 31" where there are no consecutive alphabetic characters. Let a{!) count those words that end with a numeric character, while (2) counts those that end with an alphabetic character. Then a, = a) + al) Tal? + 4a?) [4a + 400) + 7af =. 4a, + 7a) = dey + M(dons) = dan + Bans, For 121, @att and dy = 1, a; = 11. Now let a,, = cr", where c,r # 0 and n > 0. Then the resulting characteristic equation is rv —4r—28=0, where r = (44 V128)/2 =24 472. 250 14. 15. 16. 17. 18. Hence a, = A[2 + 4V2}" + B[2 - 4y2)", n 20. Lay ay 11 A+B, and Al2 + 4/9] + Bl2 — 49} = Al2+4v2}+(1- Alle - 49] [2-42] + Al2 +4V2 -244v3} [2-4v2] +8v24, so A = (9 + 4V2)/(8V2) = (8 +9V2)/16, and B=1~-A= (8 ~9V2)/16. Consequently, [(8 + 9V2)/16][2 + 4v2]" + (8 — 9V2)/16][2 — 4V2I", n D0. Om Using the ideas developed in the prior exercise we find that Tk = 63, or k = 9. a, = 2, ay = 23, ane, a, = 2, ag = 2, and, in general, a, = 2", where F,, is the nth Fibonacci number for n > 0. @ =0, a =1, ag = 1, For n>4,let n= 2) 4+02+...+21, where 2; >2 for 12 and (2;—1)+22+...4 2, is counted in ay_y. Hence @, = ¢,-1 +a,-2, n > 3, and a, = Fy-1, the (n ~ 1}-st Fibonacci number. (a) From the previous exercise the number of compositions of n+-3 with no 1s as summands is Fuga. (b) (@) The number that start with 2 is the number of compositions of n +1 with no Is as summands. This is F,. @i) Ra Gi) The onmber that start with k, for 2 < k (1+ ¥5)/: a2, Fy (3+ ¥9)/2 > (3+ v5)/2 so the result is true for these first two cases (where n = 3,4). This establishes the basis step. Assuming the truth of the statement for n = 3,4,5,...,k(2 4), where k is a fixed (but arbitrary) integer, we continue now with n = k +1: Fin = Fit Fier > ak? a alti ot bak? ot, “8a + 1) a3 a? = at! = albtt-2 Consequently, F, > 0°? for all n > 3 — by the Alternative Form of the Principle of Mathematical Dae FS + vi/2 < (3+ vi/2 Fy a 1<24 V5 = 03 = at so this result is true for these first two — (where n == 3,4). This establishes the basis step. Assuming the truth of the statement for n = 3,4,5,...,4(2 4), where k is a fixed (but ecbitrary) integer, we continue now with n= k +1: Fass Fat Fea ei oh) taht naa 1) Realname Consoquently, F, < a! for all n > 3 ~ by the Altemative Form of the Principle of Mathematical Induction. sot, 252 22. 24, (a) Since ay41 = 2a, we have a, = o(2*),n 21. Then a) = 2=> 2c=2--c=1, 50a, = 2", Consequently, for n even, the number of palindromes of n is counted by Gajq = 2? = oll, (b) Here by41 = 2b, 2 > 1, by = 1. Sob, = d(2"),n > Land =132d=15d=1/2, 50 6, = 2°", Hence, for n odd, the number of palindromes of n is counted by asa = AMF /AIH1 = glo—0/2 = gia}, Here we shall use auxiliary variables, For n > 1, let a{ count the number of ternary strings of length n where there are no consecutive is and no consecutive 2s and the nth symbol is 0. We define a{" and al?) analogously. Then ay = all) +) + ol aot + [ayaa = a4] + fanaa — af an + fans — a), — a, = Danan + aly = 2g + Onna Letting a, = er", ¢ #0, r # 0, we find that r? —2r —1 = 0, so the characteristic roots are 1+ V2. Consequently, dq = (1+ V2)" + c2(1 — V2)". Here a; = 3, for the three one-symbol ternary strings 0, 1, and 2. Since we cannot use the two-symbol ternary strings 11 and 22, we have a, = 3? 2 = 7. Extending the recurrence relation so that we can use n= 0, we have ay = 2a; + dy 80 do = ay ~ 2a; =7~2-3=1. With 1=dy = 4 -+e,, and Bea = (1+ V2) +0,(1 - v2) (er +62) + V2(cr ~ €2), we now have 1 = ¢ +0 and V2 = ¢ ~ 2, 80 c = (1+ V2)/2 and cy = (1 ~ v2)/2. Consequently, 4 a, = (1/2)(1 + V2)" + (1/2) - V2)", n> 0. Here a; = 1, for the case of one vertical domino, and az = 3 ~ use (i) one square tile ; or (Gi) two horizontal dominoes; or (iii) two vertical dominoes. For n > 3 consider the nth column of the chessboard. This column can be covered by (1) one vertical domino ~ this accounts for a,.~1 of the tilings of the 2 x n chessboard; (2) the right squares af two horizontal dominoes placed in the four squares for the (n—1)st and nth columns of the chessboard ~ this accounts for 0,2 of the tilings; and (8) the right column of a square tile placed on the four squares for the (n ~ 1)st and nth columns of the chessboard ~ this also accounts for a,2 of the tilings. ‘These three eases account for all the possible tilings and no two casea have anything in common so Gy = yy + 2dyn, 23,4; = yay = 3. Here the characteristic equation is 2? - 2 ~2 = 0 which gives x = 2, 2 characteristic roots, Consequently, a, = ¢)(~1)" + ¢2(2)?, n > 1. From ~1 as the ex{-1) + 253 25. 26. 27. (2) and 3 = a = cy(~1)? + €9(2)? we learn that ¢; = 1/3, ey = 2/3. So ay = (1/3)(2"7 + (C2)"], 2B 1. [The sequence 1,3,5,11,21,..., described here, is known as the Jacobsthal sequence} Let a, count the number of ways one can tile a 2x n chessboard using these colored dominoes and square tiles, Here a, = 4, a; = 4? +4 4?45 = 37, and, for n > 3, a, = Adiy-1+160,-9+50,~2 = 40, 1+21dy~2. The characteristic equation is z?—42—21 = 0 and this gives 2 = 7, 2 = —3 as the characteristic roots. Consequently, a, = (7)" + eo(—3)", n>L Here ag = (1/21\(a, ~ 4a) = 1 can be introduced to simplify the calculations for ¢1, 62. From 1 = ag = ¢1 +c and 4 = 7c; — 3ez we learn that ; = 7/10, c2 = 3/10, 80 a, = (7/10)(7)" + (3/10)(-3)", n > 0. ‘When n = 10 we find that the 2x 10 chessboard can be tiled in (7/10)(7)!° +(3/10)—3)! = 197, 750, 389 ways. Here a; = 1 (for the string 0) and a = 3 (for the strings 00, 01 and 11). For n > 3, there are three cases to consider: (1) The nth symbol is 0: There are a, such strings. (2) The (n — 1)st and nth symbols are 0, 1, respectively: There are a, such strings. (8) The (n ~ 1)st and nth symbols are both 1: Here there are also ay-2 strings. These three cases include all possibilities and no two cases have anything in common. Consequently, Gy, = O41 + 2ay-2, 0; = 1, G2 = 3. The characteristic equation, r? - r ~ 2 = 0, yields the characteristic roots 2 and —1, so ay = 0x(2)" + €x(-1)". From 1 2ey — cz and 3 = a; = 4c, + cz, we learn that ey = 2/3 and c = 1/3, So a 2/3)(2)" + (2/3(-I)", n 21. [So here we find another occurrence of the Jacobsthal numbers ] cn ‘There is a; = 1 string of length 1 (namely, 0) in A*, and a, = 2 strings of length 2 (namely, 00 and 01) and as = 5 strings of length 3 (namely, 000, 001, 010, 011 and 121). Forn >4 we consider the entry from A at the (right) end of the string. (1) 0: there are a,.1 strings. (2) 01: there are a,-2 strings. (3) O12, 111: there are a,-5 strings in each of these two cases. Consequently, Oy = Gang + y-2 + 2,3, N>4, a =1, 2 =2, ag=d. From the characteristic equation r?—-r?—r—2 = 0, we find that (r—2)(r?+r +1) = 0 and the characteristic roots are 2 and (—14i-V3)/2. Since (~1+iV3)/2 = cos 120°-+i sin 120° = 254 29, cos(2£) + isin(2), we have oy = e1(2)" + ex00s 7B + sin 22%, n>1. From 1 = ay = 2ey ~ 9/2 + 05(V3/2) 2 = ay = des ~ 02/2 — co V3/2} 5 = ay = 8c, +e, we learn that ¢) = 4/7, e7 = 3/7, and cy = 3/21, so a, = (4/7)(2)" + (8/7) cos(2nx/3) + (V3/21) sin(2nz/3), n> 1. {Note that , also counts the number of ways one can tile a 1 x n chessboard using 1 x 1 square tiles of one color, 1 x 2 rectangular tiles of one color, and 1 x 3 rectangular tiles that come in two colors,] Here a; = 1 (for 0), az = 2 (for 00,01), ag = 4 (for 000, 001, 010, 011), ay = 9 (for 0000, 0001, 0010, 0100, 0011, 0110, 0111, 1111, 0101), and for n > 5 iy, = Oya + Ong + Oya + Uoqna- ‘The characteristic equation ré—r?—r?—r —2 = 0 tells us that (r —2)(r + 1)(r? +1) =0, so the characteristic roots are 2,—1, 4%. Consequently, Gy = 04(2)" + ex(-1)" + € co8(na/2) + casin(na/2), n> 1. en +e tee ~e ~ee Ge; ten tea 8/15, ca = 1/6, cs = 3/10, and cq = 1/10, so a, = (8/15)(2)" + (1/6)(-1)" + (8/10) coa(nx/2) + (1/10)sin(nx/2), n > 1. [Note that a, also counts the number of ways one can tile a 1x n chessboard using red 1x 1 square tiles, white 1 x 2 rectangular tiles, blue 1 x 3 rectangular tiles, black 1x 4 rectangular tiles and green 1 x 4 rectangular tiles.] Jy R20, 2% =1,and x =5. Bug ~ Engr = Ang tata — Beng + 22, 0 For n > 0, let 2, = cr", where c,r # 0. Then we get the characteristic equation r?—3r-+2 = (r= 2\(r ~ 1), 50 ay = A(2") + BUI) = A(2") + B. =244+B Hence 4= A, B= ~3, and 2, = 4(2")-3=2"?—3, for n>0. n= 255, 30. 31. 32. 33. 34, Expanding by row 1, Dy = 2D,.1~D, where D is an (n—1) by (n—1) determinant whose value, upon expansion by its first column, is Dy. Hence D,, = 2Dq-1 — Dy. This recurrence relation determines the characteristic roots r = 1, 1 so the value of D, = A(1)" + Bn(1)* = A+ Bn. D, = |2|=2 Di= 2=D,=A+B;3=D,=A+2B => B=A=1 and D,=1injn21 Let b, = ai, by = 16, by = 169. This yields the linear relation by42 — 5Sdns1 + 4U, =0 with characteristic roots r= 4,1, 90 b, = A(1)" + B(4)*. bo = 16, b = 169 => A = -35, B = 51 and & = 51(4)"— 35. Hence a, = 514)" — 35, n > 0. dy = c1 + 0,(7)", n 2 0, is the solution of aniz + bang + Can = 0, 8017 + br +e =0 is the characteristic equation and (r—1)(r —7) = (r? —8r +7) =r? + br +e. Consequently, b=-8ande=7. Since ged(F,, Fy) = 1 = ged(F;, F)), consider n > 2. Then R= Fi+F(=1) RaRth P= h+h Fas = Fat Fra Reversing the order of these equations we have the steps in the Euclidean Algorithm for computing the ged of F,41 and Fy, for n > 2. Since the last nonzero remainder is F, = 1, it follows that ged(Fh41,F,) = 1 for all n > 2. Program Fibonacci (input, output); Ver number: integer; {the input} i: integer; {i is counter} current: integer; Fibonacci: array (1..100] of integer; Begin Write (“This program is designed to determine if"); Write (‘a given nonnegative integer is a’); Writeln (‘Fibonacci number. Writeln (‘What nonnegative integer n do you wish to test?"); White (‘a= "); 256 1. Readin (number); If number < 0 then Writeln (‘Your input is not appropriate.’) Else if number = 0 then Writeln (‘Your number is the 0-th Fibonacci number.) Else if number = 1 then Writeln (“Your number is the L-st Fibonacci number.") Else {number > 2} Begin Fibonacci (1) Fibonacci [2] Hf number < current then Writeln (‘Your number is not a Fibonacci number.’) Else if number = current then Writeln (‘Your number is the ’, i: ‘th Fibonacci number.’) Elsei:=i+1 {number > count} End {while} End {else} End. Section 10.3 (8) Gags ~ dy = 2n-+3, 220, dg = 1 a =a +043 ay = a +243 = Oy +2423) + 22) + iq = as +23) + ay + 2+ 2(2) +3(8) ay + [2 + 2(2) + 2(8)] + 4(3) Oy = dg FYIFZAG +... + (n~ VD] $3) = 14 2n(n —1)/2] +30 = L4+n(n—1)-+3n= n+2ntl=(n+1), 120. (b) a, =34+n(n—1),n20 (©) ngs — 2a, = 5, 2 20, ao Gy = 2ag $5 = IVS ay = 2a $5 =P H2-5+5 dy = 2ag +5 = P+ (27424195 287 Gy, = PF 51 $242 4,..42"7 (@) a, = 2 +nQQ"""), n 20. a, = Tho nga = Oy + (1+ 1)%, 1 20; ao = 0. Gynt — On = (B+ 1) =n? + 2n +1 al) = A, al?) = Bn + Cn? + Dn? Bin +1) + C(nt 1)? + Din4 19 = Bn + Cn? + Dn? +n? 4 2nt 1 => Bnt+ B+Cn? +2Cn+C + Dné +3Dn? +3Dn + D = Bn+Cn?+ Dn? +n? +2nt1 By comparing coefficients on like powers of n we find that C+3D =C+1,s0 D =1/3. Also B+2C+3D =B+2,s0 C= 1/2, Finally, B+} C+D=1=> B=1/6. So ay = A+ (1/6)n + (1/2)n? +(1/3)n®. With ao = 0, it follows that A=0 and a, = (1/6)(n)[1 + 3n + 2n4] = (1/6)(n)(n + 1)Qn +1),n 20. (a) Let a, = the number of regions determined by the n lines under the conditions specified. When the n-th line is drawn there are _n—1 points of intersection and n segments are formed on the line. Each of these segments divides a region into two regions and this increases the number of previously existing regions, namely a,.1, by n. Gy = Oya +, 2 > 1, ay = 1. al) = A, al?) = Bn +Cn? Bn+Cn? = B(n-1)+C(n-1P +n, Bn+ Cn? ~ Bn+B-Cn?+2Cn-C=n. By comparing the coefficients on like powers of n we have B= C= 1/2 and a, = A+ (1/2)n +(1/2)n?. L=ag=A 30 a, =14(1/2\(nj(n +1), n 20. (b) Let 6, = the number of infinite regions that result for n such lines, When the nth line is drawn it is divided into n segments. The first and nth segments each create a new infinite region. Hence b,, = 6,1 +2, n > 2, b; = 2. The solution of this recurrence relation ia by = 2n, nD 1, by 2 +5(2* —1) = 6( Let py be the value of the sccount n months after January 1 of the year the account is started. Po = 1000 Pi = 1000 + (.005)(1000) + 200 = (1.005)p» + 200 Pas = (1.005)p, + 200, 0 9C +9C +20 = 1 => C = 1/20. a, = A(~1)* + B(—2)" + (1/20)(3)" A+ B+ (1/20) 5 = —A - 2B + (3/20) Hence 1 = a +a, = —B + (4/20) and B= ~4/5. Then A ay = (3/4)(—1)" + (-4/5)(—2)" + (1/20)(3)", n 2 0 (b) ay = (2/9)(—-2)" — (5/6)(n)(—2)" + (7/9), n 20 52 — 6ng1 + 9dq = 3(2)" +703)", n> O, ao =1, ay = 4. al’) = A(3)* + Bn(3)" a) = C(2)" + Dn2(3)". Substituting a) into the given recurrence relation, by comparison of coefficients we find that C =3, D=7/18. a, = A(3)" + Bn(3)" + 3(2)" + (7/18)n™(3)" 1 = @,4= a; =} A= ~1,B = 17/18, s0 (—2}(3)" + (17/18)n(3)" + (7/18)n2(3)" + 3(2)", n > 0. Here the characteristic equation is r? — 3°? + 3r —1 al) = A+ Bn+ Cn’, al?) = Dn? + Ent. D(n+3)'+ E(n+3)*—3D(n +2)° —3E(n +2) +3D(n +1)? +3E(n+1)*~Dn3 — Ent = 345n => D = ~3/4, B=5/24. a, = A+ Bn + Cn? — (3/4)n? + (5/24)n4, n> 0. G43 = Bay +3", do = 1, a, = 4. The term 3” accounts for the sequences of length n that end in 3; 3a, accounts for those sequences of length n that end in 0, 1, or 2. af!) = AB", a) = Bn3* Bln +1)8"* = 3(Bn3") + 3" => 3B(n +1) = 3Bn+1 => 3B =1 => B= 1/3 Gy = Asn Bet 1=a9=A,s0 a, =3"+n3"#,n 20. From Example 10.29, P = (Si)[1~ (1+ i)", where P is the payment, S' is the loan (82500), Tis the number of payments (24) and i is the interest rate per month (1%). —B — (1/20) = 3/4. (r—1), 90 r=1,3,1 and P = (2500)(0.01){1 — (1.01)74 Ginga + bydngs + batty = byn + by ay = C12" +628" +n —7 P thr th =(r—2r-3 uu. 12. a =n—7 [n+ 2) — 7] — 5[(n + 1) ~ 7] + (ne ~ 7) = dam + by => by = 2, by = 17. (a) Let &=b,n 20 Bue ~ Bbygs + Oy = 7 off) = A(3") + B(2"), of) =Cn+D C(n +2) +.D~3[C(n +1) + D] + 6(Cn+ D) = In => C= 7/2, D= 21/4 by = A(3") + B(2") + (Tn/2) + (21/4) 1, =a?=1 3A+2B A=3/4, B= a, = ((8/4)(8)* — 5(2)" + (7n/2) + (21/4)}7, n 20 (b) a2 —2ay-1= 0, n 21, ao =2 logs an. ‘The solution of the recurrence relation 2b, =1+by-1 is by bby = logy do = log, 2=1, 50 1=bo=A+1 and A=0. Consequently, 6, = 1, n>0,and a, =2,n>0. A(L/2)" +1. Consider the nth symbol for the strings counted by a,. For n > 2, we consider two cases: (2) If this symbol is 0, 2, or 3, then the preceding n—1 symbols provide a string of length n—1 counted by dat. (2) If this symbol is 1, then the preceding n ~1 symbols contain an even number of Is — there are 4"~ — a,_, such strings of length n — 1. Since these two cases are exhaustive and have nothing in common we have Gy = Bay_y + A? — yt) = ya $4", 22. Here a, = al) + al?), where af?) = A(4*-1) and al) = ¢(2"). Substituting a(?) into the above recurrence relation for a, we find that A(4"~-* 2A(4*"?) +41, 50 4A = 2A 44 and A= 2, ‘There is only one string of length 1 where there is an odd number of Is ~ namely, the string 1. So a, =1=e(2)4+2(4°), and ¢=—1/2. Consequently, @y = (—1/2)(2") + 2(4""1), n 21. ‘We can check this result by using an exponential generating function. Here a, is the coefficient of x*/n! in e(=$ )(et)? = Let” — 1e3*, Hence a, = (4)(4") — 1(2"),n 21. 260 43. 14, (a) Consider the 2” binary strings of length n. Half of these strings (2"-") end in 0 and the other half (2"~) in 1. For the 2"? binary strings of length (n — 1), there are t. runs. When we append 0 to each of these strings we get t,-1 + (1)(2""") runs, where the additional (4)(2""") runs arise when we append 0 to the ()(2"~*) strings of length (n—1) that end in 1. Upon appending 1 to each of the 2°! binary strings of length n—1, we get the remaining ¢,-1 + (})(2""?) runs, Consequently we find that ty = ty 2°71, n2B2 t= 2 Here #{") = o{2"), so #{f) = An(2*). Substituting #) into the recurrence relation we have An(2") = 2A(n —1)2"-! 42-1 = An(2") — AQ) $2 By comparison of coefficients for 2" and n2" we learn that A = 1!) $20) = 0(2") + n(2""1), and 2 = t = (2)+1 => c=}, 80 ty (n+1)(2"),n 21. (b) Here there are 4" quaternary strings of length n and 4°~! of these end in each of the one symbol suffices 0,1,2, and 3. In this ease Consequently, t, (Denner ta = Alta +Ge Ayn +34 ) N22, had Comparable to the solution for part (a), here ¢{*) = ¢(4") and t(?) = An(4"). So And’ 4A(n — 1)4"-? + (3)(4-1) = And™ ~ A(4") + (3)4", and A = 3. Consequently, t, (4) + (3)n4™ and 4 = ty = 4c + (3)(4) + c= 3, 50 ty = (4)4" + (Fnd” = 4-1(1 + 3n), nz (c) For an alphabet ©, where {S| =r > 1, there are r™ strings of length n and these r* strings determine a total of r"-'{1 + (r —1)n} runs. [Note: This formula includes the case where r= 1] (8) Sati = Sn + taya = Su + (n+ 1)(n + 2)/2 Sntt — Sn = (1/2)(n? + Sn + 2) a= all +o of), ~ 6) =0, 00 sft) = AI") = A 3?) = n(Bn? + Cn + D) = Bn + Cn? + Dr Bin +1) + C(n + 1)? + D(n+ 1) — Bn? — Cn? — Dn = (1/2)(n? + 3n +2) => B= 16, C =1/2, D=1/3 fm = A +(1/6)n? + (1/2)n? + (1/3)n Since 6; = =1, 1 = A+(1/6)+(1/2)+(1/3) => A =0, and 5, = (1/6)(n\inti)int2). (b) G)_ sre00000 atoms. (3) 520,906 — S1ogm + 1.665 x 10 atoms. 261 1 Program Towers of Hanoi (input, output); Var number: integer; {number = number of disks} Procedure Move The Disks (n: integer; start, inter, finish; char); {This procedure will move n disks from the start peg to the finish peg using inter as the intermediary peg,} Begin Ins then Writeln (‘Move disk from ’, start,‘ to ’, finish, ‘.’) Else Begin Move_The Disks (n-1, start, finish, inter); Move The Disks (1, start, ‘’, finish); Move. The Disks (n-1, inter, start, finish) End {else} End; {procedure} Begin {main program} Write (‘How many disks are there? *); Readin (number); IW number < 1 then ‘Writeln (‘Your input is not appropriate.’) Else Move ‘The_Disks (number, 3") End. Section 10.4 (@) ang1 a, = 3" 2 20, ag =1 Let f(z) = Sho dus*. Sega et ey ast = Sey aa [f() — a0] — 2f(z) = 2 Deho(82)" = #/(1 ~ 32) #3 ~1~2f(z) = 2/(Q- 32) (1 ~ 2) + 2/((1 ~ 2)(1 ~ 32) = 1/1 ~ 2) + (~1/2)/( ~ 2) + 0/2)/(0 - 32) = avy ~ #)+ (1/2) ~ $2), and a, = (1/2)[1 + 3"],n 2 0. (6) ay = 1+ [n(n ~ 1)2n - 1)/s},n 20. (©) Gu42 Sang + 2m, =0, 220, a= 1, 4 =6 Sass? 3S aa! +23 age 3 = a 262 LV aneae™*? ~ 32 Y angie"! +207 Yann” = 0 ce} = = Let f(2) = Soa,2". Then = (f(z) - 1-62) —32( f(x) ~ 1) +227 f(a) = 0, and f(x)(1-32 +227) = 14+62—3x = 1432, Consequently, 1+3e = 22) and a, = 5(2")-4, n 20. (4) Gaga — 2dnga + Gn = 2", 220, ap = 1, 4 =2 Deeg dagaZt? — 202g dngiz™t + Dg ane™t? = Derg Bat? Let f(e) = Doane”. Then [F(@) ~ a0 ~ az] ~ 2cl f(x) ~ ao] + 2?F (2) = 2? Dero(22)" f(a) — 1-20 — 2x f(x) +20 + 27f(2) = 27/(1 22) (2? — 2e + 1)f(2) =1+427/(1 — 22) => f(z) = 1/(1-2)*+ 2? /((1—22)(1 —2)*) = (1-22 +07)/((1~ 2)*(1 —22)) = 1/(1-2e) = 1 +22 +(22)?+..., 80 dy = 2", n> 0. f(a) = 2502)" 42, = =o . a(n,r) = aln—1yr—1) +a(n—1yr), r 21. TA a(n,rje" 4, an ~1,r—1)2" + D2, a(n — Lr )2” a(n,0) =1, n> 0; a(0,r) =0, r > 0. Let fa = E%oa(n,r)a". a —a(n,0) = thar + fr +2)fy-1 and = = D%ya(0,r)z" = a(0,0) + a(0, 1)z + a(0,2)2? +... = a(0,0) = 1,80 fy =(1+z2)" generates a(n,r), r>0. Let f(z) = Deo dut™, oft) = Dnco bao”. PE 25S ome 4g het? Tmo tnt + 6 Dig batt f(z) ~ ag = —22 f(z) ~ 4zg(z) g(2) — by = 42 f(z) + 629(z) S(a)(1 + 22) + 4zg(2) =1 S(z—4z) + (1 6z)g(z) = 0 263 1 0 1 — 62) ay ( z DY = (1 ~62)/(1 ~22)? = oie (=e) f(z) = (1 G2)(1 — 2)? = (1 ~ 62){(3) + (F)(-22) + (F)(-2e? +] ay = (2)(-2)" ~ 6(-4)(~2)""1 = 2° — 2a), 2 20 F(z)(—4z) + (1 - 62) o(z ==> of) = (42) f(z) ~ 62)? => g(2) = 4e(1— 22)? and b= 4(23)(—2)? = nf"), n 20. (b) an = (—8/4) + (1/2)(n + 1) + (1/4)(3"), 220 b, = (3/4) + (1/2)(n + 1) — (1/4)(3"), 2 20 Section 10.5 + by = Bobs + bibs + baby + baby = 25 +2) = 14 by = [(2n)I/((n + 1)(nl))], 4 = 81/(5!4!) = 14 AMOS ES NNON 372 ‘Qn +2 on ) = (1/2\(1/(2n +1)) [& +2)2n+ hee 7 csayaran-+1p( Iie + DE = (1/2)[(2n +2)/(n + 1PMAn}i/(nt)'} = A/a + D)(2) ant) f2n—1) _ f@n~at] (@n-1)t i . ( a ) Go) -[s3 woe - (2n — I)iin + 2] _[@n-Dia-1)] | (2n — 1)! @ Fim —il| ~[@-e+y'| * (e+e — il (@+)-@-D= 264 t (2n ~1)}(2) @4DIe = (a) No (b) Yes (c) No (d) Yes (@) (@/9y('s) (>) woe © (a/o(?)Ia/3)(¢)1 @ ao? (@) tayit For n> 2, let 0,02,...,0n1 be the vertices of a convex (n+ 1)-gon. In each partition of this polygon into triangles, with no diagonals intersecting, the side vitnair is part of one of these triangles. The triangle is given by vivitnin, 25% Sn. For cach 2< i 0, otherwise we end up with intersecting chords. For each n> 1, let 1 2, Lis at the end of the pernmtation or is the first component of a rise in such a permutation. Therefore, 1 must be at position Lor Sor... or 2{(n —1)/2) +1. (f) As in part (d) look now for 1 in a rise/fall permutation of 1,2,3,...,n. We find 1 is position 24 + 1 for some 0 < i < {(n —1)/2J. Here there are 21 numbers that precede 1. These can be selected in (";;') ways and give rise to Ey; rise/fall permutations. The 268 remaining (n ~ 1) — 21 = n ~ 2i ~ 1 numbers thet follow 1 give rise to Ey-ai-1 rise/fall permutations, ‘Theron, By = DSM (2) Ba Ba aay Le (g) From parts (d) and (f) we have: (A) By = ("*)ErBn at (5) EaBnea too + (gyapan) Batnsaj—1Zn-ainras (8) Bu ("54) BoE nas + ("5") BoB nna to + (gens) Eatin ryt Bn—alinv ait Adding these equations we find that 22, = DE} (NEB or Ey = (1/2) Ded (°F) BE ai Bo = (1/2)Dhao ({) Ess = (1/2){(8) Boks + (EE + (2 Pats Cs + Cae GE = (1/2)1-1-16+5-1-5410-1- aoe s145-5-141-16-1] ) = (1/2)[16 + 25 + 20 + 20-4 25 + 16] = Ey = (1/2)¥to ({) BiBo-« (1/2)[L-1-6146-1-16415-1-54+20-2-2415-5-146-16-141-61-3} 272 (i) Consider the Maclaurin series expansions sece = 1427/2! + 524/4! + 612°/6! +--+ and tang = £4 22°/3! + 1625/5! + 27227/7! + -- ‘One finds that sec2 + tanz is the exponential generating function of the sequence 1,1,1,2,5,16,61,272,... ~ namely, the sequence of Euler numbers. Section 10.6 (a) fn) = (5/3)(4n&4—1) and f € O(n for ne {3} € N} (b) f(n) = T(loggn +1) and f € O(log,n) for n€ {5'|i € N} [As in the proof of Theorem 10.1 we find that fin) =a*f(1)+efl+ata?+...ta l= adteltata+...ta 1, (a) Fora=1, fin) =d+ck = d+clogn, since n= bt. (b) For a> 1, fin) = afd +el(at — D)/(6- 1)] n= Bd kx logy at = GPE" = nF => log,(a!%") = log, n® => (log, n)(logy a) = x(log, n) => 2 = log, a. So for a>1, f(n) = dnl%* + (e/(a — 1))fnls? — 1}. . (a) £€ Ollogyn) on {bk € N} (b) fe O(n") on (Hk EN} (a) d=0,0=2,6=5,c=3 269 f(r) = 3pnboes? — 1) FE O(n?) (b) d=1,a=1,b6=2,c=2 J(n) = 14 2logn f € O(log, n) (a) fQ)=0 f(r) = 2f(n/2) +1 From Exercise 2(b), f(n) =n—1. (b) The equation f(n) = f(n/2) +(n/2) asises as follows: There are (n/2) matches played in the first round. Then there are (n/2) players remaining, so we need j(n/2) additional matches to determine the winner. (@) Corollary 10.1: From Theorem 10.1 (1) f(a) =e (lon +1) for n= 1,0,8%,..., when a= 1. Hence f € O(log;n) on S= {tk EN}. (2) f(n) = [e/(a ~ 1)}fan’o* — 1} for n= 1,0,0%,..., when a > 2, Therefore f € O(n’®*) on S = {bk EN}. (ii) Theorem 10.2(b): Since f € O(g) on S, and g € O(nlogn), it follows that Ff € O(nlogn) on S. So by Definition 10.1 we know that there exist constants _m€ R+ and s € Z* such that f(n) = |f(n)| < mnlogn| = mnlogn for all n € S where n> s. We need to find constants M€R* and s, €Z+ sothat f(n) 9, —not just those n € S. Choose ¢ € Z*+ so that s < bf 1). Since f is monotone increasing and positive, FOS FO) < mbH og) m bE flog oF + log ] m BY log +m BF log b m Bt (log bt + log 5)] 1m Ofb* log (1 + lob) m (1 + logb)(6* log HF) m B(1 + logb)tlogt Sowith M =m (1 +logs), and s; = bt +1, we find that for all t€ Z*, if ¢> 9 then f() < M(tlogt) (s0 f(t) < M(tlogt), and f € O(n logn)}. 90) (@) Here f(1) = 0, (2) = 1, f(8) = 3, f(4) = 4, 80 f(4) < f(2) < F(8) < f@). To show that f is monotone increasing we shall use the Alternative Form of the Principle of Mathematical Induction. We aséume that for all i,j € {1,2,3,...,n}, 7 >i => fG) > (i). Now we consider the case for n+1, where n > 4. (Case 1: n-+1 is odd) Here we write n+-1 = 2k-+1 andhave f(nt1) = f(k+1)+f(b)+2 2 HAWK HWA A 270 10. F(k) + f(B) +2 = f(2k) = f(n), since kk +1 3). Then f(n +1) = f(2r) = f(r) + f(r) + 2f(r) + flr - 1) +2 = fr —1) = fin), because F(r) 2 f(r — 1) by the induction hypothesis. ‘Therefore f is a monotone increasing function. (b) From part (a), Example 10.48, and Theorem 10.2 (¢) it follows that f € O(n) for all ne Zt. () Fin) < af(nfb) + em af(nfd) < af(nfi*) + ac(n/t) @f(n/P) < @f(n/P) + aeln/t?) @fl(n/P) < afln/s) + ateln/i?) ANf0/P) S abfln/it) + ee) Hence f(n) < at f(n/b)* + en[l + (a/b) + (a/b)? +... + (a/b) = ak f(1) + nfl + (a/b) + (a/)? +... + (a/b)], since n = bt. Since f(1) 6, then logya>1, and f € O(n™*) on Zt. (a) 0 = 9, b=, niet = niet? =n? 271 4, R(n) =n € O(n?) fore = 1, So by case (i) for the Master Theorem we have f € @(n?). (b) a= 2,b=2, nes = nbetonton A(n) = 1 € O(n? ~ €) for e= 1. By case (i) for the Master Theorem it follows that f € O(n). (0) a= 1, b= 3/2, nies = nits! = n= 1, Hn) = LE O(n) Here case (ii) for the Master Theorem applies and we find that f € @(n!®*log,n) = (log, n). (a) @= 2, b= 3, ns = nhs? = 2S Kn) = n € O(n 24) where € = 0.369. Further, for all sufficiently large n, a h(n/d) = 2h(n/3) = 2(n/3) = (2/3)n < (3/4)n = ce h(n), for 0 <¢= 3/4 <1, Thus, case (iii) of the Master Theorem tells us that f € O(n). (2) a= 4, b= 2, nPHs = nett = 9? h(n) = n? € Ont) From case (ii) of the Master Theorem we have f € O(n! log, n) = @(n® log, n). Supplementary Exercises (e3:) -eanececy- pea FH) () (a) Consider the element n+1 in S = {1,2,3,....,n +1}. For each partition of S we consider the size of the subset containing n +1. If the size is 1, then n+1 is by itself and there are B, partitions where this happens. If the size is 2, there are (3) =n ways this can occur, and B,_1 ways to partition the other n—1 integers. This results in ({)By-1 partitions of S. In general, if n +1 is ina subset of size 1+1, 0S 1. For 1 1. Thea tiyta,-..5t provide a partition of n—k into exactly k summands. These cases are exhaustive and disjoint, 90 by the rule of sum. p(n, k) = p(n —1,k ~ 1) + p(n — kk). Here a) =1 and a2 For n>3 write n= 2, +22+...+ 24, where each z;, for 1 3, and a, = Fy, the nth Fibonacci number, for n > 1, 5. (a) [2558 2 ‘ -[z a]: tl u Bm mS are aa aa 7 Ne Me At we (b) Conjecture: Forn €Z*+, A" = where F, denotes the nth Fibonacci number. Proof: For n 7 a=a'e[} al-[% Fy | the rn ie tru in this first case, Assume the result true for n =k > 1, ie., |: For makya, atm asta atean |e Fe IE: al F, Fiaj[1 0 Faas + Fa Fees] [Faiz Fait Fit Fea Fe Far Feo Consequently, the result is true for all n € Z+ by the Principle of Mathematical Induction. Set eae (2) ole eto eh ieee (iis at 2 @ue[I 3) ie ghae=([§ Bhae-[2 oa fia] [a an 23)_[RR ome[t a]-[8 a] u le |= etal a sf 8 2)_[ RR w-[5 s| [F F| w= [3 a> Ral Fina Fan |: ee + Mts We claim that forme Zt, Mm =| ph) Proof: We see that the claim is true for n = 1 (as well as, 2, 3, and 4), Assume the result true for A(2 1) and consider what happens when n = k +1. ae vay _faatfrap_fa 1] Aen Fa 12 P2y{1 2} [1 2), me Fen 273 Fait Far Fae + Fares - [ Fuit2Fx Fut 2Pan | _ | Fan Fans (Fina + Fat) + Far (Fae + Fay) + Fangs _ | Fan Fay | Fon Fina Fay + Fai Fata + Fares Farsz Fases [Fe Be Fan Fantt |” It follows from the Principle of Mathematical Induction that M* = | alln>1. Fin Fan fe Fan zl a From 2?—1 = 144 we find that z*—z = 241, or z?~22-1 = 0. Since (-1)°-2(-1)-1 = -142-1>=0, it follows that —1 is a root of z*— 2z—1. Consequently, x—(~1)=z+1 is a factor and we have z3 —2z ~ 1 = (x + 1)(2?— 2 — 1). So the roots of 2* — 2z —1 are —1,(1+ ¥8)/2, and (1 — ¥5)/2. For 2 =—1,y=(-1)?-1=0. For 2 = (1+ V8)/2, v = [(1 + v5)/2P ~ 1 = (1/4)(6 + 2V8) — 1 = [(8 + ¥5)/2} -1 = G+ v5)/2. For 2 = (1 — V5)/2, y = (1 — V8)/2)? — 1 = (1/4)(6 - 28) ~ 1 = [(3 - ¥5)/2]-1 = a- ¥5)/2. So the points of intersection are (—1,0), ((1~V5)/2, (14+-V5)/2) = (a,a), and ((i-V5)/2, (1 ~ ¥5)/2) = (6,8). - (a) a? = (1 + VB)2/4 = (6 + 2V5)/4 = (3 + V5)/2 a+1 (1+ ¥5)/2+1=(3 + V5)/2 B? = (1 — V5)/4 = (6 - 2V5)/4 = (3 - V8)/2 B+i=(1- v5)/2+1= (3 - v5)/2 (b) Chao (2) Fi = Diao (2)(a* - BAe ~ 8) = [1/(a~ BylEtao (?)a* ~ Chao (7) 440) = [Ia - AIG +4)" - 0 +8)" = [ila - BY?" — (8 )"] = (a — 8) /(a ~ B) = Fin {c) a? =a(a*) = [(1 + ¥5)/2I[(3 + V5)/2] = (8 + 4v5)/4 = 24 VE 1+ 2a = 1421 + ¥5)/2] = 24+ V5 #9 = (B?) = ((1 ~ V8)/2\{(3 — V)/2] = (8 4V5)/4 = 2- VE 1426 =142{(1 - V8)/2]=2- V5 (hao (3) 24Fe = hho (7) 24 a4 ~ PHY/La- 8) 274 10. = [/(a~ BYR (2) 2a — Dike (2)2484 = [1/(a~ AZo (7) 2eax)* ~ Lao (3)(2)4 = [1a AA +2a)* ~ (1+28)] = [2/(a— A)][a°* — 6] = (a> ~ )/(a~ A) = Fan (a) Since a? = a +1, it follows that o? +1 = 2+ and (24a)? = 444+? = A(1 +a) +0? = 507. (b) Since 6? = 6+1 we find that §?+1 = $+2 and (248)? = 44+48+f? = 4(1+8)+8? = 5B. 0 F(Z) E (7) See] _ = cna ~ an] (f)corton-¥ (Planter) = (1a B)fo™(a-+ 02) — BC+ 8) = Gla ~ A)er2+ a)" 22+ 3) = (Ka ~ Alan((2-+4)9 —A"(2+ AN) = (ila ~ Ale (Bay ~ (58°) = SU /(a~ Bila" ~ P| = 5Fangne (a) Let pp = $4000, the price first set by Renu, and let p, = $3000, the first offer made by Narmada. For n > 0, we have Pata = (1/2)(Puta + Po) This gives us the characteristic equation 2x? —2—1 = 0; the characteristic roots are 1 and. -1/2, So Pe = A(1)" + B(-1/2)", n> 0. From po = 4000, p; = 3000 it follows that A = 10,000/3, B = 2000/3. ‘Narmada’s fifth offer occurs for n = 9(= 2-5—1) and pa = $3332.03. Her 10th offer occurs for n = 19 and pp = $3933.33. For k 2 1, her kth offer occurs when n = 2k ~1 and Px = (10,000/3) + (2000/3)(-1/2)""?. (b) As n increases the term (—1/2)" decreases to 0, so p(n) approaches $10,000/3 = $3333.33. (c) Here p, = A(1)* + B(-1/2)*, n 2 0, with pp = $4000. As n increases p,, approaches A = $3200, So 4000 = pp = 3200+ B, and B = 800. With p, = 3200 + 800(~1/2)" we find the solution p: = 3200 + 800(—1/2) = $2800. 25 i. 12 13. Consider the case where n is even. (The argument for n odd is similar.) For the fence Fa = {01,42,-..54n}, there are cy; order-preserving functions f : F, -+ {1,2} where ‘F(ay) = 2. [Note that ({1,2},<) is the same partial order as Fy.) When such a function satisfies f(a,) = 1, then we must have f(a,-1) = 1, and there are c,-2 of these order- preserving functions. Consequently, since these two cases have nothing in common and cover all possibilities, we find that Cn Cnt tb Onna, C1 = 2, cr = 3, So cy = Fy42, the (n + 2)nd Fibonacci number. This combinatorial identity follows by observing that Fyy2 and Dfg ("E4), for m = [(n41)/2], each count the number of subsets of {1,2,3,...,n} that contain no consecutive integers. (a) For n > 1, let a, count the number of ways one can tile a 1 x n chessboard using the 1x 1 white tiles and 1 x 2 blue tiles. Then a; = 1 and a, = 2. For n > 3, consider the nth square (at the right end) of the 1x n chessboard. Two situations are possible here: (1) This square is covered by a 1x 1 white tile, so the preceding n~1 squares (of the 1xn chessboard) can be covered in d,-1 Ways; (2) This square and the preceding ((n — 1)st) square are both covered by a 1 x 2 blue tile, 90 the preceding n ~2 squares (of the 1x n chessboard) can be covered in an-2 ways. These two situations cover all possibilities and are disjoint, so we have 2 Oy = dat + naz, M23, a= 1; ae Consequently, a, = F,41, the (n + 1)st Fibonacci number. (b) (i) There is only 1 = (*) ) = (253,) way to tile the 1 x n chessboard using all white squares. (i) Consider the equation 21 +21+++--+2,-1 = n—1, where 2; = 1 for can select one of the x;, where 1 Oit follows that c= a = (1+ V5)/2. = 5{°7! (sch). {Compare this result with the formula presented (a) For each derangement, 1 is placed in position i, 2 0, we get 2n new points of intersection which split the perimeter of this oval into 20 segments. Each segment takes an existing region and divides it into two regions. So 2. Ong1 = dy + 2n, n> 1, @ al = A, af?) = n(Bn+C) (n4-1[B(n +1) +C] = n(Bn+C)+2n => Bln? +2n41)+Cn4+C = Bn? 4+Cn42n = 2B+C =C+2, B4+C =0=9 B=1, C=-1,00 a =Atni-n, 2a eA a, =n? —n$2= n(n —1)/ +2. (8) a, = () (b) ce) e ea r() + G)te/ne + ({)(efr a? + - do + aye + [e(t - 1)/2] = s(t ~1) = 8,80 6 ) t= 1/2, and 27 18. 19, 20. (©) Let a coin be tossed 2n times with the sequence of H's and T’s counted in ay. For 1SiSn, there isa smallest i where the number of H’s equals the number of ‘I's for the first time after 2i tosses. This sequence of 2i tosses is counted in bj; the given sequence of 2n tosses is counted in a,-:6. Since bo =0, as i varies from 0 to n, Gn = Dheo Gibnwie (A) Let g(z) = Do bat”, (2) = Die dye” = (1 — 4), TEy ane" = Ea toby + abyaa tot yby)e” => f(t) — ao = f(s)g(z) or o(2) =1-[1/f(2)} =1-(1-42)'7, (142)? = [(42) + (*7)(—42) + ((P)(—4ey +] ‘The coefficient of 2" in (1-42)? is ()(—4)" = GPNG/2) ~ G12) — 2) (G2) 94D gyn. CAVES)" 2a 3) pny _ nt nf -1/(2n — 1} (2. Consequently, the coefficient of 2" in g(z) is by =[i/(2n~1))(**), n21, b =0. 1a = PSA) = 41 <1, 90 Debt = ty = ahs = a = te EE = = stp =~) = -2. 7 (]D GN) ---2n — 3)(2)(4) --- (n= 2)(2n) __(=1)_ (An) nln! ~ @n=1) nln! Since a + 8 = (H4¥8) + (1x) =1, it follows that a —1=—f. Lo l6lt = DEG)" = coy = aay = ae YE = SE = 4 = (D+ V5), and a? = (14y8)? = (#8848) = (3)(3 + v5). For x,y,7 ER, FFl@ yh 2) = flatbey+el2+y), 2) = atb[(atbey+e(2+y))2]+el(atbey+ele+y))+2)) Satact cx they + Rays + bere + Ay + boyz + abs + cz, and F(a, Fu, z)) = flava + byz + ea +y)) = at bala + bys + ely + 2) + ele + (a+ byz + e(y + 2))] satactabetertety +z + Bayz + bery + bexz + boyz. f associative > f({(z,y),=) = f(z, f(y.z)) > 2x + (ab+c)z = abe + cx +z. With ab = 1 it follows that Oztztez=atezter, or (A —c~1)2=(c?—c-1)z. Since x, z are arbitrary, we have c — c—1 = 0, Consequently, ¢ = @ or c = 8. (a) @= B= (2) + V8) ~ (4) - V5) = vB 278 2. 22. 23. a? =a? = (SE (YG + V5 -3 + V5) = Bt ~ B= (GAR? ~ RE) = hy - SP = (A) + V5 -3 4 V5) = V5. (b) Using the Binet form we have Fess, - (ay a emcees eee = Slee agrie (since af = -1) = (a — BP )/(ar~ 8) ffrom the results in part (a)) = (c) Here the base angles are 60° and the altitude is a Consequently, the area of T is (1/2)(V8/2)Fa[Fu-1 + Fass] = (V3/4)FalFa-1 + Fatt) Returning to part (b) we find that Fin = Fy; — Fina = (Fut ~ Fr-t)(Fatt + Fra) = FFaui + F,Fy-1. Consequently, the area of T = (/3/4)Fa,- Since ANB = 0, Pr(S) = Pr(AUB) = Pr(A) + Pr(B). Consequently, we have 1 = P+, sop? +p—1 = 0 and p= (~1 4 ¥5)/2. Since (-1 — ¥5)/2 < 0 it follows that p=(-1+ ¥5)/2=—-A. ‘The probability that Sandra wins is p+(1—p)(1—p)*p+(1—p)(1—p)*(1—p)(1—p)pt e+ = pil +(1— py + (1~ p+ (Ap) ++] = pl - Ap) For the game to be fair we must have 1/2 = p[1/[1— (1 — p)°J], 80 (1/2){1 - 0 — p)] [1-G.-p))]=1~(.- 3p + 3p? - p*) 3p ~ Sp + p®, an P— Sp?-+ p= pp? ~ Sp +1). Since p > 0, it follows that p? — 3p + 1 = 0, or p = (3 + V5)/2. Since p < 1, we find that p= (3~ ¥5)/2 = [(1 ~ v5)/2)? =p Here a; = 1 (for the string 0) and az = 2 (for the strings 00, 11). For n > 8, consider the nth bit of a binary string (of length n) where there is no run of 1’s of odd length. (If this bit is 0 then the preceding n ~ 1 bits can arise in a, ways; and (ii) If thie bit is 1, then the (n — 1)st bit must also be 1 and the preceding n — 2 bits can arise in a,» ways. Since the situations in (i) and (i) have nothing in common and cover all cases we have Oy =a tor, NZ 3,q = 1,0 =2 279 24, 25. Here a, = Fyyx,n > 1, and so we have another instance where the Fibonacci numbers arise. Here 29 = a, 2) =}, 22 = a12¢ = ba, ey = 290; = Wa, zy = 2yey = Ba, and ay = 24z3 = ba, These results suggest that 2» = a and, for n > 1, xq = bF*al1, where Fy denotes the nth Fibonacci number (for n > 1). To establish this in general we proceed by mathematical induction. The result is true for n = 0, as well as for n = 1,2,3,4,5. Ces the result true for n = 0,1,2,...,4—1,4, where & is a fixed (but arbitrary) ive integer. Hence 24-1 = Pia? and 14 = Wea, 90 te = tate = (rahe (UF aFe-2) = PFet Fit ghi-ithi-a = pFitig!h, by the recursuve definition of the Fibonacci numbers. Consequently, by the alternative form of the Principle of Mathematical Induction the result is true for (n= 0 and) all n > 1. (Second Solution). For n > 0 let a = logy. ‘Then yp = loga, 11 = logs, and y, = Ynta + Un-ay 2 > 2. SO Ym = 10" + c25%, where a = (1+ ¥5)/2 and 8 = (1 — ¥8)/2. Joga = ¢1 + en logh = cra + en8 => 2 = (~1/¥5)logb + ((1 + ¥)/2V8l loga, 4 = (1/¥5)logb + ((—1 + V5)/2V5} log a, where the base for the log function is 10 (although any positive real number, other than 1, may be used here for the base). ‘Consequently, we = ca" + enh" {Q/V8)log6 + [(-1 + V5)/2V5} log aja” +[(—1/V¥5) log b + (0. + V5)/2V5)log a] 3", so yore 10U-1V5/2Vi}tog (VS) so” 1010+ V8) 2V8)logat(-1//i)logd}s" alll-14VEi2vBan sieveyavilorylon-oryV5 AP O-PYVE pao = afeibhs, since F, = (a* ~ *)/(a ~ A) = (a — *)/VE. @) (1=0) F}- RR -FR=P-0-1~0'=1 (n=1) -AR-ReaP?-11-Pe-1 (n=2) R-R-Fp=P-1-2-V=1 (n=3) F}- BR, - Fe =3-2-3-2=-1 (b) Conjecture: For n > 0, 1, Fla Raia ({_p 8SS (©) Proof: The result is true for n = 0,1,2,3, by the calculations in part (a). Assume the result true for n = k(> 3). There are two cases to consider — namely, k even and 280 27. 28. 29. k odd. We shall establish the result for k even, the proof for k odd being similar. Our induction hypothesis tells us that F?,, — F.Fisi — Ff = 1. When n = k + 1(> 4) we find that Fe.a~ FaeiFes2 — Foyy = (Feta + Fi)? ~ Fats(Fesa + Fi) — Fla = Fl + 2Fep Fe + FR - Fh, — Faas Fe ~ Fi = Fat Fe + FE - Fi = —[FB - FP — FE] = -1. The result follows for all n € N, by the Principle of Mathematical Induction. The answer is the number of subsets of {1,2,3,...,n} which contain no consecutive entries. ‘We learned in Section 10.2 that this is F,42, the (n + 2)nd Fibonacci number. (a) r(Cy2)=1lte (Cs, 2) = 14 40 +327 r(Cy,2) = 1422 r(Cs,2) = 1452 + 62? + 2° r(Ca,2) = 1432427 r(Cs,2) = 14 6x + 1027 + 429 In general, for n > 3, r(Cq,2) = r(Cn-12) + 2r(Cnu2y2). (b) r(Ci,1 (Cs, 1) =5 r(Cs,1) = 13 r(Ca,1) r(C4,1) =8 r(Co,1) =21 [Note: For 1 A= 1/18, 50 pa = n/18. Hence Jill has probability 10/18 = 5/9 of (a) The partitions counted in f(n,m) fall into two categories: (1) Partitions where m is a summand. These are counted in f(n ~m,m), for m ‘may occur more than once. (2) Pastitions where m is not a summiand - eo that m—1_ is the largest possible summand. These partitions are counted in f(n,m ~ 1). Since these two categories are exhaustive and mutually disjoint it follows that f(n,m) = f(n — mm) + f(a,m ~ 1). (b) Program Summands(input,output); Var n: integer; 30. Function {(n,m: integer): integer; End; {of function f} Begin Writeln (‘What is the value of 17”); Readin (n); Writeln (‘What ie the value of m2’); Readin (m); Write (‘There are *, f(n,m):0,‘ partitions of °); Write (n:0,‘ where °,m:0,‘ is the largest’); Writeln (‘summand possible’) End. (e) Program Partitions(input,output); Var in: integer; Function {(n,m: integer): integer; Begin If n=0 then f Else if (n < 0) or (m < 1) then Else f := f(n,m-1) + f(a-m,m) End; {of function f} Begin ‘Writeln (‘What is the value of n2”); Readln (n); Write (‘For n =", :0,‘ the number of ” Write (‘partitions p(’, 0:0, *) is’, (an): Let [B|=n=1 and [Al=m. Then f:A->B where f(a) =6 forall aé A and {6} = B, is the only onto function from A to B. Hence a(m,1) 282 31. For m>n>1, n™ = the total number of functions f: A> B. If 1 05 (2) v2 + Ug > U4 Ung O25 (= 1) Oper 9 Oe 1 + Ung Oe} and (1) Oy + Uy Ya Opt Ope When n = 4 the vertices v1,02,5,04 provide a cycle. The other four cycles of length 4 consist of vertex vs and three of the four vertices v1, 02,03, V4. (i) There are n +1 cycles of length n in Wy: (1) p90) 9 1) OS (2) OL Ong Fy FOE oF Oped eS (3) 0p Ong P49 1S Po Oped Oy Og} ne ee ae (R41) 0g Ong Fy 7 19 Ong FOF One For n > 1, let a, count the number of closed v ~ v walks of length n (where, in this case, we allow such @ walk to contain or consist of one or more loops). Here a; = 1 and a = 2. For n > 3 there are a,_; » ~v walks where the last edge is the loop {v,v} and a,-2 ov walks where the last two edges are both {v,w}. Since these two cases are exhaustive and have nothing in common we have dy = dy_1 + ay-2, > 8 = 1, a) = 2. We find that a, = F,.41, the (n +1)st Fibonacci number. a) There are two other unit-interval graphs for three unit intervals. 289 ol — 0 il oe oe ee 0 10 10 1 Oo 1 . ° ° wi w2 w3 Wr wo w3 010101 001011 ) For four unit intervals there are 14 unit-inteval graphs. ¢) For n> 1, there are 5, = =1;(*) unit-interval graphs for n unit intervals. Here }, is the nth Catalan number. The binary representations set up a one-to-one correspondence with the situations in Example 1.40 ~ in particular, change 0 to 1 and 1 to 0 in part (b) of Example 1.40 to obtain the binary representations of the 14 unit-interval graphs on four ‘unit intervals. Section 11.2 (a) Three: (1) {6,4}, {a,c}, {c,d}, {d,a} (2) {frch: {ea}, {ad}, {a,c} (3) fi,d}, {dc}, {e,9}, {ad} {b) G1 is the subgraph induced by U = {a,6,d, f,g, hi, j} G, =G~{c} (c) Gz is the subgraph indeed by W = {b,c,d, f,9,i,3} G.=G@~ {a,h} @ br ©) o a eg : f, -T' g : j _ 3 (s} Gy is not an induced subgraph of G if thave-exists.an edge {2,8} in E such that 290 a,bEV, but {a,b} ¢ By. (b) Let ¢ = {a,d}. Then @—e is a subgraph of @ but it is not an induced subgraph. (a) There are 2° = 512 spanning subgraphs. (>) Four of the spanning subgraphs in part (a) are connected, (co) 2 ‘There is only one ~ the graph G itself. G is (or is isomorphic to) the complete graph Ky, where n= |V|. ‘There are 11 loop-free nonisomorphic undizected graphs with four vertices. M, @) ®@ “TEP Zz * . @ ca) XR (8) (9) (Qo) (a) Six of these graphs are connected. . (a) (b) No solution. [hb “Es ‘Ch wee © w 2 v 8 aL: jw w[e]s vEe}* o[«] ¥ a ® w {a) There are (1/2(7)(8)(5)(4)(3) = 1260 paths of length 4 in Kr. (>) The number of paths of length m in K,, for 0 3|V|, 20 the maximum value of [V| is 11. Since 38 = 2|E| = 7 deg(v) > 4IV], the largest possible value for |V| is 9. We can have 4 (i) seven vertices of degree 4 and two of degree 5; or (ii) eight vertices of degree 4 and one of degree 6. The graph in pact (2) of the figure is an example for case (i); an example for case (ii) is provided in part (b) of the figure. (a) (b) a) We must note here that G need not be connected. Up to isomorphism G is either a cycle on six vertices or (a disjoint union of) two cycles, each on three vertices. b) Here G is either a cycle on seven vertices or (a disjoint union of) two cycles — one on three vertices and the other on foar. ©) For such a graph G,, G; is one of the graphs in part (a). Hence there are two such grophs Gi. d) Here Gj is one of the graphs in part (b). There are two such graphs G; (up to isomorphism). e) Let G: = (Vi, Ei) be a loop-free undirected (n ~ 3)-regular graph with |V| =n. Up to isomorphism the number of such graphs G is the number of partitions of n into summands that exceed 2. (a) [Vi] = 8 = [Woh [Bi] = 14 = |B. (b) For Vj we find that deg(a) = 3, deg(b) = 4, deg(c) = 4, deg(d) deg(f) = 4, deg(g) = 4, and deg(h) = 3. For V; we have deg(s) degiu) = 4, deg(v) of the two graphs has four vertices of degree 3 and four of degree 4. (c) Despite the results in parts (a) and (b) the graphs G, and G, are not isomorphic. In the graph G; the four vertices of degree 4 — namely, t,u,w, and z ~ are on a cycle of length 4. For the graph G; the vertices b,c, f, and g — each of degree 4 -- do not lie on a cycle of length 4, 294 ‘A second way to observe that G and G; are not isomorphic is to consider once again the vertices of degree 4 in each graph. In G, these vertices induce a disconnected subgraph consisting of the two edges {,c} and {f,9}. The four vertices of degree 4 in graph G2 induce 2 connected subgraph that has five edges — every possible edge except {u, 2}. Gi % 10. nL 12, 4 e \, 4 a a c a e bd o e 6 ) a f f c i) Citi) a) 19 b) y (3) [Note: No assumption about connectedness ia made here.} a) There are 8-2” = 1024 edges in Qs. b) The maximum distance between pairs of vertices is 8. For example, the distance ‘between 00000000 and 11111121 is 8. ) A longest path in Qs contains all of the vertices in Qg. Such a path has length 2 -1= 255, a) n-2*! = 524,288 => n= 16 b) n-2? = 4,980, 736 = n= 19, so there are 2!° = 524, 288 vertices in this hypercube. ‘The typical path of length 2 uses two edges of the form {a,b}, {b,c}. We can select the vertex 6 as any vertex of Q,, so there are 2" choices for 6. The vertex 6 (labeled by a binary n-tuple) is adjacent to n other vertices in Q,, and we can choose two of these in (5) ways. Consequently, there are (jen paths of length 2 in Qa. The number of edges in K,, is (3) = n(n —1)/2. If the edges of K,, can be partitioned into such cycles of length 4, then 4 divides (3) and (3) = 4¢ for some ¢ € Z*+. For each vertex 0 that appears in a cycle, there are two edges (of K,,) incident to v. Consequently, each vertex v of K,, has even degree, so n is odd. Therefore, n—1 is even and as 4f = G) = n(n—1)/2, it follows that 8t = n(n — 1). So 8 divides n(n — 1), and since n is odd, it follows (from the Fundamental Theorem of Arithmetic) that 8 divides n—1, Hence n—1 = 8k, or n= 8k +1, for some k € Z*. a) Let v € V. Then vRv since v and itself have the same bit in position k and the same 295 13, 14, 13. 16, Dit in position € — hence, R is reflexive. If vw € V and wRw then v,w have the same bit in position & and the same bit in position £. Hence w,v have the same bit in position k and the same bit in position £. So wRv and R is symmetric. Finally, suppose that v,w,2 €V with vRw and wRz. Then v,w have the same bit in position k and the same Dit in position , and w,« have the same bit in position k and the same bit in position £, Consequently, »,z have the same bit in position k and the same bit in position £, so uRz — and ® is transitive. In so much as R is reflexive, symmetric and transitive, it follows that 2 is an equivalence relation. ‘There are four blocks for (the partition induced by) this equivalence relation. Each block contains 2°-? vertices; the vertices in each such block induce a subgraph isomorphic to Qua (b) For n> 1 let V denote the vertices in Q,. For 1 < hy < hy <...< hj Snand w,z € V define the relation R on V by wR if w,x have the same bit in position ky, the same bit in position &;,..., and the same bit in position k,. Then R is an equivalence relation for V and it partitions V into blocks. Each block contains 2*~' vertices and the vertices in each such block induce a subgraph of Q,, isomorphic to Qn. 8|V] < Deev deg(v) < AJV|. Since 2|E| = Dyey deg(v), it follows that 6|V| <21B| < AIV| 80 6 < 2(e/n) there exist unique a,€V with f(a) =<, f(b) =y. If {a,b} ¢ B, then {f(a), f()} ¢ EB (b) If deg(a) =n, then there exist 21,22,...,24 €V and {a,z;} € B,1 n, let y €V! such that y # f(z,) for alll n. Hence deg f(a) =n. Proof: Start with a cycle vy —+ Up + ty >... —+ vase > Uae + vp. Then dravw the k edges {01 depths {025 Pesahs-- 2 {0 b4e}s-+-1 {049 tay} The resulting graph has 2k vertices each of degree 3. Proof: (By the Alternative Form of the Principle of Mathematical Induction) ‘The result is true for n = 1 (for the complete graph Kz) and for n = 2 (for the path on four vertices). So let as assume the result for all 1 k>1 forall v EV. If k=1 the result follows. If & > 1, suppose that we have selected vi, v2,...,0 EV with {v1,v2}, {v2 vs},--++{0e-1 4} € E. Since deg(vg) > ky there exists u,4, € Vi where vpyi $v; for 1 Si < k-1, and {vy,v441} € E. Then {v1.02}, (02 05},--- {0-10}, (04, tep1) provides a path of length k. (a) Let a,b,c,2,y€V with deg(a) = deg(b) = deg(c) = 1, deg(z) =5, and deg(y) = 7. Since deg(y) = 7, y is adjacent to all of the other (seven) vertices in V. Therefore vertex is not adjacent to any of the vertices a,é, and ¢. Since 2 cannot be adjacent to itself, unless we have loops, it follows that deg(z) < 4, and we cannot draw a graph for the given conditions. () (8) @sbrcrg aka ia gobafajoinfretizhodsesto aa (bl) dta+badshrinesfrisjsafabocetgs+k4jogsbo € n odd: n=2 22. 1; Any single bridge. Yes. Model the situation with a graph where there is a vertex for each room and the surrounding corridor, Draw an edge between two vertices if there is a door common to both rooms, or a room and the surrounding corridor. The resulting multigraph is connected with every vertex of even degree. 297 24, 25. 26. We find that J> id(v) =e = Yo od(s). cag oe (a) (i) Let the vertices of Kg be v;, v2, 03, 04,5, %, Where deg(v,) = 5 for all 1 2 Since G is loop-fice and connected, for all z € V_ we have 1S deg(z) {2,y,2} by F(a) = y, f(b) = 2, fc) = 2. This function provides an isomorphism for these two graphs. Alternatively, if we stuct with the first matrix and interchange rows 1 and 3 and then interchange columns 1 and 3 (on the resulting matrix), we obtain the second matrix. This also shows us that the graphs (corresponding to these adjacency matrices) are isomorphic. (b) Yes {c) No (2) Here each graph is a cycle on three vertices ~ so they are isomorphic. 300 35. 37. (b) The graphs here are not isomorphic. The graph for the first incidence matrix is a cycle of length 3 with the fourth (remaining) edge incident with one of the cycle vertices. The second graph is a cycle on four vertices, (©) Yea No, Let each person represent a vertex for a graph. If v,w represent two of these people, draw the edge {v,w) if the two shake hands, If the situation were possible, then we would have a graph with 15 vertices, each of degree 3. So the sum of the degrees of the vertices would be 45, an odd integer. This contradicts Theorem 11.2. Define the function f from the domain A x B (or the set of processors of the grid) to the codomain of corresponding vertices of Qs as follows: $((ab, cde)) = abede, where ab € A, ede € B, and a,b,c,d,e € {0,1}. If f((ab, ede)) = f(aybs,crdye1)), then abede = aybycydyey, 90.0 = ay, b= by, = c,d = dy, € = ey, and (ab, cde) = (a:bj, crdye:), making f one-to-one. Since |A x B] = 15 = the number of vertices (of Qs) in the codomain of f, it follows from Theorem 5.11 that f is also onto. Now let. {(ab, ede), (vw, zyz)} be an edge in the 3x 5 grid. Then either ab = vw and ede, xyz differ in (exactly) one component or ede = xyz and ab, vw differ in (exactly) one ‘component. Suppose that ab = vw (soa=v,b=w) ande=2,d=y, bute ¢z. Then {abede, vw2yz} is an edge in Qs. {The other four cases follow in a similar way.] Conversely, suppose that {f(arbi, e141 ¢1), f(0i%1, 219121)} is an edge in the subgraph of Qs induced by the codomain of f. Then a,b,ed;¢; and vy.0,2412 differ in (exactly) one component ~ say the last, Then in the 3 x 5 grid, there is an edge for the vertices (a1bs,¢1410), (axbiexd:1). {Similar arguments can be given for any of the other first four components.] Consequently, F provides an isomorphism between the 3 x 6 grid and a subgraph of Qs. [Note that the 3 x 5 grid has 22 edges while Qs has 5 - 2+ = 80 edges} Assign the Gray code {00,01,11,10} to the four horizontal levels: top ~ 00; second (from the top) - 01; second from the bottom ~ 11; bottom ~ 10. Likewise, assign the same code to the four vertical levels: left (or, first) ~ 00; second — 01; third - 11; right (or, fourth) — 10. This provides the labels for pi,p2,-.-, Pio, where, for instance, p; has the label (00,00), 2 has the Inbel (01,00),...,pr has the label (11,01),...,pi1 has the label (11,10), and pre has the label (10, 10). Define the function f from the set of 16 vertices of this grid to the vertices of Q, by $l(ab, ed)) = abed. Here f((ab,ct)) = f((asbiyexds)) + abed = aybyeydh = a = a,b = hue = e1,d = dh = (abjed) = (a:h,¢,ch) = f is one-to-one. Since the domain and codomain of f both contain 16 vertices, it follows from Theorem 5.11 that f is also onto. Finally, let {(ab, ed), (we, y2)} be an edge in the grid. Then either ab = wz and cd,yz differ in one component or ed = yz and ab, we differ in one component. Suppose that ab = wz ande= y, but df z. Then {abed, wey} is an edge in Qu. The other cases follow in a similar way. Conversely, suppose that {f((a:b,,¢14s)), #((00121,4h21))} is an edge in Qe. Then a,b,erd;, 1219121 differ im exactly one component ~ say the first. Then in the 301 grid, there is an edge for the vertices (0b,,¢r¢}), (1h, ed). The arguments are similar for the other three components. Consequently, f establishes an isomorphism between the three-by-three grid and a subgraph of Q4. [Note: The three-by-three grid has 24 edges while Q, has 32 edges.) Section 11.4 In this situation vertex b is in the region formed by the edges {ad}, {4\c}, {c,a} and vertex ¢ is outside of this region. Consequently the edge {b,e} will cross one of the edges {ad}, {d,c}, {a,c} (as shown). 302 From the symmetry in these graphs the following demonstrate the situations we must consider Ky: Kas: (a) Graph Number of vertices Number of edges Kay 1 28 Kru 18 7 Kran mtn mn (b) m=6 Let G = (V,E) be bipartite with V partitioned as Vj U Va, so that each edge in E is of the form {a,b} where a ¢ Vi, 6 € Vz. If H is a subgraph of G let W denote the set of vertices for H. Then W = WAV = WO(WUN) = (WOK) UWA), where (WV) A(WAMV) =O. Hf {zy} is an edge in H then {x,y} is an edge in G — where, say, 2 € Vj and y € Vz, Hence z € Wi, y € W, and H is a bipartite graph. (a) Let ¥ = {a,d,e,h} and Vz = {5,¢,f,g}. Then every vertex of G is in Vi UV; and ViNV, = @. Also every edge in G may be written as {z,y} where zs € Vj and y € V}. Consequently, the graph G in part (a) of the figure is bipartite. (b) Let Vj = {a,b,9,h} and Vj = {c,d,¢, f}. Then every vertex of G’ is in Vi UVj and V{N Vj = 0. Since every edge of G’ may be written as {z,y}, with z € Vj and y € Vj, it follows that this graph is bipartite. In fact G’ is (isomorphic to) the complete bipartite graph Kyy. (c) This graph is not bipartite. If G" = (V",E") were bipartite, let the vertices of G" be partitioned as ¥j" U Vj’, where each edge in G” is of the form {x,y} with x € Vj’ and v € Vj. We essume vertex a is in Vj', Now consider the vertices b,¢,d, and e, Since {a, 8} and {a,c} are edges of G" we must have 6, ¢ in Vj’. Also, {6, d} is an edge in the graph, 60 dis in Vj’. But then {d,e} € B" = ¢ € Vf’, while {c,c} € E” => e € Vj". There are four vertices in K, and we can select four vertices from those of Ky in (5) ways. Since each of the four vertices (in each of the (3) selections) can be the unique vertex of degree 3 in K;,s, there are 4(%) subgraphs of K, that are isomorphic to Ki. Alternately, select the vertex of degree 3 in Ky, — this can be done in n ways. Then select 303 10. 1. 12 the remaining pendant vertices — this can be done in (;') ways. Hence the number of subgraphs of K,, that are isomorphic to Ky. is “(5 ) = (n(n — 1)(n ~ 2)(n — 3)/6 = (4)[(n)(n — 1)(n — 2)(n — 3)/24] = 4(}). The vertices in Km, may be partitioned as Vj UV; where [Yj] =m, |Ve| =n, and each edge of the graph has the form {z,y} where x € Vj and y € V3. (a) In order to obtain a cycle of length four we need to select two vertices from each of Vj; and Vj. This can be done in Gg) ways — each resulting in a distinct cycle of length four. [Note: Say we select vertices a,b from Vj and vertices ¢,d from V3. We do not distinguish the cycles a> e+ b—+d—aandasd+b+c+a] (b) For a path of length two there is one vertex of (path) degree 2 and two vertices of (path) degree 1. If the vertex of (path) degree 2 is in Vj then there are m{(") such paths. There are n(‘;) such paths when the vertex of (path) degree 2 is in Vz. Hence there are m(3) + n(3) = (1/2)(mn)[m +n — 2] paths of length 2 in Kinn- (c) Here a path of length 3 has the form a —+ b> ed where a,c € Vj and b,d € V3. By the rule of product there are (m)(n)(m — 1)(n ~ 1) = 4(3) (3) such paths in Kn. (a) 2 (b) 6 (= 2(3)) (©) 14 (= 47) (a) 2m (b) (1/2)(7)(3)(6)(2)(5)(A)(4) = 2520 (©) 50,295,168,000 i {a/2ynyeaxn ~ 1m — I(r ~ 2)---2)(n = (m+ D\(A(m — m) Let G = (V,E) be bipartite with V=VU¥;, Wn; = 6. If G has a cycle of odd length then there is an edge in the cycle of the form {x,y} with z,y€V; (or z,y€ V4). This contradicts the definition of a bipartite graph. Partition V as VWiUV with [Vi] =m, |Val = u—m. If G is bipartite, then the maximum number of edges that @ can have is m(v—m) = —[m ~— (v/2)}? + (v/2), a function of m. For a given value of v, when v is even, m = v/2 maximizes m(v — m) = (v/2)[v — (v/2)] = (v/29. For » odd, m= (v—1)/2 or m= (v+1)/2 maximizes m(v —m) = [(v ~1)/2]{v ~((v ~1)/2)} = [(v~ 1)/2){(v +1)/2} = (et Die” ((o + 1)/2)] = (x? — 1)/4 = [(v/2)9] < (0/2). Hence if [E] > (v/2)*, @ cannot be bipartite. (a) There are 3: (i) Kis: (ii) Kay; and (iii) Kyo. (b) [n/2| for ne Zt, n>2 18. (a) a: {1,2} E (4,5) bi {3,4} {2,5} 2,3} a: {2,4} {1,3} e: {3,3} & {14} a ¢ (b) G is (isomorphic to) the Petersen graph. (See Fig, 11.52(a)). 14, (a) (2) 3) Not cM? BX PY Graph (1) shows that the first graph contains a subgraph homeomorphie to Ka, 80 it is not planar. The second graph is planar and isomorphic to the second graph of the exercise. ‘The third graph provides a subgraph homeomorphic to K3,3_so the third graph given here is not planes. Graph (6) is not planar because it contains a subgraph homeomorphic to Ks. AN ® 15. ‘The result follows if and only if mn is even (that is, at least one of m,n is even). Suppose, without loss of generality, that m is even — say, m = 2t. Let V denote the vertex set Of Km where V = VjUV, and Vi = {015 025-+- 501) Upty-+-20m fo Va = (Way Way on} The mn edges in Kw, are of the form {v;,wj} where 1 5(53), or |E| > (1/2)(5)(53). And from Theorem 11.6 we have |V| = |E|~-53+2 = |E|~B1 > (1/2)(5)(53)— 51 = (265/2) — 51 = 81}. Hence |V| > 82. 10 (a) For each component Cj = (Vi, Hi), 1S i Sn, of G, if ¢ —%j42= rj, Summing as i goes from 1 to n wehave e~v+2n the infinite region is counted n = n(G) times, Hence ¢—v-+n+1 (b) Using the same notation as in part (a) we have 3r; < 2e;, 1 Si 6 for all v © V. Then 2¢ = Suey deg(v) > 6|V|, so € > 3]VI, contradicting ¢ < 3|V|—6 (Corollary 11.3.) (a) Suppose that G = (V,E) with |V|=11. Then @ = (V,E,) where {a,b} € Ey if {a,b} ¢ BE. Let e = {Ele = |B). Hf both G and @ are planar, then by Corollary 11.3 (and part (b) of Exercise 20, if necessary), ¢ < ave 6 = 33-6=27 and e; < 3|V|—6 = 27. But with |V| = 11, there are (3) 55 edges in Ky, 80 {B|+ |Z) = 55 and cither > 28 or e; 2 28. Hence, one of G, G must be planar. If G=(V,E) and |V} > 11, consider an induced subgraph of G on VC V where Ke ¢ a d 3 23. a4. 25. 26. (a) 2e > kr = R2+e—v) => 2— Be > k(2—v) = eS [k/(k— 2M - 2). (b) 4 (c) In Kaa, ¢ = 9, v = 6. [k/(k - 2)l(v — 2) = (4/2)(4) = 8 <9 =e. Since Kas is connected, it must be nonplanar. (a) Here k= 5, 0 = 10, e = 15 and [k/(k — 2))(v — 2) = (5/3)(8) = (40/3) < 15 =e. Since the Petersen graph is connected, it must be nonplanar. @ (b) There are no pendant vertices. But this does not contradict the condition mentioned Because the loops contain other vertices and edges of the graph. (a) The dual for the tetrahedron (Fig. 11.59(b)) is the graph itself. For the graph (cube) in Fig. 11.59(d) the dual is the octahedron, and vice versa. Likewise, the dual of the dodecahedron is the icosahedron, and vice verse. (b) For n € Z+, n> 3, the dual of the wheel graph W, is Wa itself. (a) The correspondence a v, b-» w, cy, d—+ 2, e+ 2 provides an isomorphism. © @® » ® > (/ 7 ‘ PRA 2 (c) in ths first graph in part (b) vertex cf has degree 5. Since no vertex has degree 5 in the second graph, the two graphs cannot be isomorphic. 307 27. 28. 29. be ‘The number of vertices in G4, the dual of G, is r, the number of regions in a planar depiction of G. Since G is isomorphic to Gt it follows that r = n. Consequently, |V|— |B] +r = 2=n—|B)+n=2= |B] =2n-2 Proof: a) As we mentioned in the remark following Example 11.18, when G,,G2 are homeo- morphic graphs then they may be regarded as isomorphic except, possibly, for vertices of degree 2. Consequently, two such graphs will have the same number of vertices of odd degree. b) Now if G; has an Euler trail, then G; (is connected and) has all vertices of even degree ~ except two, those being the vertices at the beginning and end of the Euler trail. From part (a) Gz is likewise connected with all vertices of even degree, except for two of odd degree. Consequently, G has an Euler trail. [The converse follows in a similar way.] ©) If G, has an Baler circuit, then G, (is connected and) has all vertices of even degree. From part (a) Gz is likewise connected with all vertices of even degree, co G, has an Buler 308 4 cireuit. [The converse follows in a similar manner.] Section 11.5 @) @) (©) (d) ‘The graph is a path (cycle). (a) Hamilton cydle: a+ g + ki thabsceod4jof4esa (b) Hamilton cycle: ad beg j>ivfrohocwa (c) Hamilton cycle: a he fg3ivd—+e+b—a (a) The edges {a,c}, {c,d}, {4,5}, {b,€}, {e,f}, {f,9} provide a Hamilton path for the given graph. However, there is no Hamilton cycle, for such a cycle would have to include the edges {6,d}, {5,e}, {a,c}, {a,¢}, {9, f}, and {g,e} - and, consequently, the vertex e will have degree greater than 2. (e) The patha +b +c dte+jrishigofokslomnois one possible Hamilton path for this graph. Another possibility is the path a + b> c+ d>irhagofakal+m—+n-o-+j + €. However, there is no Hamilton cycle, For if we try to construct # Hamilton cycle we must include the edges {a, 5}, {a, f}, {F.4} {81}, {se}, {ei}; {ise} and {n,0}. This then forces us to eliminate the edges {f,g} and {i,j} from further consideration. Now consider the vertex i. If we use edges {di} and {é,n}, then we have o cycle on the vertices d,e,j,0,n and i ~ and we cannot get a Hamilton cycle for the given graph. Hence we must use only one of the edges {d, i} and {i,n}. Because of the symmetry in this graph let us select edge {d,i} - and then edge {hy #} 90 that vertex i will have degree 2 in the Hamilton cycle we are trying to construct. Since edges {di} and {d,e} are now being used, we eliminate edge {c,d} and this then forces us to include edges {b,c} and {c,h} in our construction. Also we must include the edge {m,n} since we eliminated edge {i,n} from consideration. Next we eliminate edges {h,m}, {h,g} and {5,9}. Finally we must inchide edge {m,/} and then eliminate edge {i,g). But now we have eliminated the four edges {6,9}, {f,9}, {h,g} and {Ig} and g is consequently isolated. (O) For this graph we find the Hamilton cycle a +b +e+d e+ jrivrhog— lom-ns03t+sorsgspako fsa, (®) Consider the graph as shown in Fig. 11.52(a). We demonstrate one case, Start at vertex a and consider the partial path a —+ f —+ i» d. These choices require the removal of edges {f,h} and {g,i} from further consideration since each vertex of the graph will be incident with exactiy two edges in the Hamilton cycle. At vertex d we can 309 6. go to either vertex ¢ or vertex e. (i) If we go to vertex ¢ we eliminate edge {c,d} from consideration, but we must now include edges {e,j} and {e,a}, and this forces the elimination of edge {a,b}. Now we must consider vertex b, for by eliminating edge {a,b} we are now required to include edges {4,g} and {b,c} in the cycle. This forces us to remove edge {c,h} from further consideration. But we have now removed edges {f,h} and {c,h} and there is only one other edge that is incident with h, so no Hamilton cycle can be obtained. (ii) Selecting verter e after d, we remove edge {d,c} and include {c,h} and {b,c}. Having removed {g,i} we must include {g,6} and {g,j}. This forces the elimination of {a,b}, the inclusion of {a,e} (and the elimination of {e, j}). We now have » cycle containing a, f,i,d,¢, hence this method has also failed. However, this graph does bave a Hamilton path: a+b —+c+d—+e+joh—of— ing (b) For example, remove vertex j and the edges {e,j},{9,j},{h,j}- Then ¢-»a—> f h-+0e+b-+9 i+ d—e provides a Hamilton cycle for this subgraph. (a) If we remove any one of the vertices a, or g, the resulting subgraph has a Hamilton cycle. For example, upon removing vertex a, we find the Hamilton cycle b+ d— c+ fogresb (b) The following Hamilton cycle exists if we remove vertex g: a+ b—+e+d—e—> jto+nsicho+m—+1l—+k— fa, A symmetric situation results upon removing vertex i. Let the vertices on the cycle (rim) of W,, be consecutively denoted by vj,U2,.-.,0,, and let 441 denote the additional (central) vertex of W_. Then the following cycles provide n Hamilton cycles for the wheel graph W,. (1) Oy bag U2 Ug POG Da FO OY; (2) vy 9 v2 ppt Ua U4 oF Od On > OY (3) v1 0g Va Ong PVE Dyed On OY; (1 = 2) vy > 02 Uy 4 oF Dead > Ong > Pn OH; aD (2) 0 9 0g 9 0g 9 04 9 oF Dye UF Mad PL (a) (1/2)(n- Dt (b) 10 (©) 9 (a) Partition the vertices of Kan as XUY where |X| = |¥] =n. Write X= fest). 12ahs Y= {¥rstes--stah each edge of Ky is of the form {2;,y:} where 1Séj $n. Since x is on every Hamilton cycle of K., start with 2). There ere then n choices for yj where {21,y;} is on the cycle. From y; we can return to X in n-1 ways (we cannot use z, again), forming the second edge {y;,x;}, where 2 ) Im a similar way, if G@ has a Hamilton path P, then P has |V|—1 edges and the vertices on P must alternate between the vertices in Vj and those in Vs. Since Vil # IVI, it follows that {V4] — [Val = 1. (c) Let V = {a,b,c,d,e} with Vj = {a,b}, Ve = {e,d,c} and E = {{a,c}, {a,d}, {a,e}, {b,c}. au. 1. (a) a a ¢ b ¢ b () a b a b 4 c 4 c id(a) id(0) id(c id(d) =2 a b a c 12. Proof: From Example 11.26 we know the result is true for n = 2, Assume that Q, has a Hamilton cycle for some arbitrary (but fixed) n > 2. Now consider Q,.1. From Example 11.12 we know that Q,41 can be constructed from two copies of Q, ~ one copy, Qno, induced by the vertices of Qui1 that start with 0, the other copy, Qn, induced by the 312 13 14. 15. 16, 17. 18. 19, 20. vertices of Qu41 that start with 1. Each of Q,,o, Qa: has « Hamilton cycle - each may have more than one but we agree to pick the same cycle in each. [The only difference in the cycles is the first bit in the vertices of an edge ~ that is, if {02,0y} is an edge in the Hamilton cycle for Quy (where 2,y are binary strings of length n that differ in only one position), then {1z, 1y} is the corresponding edge in the Hamilton cycle for Q,,1.] Select edges {0v,0w} and {1v,1w} from the Hamilton cycles for Quo and Qq,, respectively. Remove these edges and replace them with the edges {0v,1u}, {Ow, lw} (in Quix). The result is a Hamilton cycle for Qnia- Tt now follows from the Principle of Mathematical Induction that @,, has a Hamilton cycle for all n > 2. Proof: If not, there exists a vertex x such that (v,z) ¢ H and, for all y €V,y # 1,2, if (v,y) € B then (y,z) ¢ B. Since (v,2) ¢ B, we have (2,v) € B, as T is a tournament. Also, for each y mentioned earlier, we also have (z, y) € E. Consequently, od(x) > od(v)+1 ~ contradicting od{v) being a maximum! Let @ be any path with more than three vertices. a ‘ 4 For the multigraph in the given figure, |V] = 4 and deg(a) = deg(c) = deg(d) = 2 and deg(s) = 6, Hence dog(z) + deg(y) > 4 > 3 = 4—1 for all nonadjacent #,y € V, but the multigraph has no Hamilton path. ’ Corollary 11.4: Proof: For all z,y € V; deg(s) + deg(y) 2 2{(n ~ 1)/2] = n—1, so the result follows from Theorem 11.8, Corollary 11.5: Proof: Let a,b € V where {a,6} ¢ E. Then deg(a) + deg(b) > (n/2) + {n/2) =n, so the result follows from Theorem 11.9. For n > 5 let C, = (V,E) denote the cyele on n vertices. Then Cy, has (actually is) a Hamilton cycle, but for all v € V,deg(v) = 2 i= {Vv}. Proof: Let ,y € V with {x,y} € E. Consequently, z, y are nonadjacent in @. In @ we find that degg(x) = dega(y) > 2n+2—n = n+2, so dega(z)+dega{y) = 2n+4 > In+2 = |Vj. ‘Therefore, by virtue of Theorem 11.9, the graph G has a Hasmilton cycle, 313 21, 22, 23. 24, When n = 5 the graphs Cy and Cs are isomorphic, and both are Hamilton cycles on five vertices. For n > 6, let u, » denote nonadjacent vertices in C,. Since deg(u) = deg(v) = 3 we find that deg(u) + deg(v) = 2n —6. Also, 2n ~6 > n <=> n > 6, s0 it follows from ‘Theorem 11.9 that the cocycle ©,, contains a Hamilton cycle when n > 6. (a) fx fvandy # », then deg(z) = deg(y) = n—2, and deg(z) +deg(y) = 2n-4>n, for n > 4. Hf one of z,y is v, say z, then deg(z) = 2 and deg(y) = n — 2, and deg(z) + deg(y) =n. (b) From part (a) it follows that deg(z) + deg(y) > n for all nonadjacent x,y in V. Therefore G,, has a Hamilton cycle — by virtue of Theorem 11.9. (c) Here |B| = (*;') ~1+2, where we subtract 1 for the edge {v1, v2}, and add 2 for the pair of edges {v1,0} and {v, v2}. Consequently, |E| = ("5") +1. (d) The results in parts (b) and (c) do not contradict Corollary 11,6. They show that the converse of this corollary is false — as is its inverse. (a) The path v + vy > v — v3 +... vg-1 provides a Hamilton path for Hy. Since deg(v) = 1 the graph cannot have a Hamilton cycle. (b) Here |E| = ("5") +1. (Go the number of edges required in Corollary 11.6 cannot be decreased.) (a) 200 Since the given graph has a Hamilton path we use this path to provide the following Gray code for 1,2,3,...,8. o11 1: 000 2: 010 3: lio 4: 100 5B: 101 6 it T Ol & 001 (b) 1: 0000 0001 3: 0011 oni & MM 1110 7 M00 1000 % 1910 i011 1001 1101 13: 0101 0100 15: 0110 0010 314 25. 26. @) @ facfh}tag}s (i) {2}, {uy} (b) @ 2G) =4; (#) 6(@)=3 ©) @) 3 3 Gi) 3 wy) 4 WE (vi) The maximum of m and n. (4) The complete graph on {Z| vertices. (a) Hnot, there is an edge {a,b} in B where a,b € I. This contradicts the independence of 1. (b) A Hamilton eycle on v vertices must have v edges. © 2 eS Let I = {a,b,c,d,f}, as shown in the figure. Here KX. v= I,e= 18, and ¢— Dye: deg(v) + 27) = 18 - (4+ 5. (a) P(G,A) = A-1)° (b) For G = Ky, we find that P(G,A) = A- 1)". x(Kin) = 2. (8) (i) Here we have A choices for vertex a, 1 choice for vertex b (the same choice as that for vertex a), and 4—1 choices for each of vertices x,y,z. Consequently, there are (A ~ 1)* proper colorings of Kz where vertices a and 8 are colored the same. (fi) Now we have \ choices for vertex a, A —1 choices for vertex b, and A — 2 choices for each of the vertices 1, y, and z. And here there are 4(\— 1)(A — 2)® proper colorings. (b) Since the two cases in part (a) are exhaustive and mutually exclusive, the chromatic polynomial for Ky. is A(A = 1)° + A(A = 1A = 2)9 = ACA = 10° — 5? + 10 — 7). x(Ka) = 2. (0) P(Kansd) = A(A— 1)" + AQ TQ — 2)" x(Kan) = 2 (s) 2 {b) 2(n even); 3 (mn odd) (c) Figure 11.59(d): 2; Fig. 11.62(a): 3; Fig. 11.85(3); 2; Fig. 11.85(ii): 3 (4) 2 If G=(V,E) is bipartite, then V=¥, UV; where Vi V;=@ and each edge is of the form {z,y} where z €Vi,y € V2. Color all the vertices in V, with one color and those in Vy with a second color. Then x(@) = 2. Conversely, if x(G) = 2, let Vi be the set of all vertices with one color and V3 the set of vertices with the second color. Then V = Vi UV; with ViNV;=6 and each edge of G has one vertex in V; and the other in V2, so G is bipartite, (@) (1) AA-1PA-2) @)AA— 1-2) - 2042); (3) AQ = 1) - 2)? ~ A+ 7) ©) GQ) 3 23 @) 3 {c) (1) 720; (2) 1020; (8) 420 (a) These graphs are not isomorphic. The first graph has two vertices of degree 4 ~ namely, f and k. The second graph has three vertices of degree 4 ~ namely u,w,z. 316

You might also like