Sunteți pe pagina 1din 5
SH12 Answers to Odd Numbered Exercises W.vsdhaety 4 2 A¥w(Pr.s) = (0 = 2ay~3ePs) )SH(PLA) AYP) > ¥ =) ©)3ndn(PUs) A Pla) Ais # A YP)» Y=) 3K 30, HAN PAP) APC PUAN F GAR F BAWPL) +O =nY Y= svy =x) 2.Soppose tht 3(PG)> Ot) fs eae The eer Oy) te for some S, in which case WsP(s) 3 Os) iste oF Pls) fe fr some i, im which case WeP(2) > 3cOUs) ists, Co ‘ery supe that (P(x) > QC) ae. That means that Vi(PU) OG) tse, which implies Ve PCa) aad ¥(~0{8), This Tater proposton is equivalent 19 “Be0G), Ths, ¥ePC)-> 2eQU0) is tse. 38.No Bi.yevedy Tis y.2), where Ts, y.2) i the saement hr student hs en clas yn dane, where the domains are the set of ser in the clay, the Set of course a this unversiy an the et of department in the Sho! of meat scenes 29.303) 7,9) a Srvs(@y¥n(T Gn) w =9)) 023), whee Ts9) ean hat sien ba ike ly andthe dona al Students in his cs SI. Pla)~ Ola)and Oa)» Rio) ‘by unser instanton; then “O(a y mos tlle and “PCa by modes tens 33. We ge a pot by cone poston an show ta if vs raonal ten atonal, Suing tought tha > 0, Sapo at J = ais Itong #0. Then = (= pig’ baboraonlg? 38. We ean ge a construct rot ty letingm = 10° + 1. Then? = (105+ 1 > (108) = 10!” 37.23 ant be writen athe sun fit tes. 39.223 cannot be weten athe sum of 36h power CHAPTER 2 Section 2.1 Lay {1.1} )(1.23.45,6.78,9,1011) 0) (0,14, 9.16 25,36,49,64,81) 0" 2a) Yes B)No No S.ayYes—W)Nog¥e5. No @)No_ HINO Teayfalse byFalse e)Fube True) Fale 1) Fale oa OTe <= Ca @Ei Fetnary 13. The dots in certain regions indicat that those regions are ot emp LSS" 1S. Suppose that x € A, Becawse AB this implies that eR, Because BCC, we see that v €C. Because xe 4 inplies that x €C, it folws that ACC. 17a) | BL 2 3 “I9.ay(0. al) by (0), [Ph te.8)) 9 (0,(0).{0)) 0,10)" 21-a)8 Byte "92 Ba) (a9) Guy hl Pd, yl0.2)(b.2) (6.2) (4.2) B)1G.a) O40) Goh Grd), Goa), Gb, Coe), .d)) 25.The set of tipls (abe), where ais an aiine and 2B and c ae cites (@.yylzeW and ye Aye xa Boon 31. The elements of x # x C sons of Supls (a, 6.0), where a A, be B, and c€C, whereas the elements of (Ax B) x Cook like (0,6). c)ordered pis, the fst coordinate of whichis again an ordered pair. 3.a)The ‘quire of areal number is never —1. True b) Thre exists aminteger whose squares 2 False) The square of every lmeger i positive False) There isa real number eq ‘0 i own square. True 38.4) (1.0.1) b)Z~ (0.1) ©) 37. Wie mst show that (a (0, 4)) = (le. fed} it and only ifa'= and b= d. The if partis immediate, So assume these to sets are equal First, consider the case when 424 6. Thes (a), 2b) canains exactly two elements, one ‘of which conans one element. Thus, c.f.) must have the same property, 0 ¢ and) isthe element containing exaetly one element Hence, fa = (c). which implies that «1c. Also, the two-lemeat Sets a,b) and fed} mst be tual. Because a = and a #5, it flows that b = d. Seo- cond suppose tata = b Then {a {a2} = (al}aset with (cud) hasonly one element, wich sad the sts] then Fle yoo Represent each subset ofS with aitstring oengh n,wbere then bits 1 ifand oaly fa, € 5. To generat al sobsct of S ist all bitstringsof length (for instance, in increasing ) The st of students who ive within one mile of schol and who walk 9 classes b) The set of students who live within one mile of school or who walk to classes (or who Aoboth)—¢) The se of students who lve within oe mile oF school but donot walkto classes a) Theset of students who valko clases but ive mre than oe mile ay fom schoo 3.)(0.1.2345.6 HB) (1.2.45) A) (0.6) [x |—Gee A= (x x € A)) = tr |x Al Ta AUU ale re Ave eU] = belxeav T) (IMU ANv=tl re AAT ed) 9.) AU Melee aveg [lvedargd}=— Ia) au WleBvxed}=8UA DANB=[x[redAreBlalelve Bare dla BOA. 13.Supose xe AN(AUB). Then re A and AUB by the definition of intersection, Because x € 4, We have proved thatthe let-hand side is @ subst of the righ-hund side. Conversely etx A. Then by the dfn tionofunio,x © AU Bas wel Therefore © A(AUB) by the definition of intersection, so the sighchand side is 9 Subset ofthe lethand side. 1S.a)x (HUB) sxe AUB) =—WeAvre Bmw e A Ame) rgAnrgBareanreBaxcank aes] Ten /e AN BNC axgANBNC =x gave ey réCareAveeBvseC =xeAUBUC » anane]anano)| T 7 1 1 1 1 ' L 19, Both sides equal (x |r €AAx¢B), 2.x €AU (re Avice BY e(AUB)UC (eA) V WER Ar eC) = (reAvees)Atee AvreC)=xe(AUB)M(AUC) 28.) (46) 789,10} 6) 18.5,6,8, 10) €) (024.5, 77.4) Thedouble-shaded prion sthe desired 1b) The desired seis the en shaded potion. Answers to Odd Numbered Exercises $13 1) The desired sets the entre shaded potion, @) B.a)BCA BACB QANB = @Nothing, be use thisisalaysine @)A=B BACB = ¥a(r An reB) = Wee gB> x gd) = ¥xieR ore A)= BCA 3% The st of students who ae computer Science majors but ot mathematics majors oe who are math: matics majors but not computer sence majors 38, An element isin (AU B) ~(A1B) sb inthe union of A and B but no inthe intersection of A and, which means thai is in ether of B but not in bth A and, This is ‘exactly what it means for an element to belong t0 A @ B. Sa) ABARIA~ UA A)=9UH= AB A gagu 4 MA@A=(A-AVU baLYs BY. BI) aray'ay 10.1) °, bZ-0.8 OR L-1, U1, 90,6 "Sea [1,2.3.4,7,8,9, 10} B)2,4,5.6.7) {1,10} $8. The bitin the th position ofthe bit sting Of the difference of two sets is Tif the Ah bit of the frst string is 1 andthe ah bit of the second sing is 0, ind is 0 otherwise. $5.2) 11. 1110 0000 0000 0000 ‘000 0000 "01 1100 1000 e000 0160 0101 0000 11 1110 1000 0000 0100 O101 0000, representing Ia, edee.g.p.t.v) BIT 1110-090 0000-0000 060) 0000.01 ‘1100 1000 0600 O100 a101 0000 = OL 1100 6000 0000 0000 00 0000, representing {bc «(11 1110 0000 0000 0000 0900 0000 v0 0110 0110 (001 1000 0110 0110) » (OF 1100 1900 0000 0100 0101 (000 v 00 1010 0010 a000 1000 GOI0 O111) = aE L110 uaa e018 8 0 0 111 6111 = 01 1110 0010 e000 1000 o110 0110, ening [ede t.o, ho) -€) 11110 0000 Cd ‘1000 0000 d600 01 1160100 8900 O160 o101 aaa 00 1010 0010 o000 1000 ooI0 0111 v 00 0110 o110 ‘001 1000 0110 o110 = 11 1110 110 0001 1100 O11 DILL, representing a.bicde.gshi.n.o,pstisey.2} Sta) 1,2,3.(1.2.3)1 b)(8) €)(0,(0)) @) (8.0), (.(0) $9.) Ba, 3-b, Loe, ded) b)LR-a, 2-8] Sila Vee) (Ub Ad) @)(S-0, $20, Loc,4-d] GIF =(04 Alice, 1 Brian, 06 fred, 09) Oscar, 05 Ria), R= (06 Alice, 02 Bran, 08 Fred, 0.1 Osc, 03 Rim)” 63.F R= (04 Alice, 08 Brian, 02 Fred, 01 Oscar, 05 Rita Section 2.3 8) /(0) is not defined, 0) f(x) is not defined for <0. 6) f(s) is ot weldfined because thee ae two S14 AnswerstoO38:Numbred Exess isnot vues assigned to each x. 3.a)Not a fume: tion DJA function e) Nota function §. 4) Domain the set of bit sings: range the set of integers b) Domain the set of bit sings: range the set of even noangatve integers «)Domain the set of bit sings: range the st of pomnegatve integers not exceeding 7 @) Domain the set of postive integers range the set of squares of pos- itive inegers = (1.4.9, 16,-..) Tea) Domain ZZ" range 2" b) Donain 2s ange 0.1, 2.3.4,5.6.7,8,9) {Domain the set of bit sings; range N' d) Domain the set of bit strings; range N9%a)1 )0. €)0 1 3 D1? bj Only the function Jn pat (a) 18. Only the fanetions in pars (a) and (A) '2) Onto. )Not onto c)Ont0-d) Not onto «) Ono 17.4) Thefunction f(x) ith fix) = 3x + whens > Dad f(s)=—3r+2 wher b)fC)=LL+1 oThe Tinton f(x) with f(x) = 2s + I when x > O and Hz when x <0 °@) ficy=x?+1 19.4) Yes b)No ©) Yes a) No 21. Suppose tat fis sry decreasing This means that f(x) > J) whenever x < y. To show hat g it sity intesin, suppose that x < y Then (3) = 1/fla) « 1//() = a0). Comes, supose that ¢ ‘esc increasing This means tit gs) = eG) whenever sxc. To show that f is sly decreasing, suppose tht XY. Then f)=l/gt2)> 1/a0)= (0). 3. Many ‘answers are possible. One examples f(z) = 17. 28. The Fanetion is ot one-one, 30 itis not invertible. On the restricted domain, the finetion is the identity finction fon the nonnegative real numbers, f(x) = x, 80 itis is own verse, 27. a) f(S)= [0.1.3] b)f(8) = 10.1.3, 5,81.) £15) = 10,816.40) @) f(S) = (1.12,35,65), 28.) Let andy be dsinet clomentsof A. Because is ne to-one, ) and g() ae distinct elements of B-Because fis oncstorone, flats) = (22%) and fle) = (F 290) are distinct elements of C. Hence, f og is one-to-one. byLety eC. Because fis onto,» = 0) for some be B Nowbocase gis onto, b = gx) frsomes € A. Hence, FO) flats) =(f 0 eX). I follows tat fog is ono 31. No, For example, suppose hat A= (a) i). Let g(a) = b, (6) = dad fe) = Pog arcento,batg isnot B.S +8) Then fand Parts, S'42c pr+2 36 fis onetoone because atb—-an mann = bya (2). Then (10 tal = th. Wiri-ler<2 90 = ive Also) £8) = REATIOES) = FAG) Leer = a) +6 whee € is ral umber wit Ose 3, Mens] x= < Ll + mfr f= Us] + andi istheinger closest. te = then x ~ |) = Lx), which isthe smaller ofthe two integers that suround x and ae these distance fom 5.48, Writ the real number x 3b La] re, where is el umber with 0 <¢ <1, Because o [xifolows that = —[e] <1 The ist m0 ie Beale Ose <1) su qualities, x ~ 1 [x) and x) = x follow diet, For the ther two inequalities, write = fr] ~€,whereO = € <1 Then 0 < [x] ~ x =, and the desired inequality follows AT. ay fx x. By the definition of the ceiling fne- tion, ifellows that] 0. The lf-and side is (—x] andthe Fightchandside is [x 1x isan integer, then boo sides equal “r-Otherwse, et r= n+, where a natural number and isa eal umber with 0 = ¢ <1. Then [=x] = =n — €) = mand [x] = =n be) = ~nalo, When < the ‘uation als holds because it an be abained by subta ingxfors. $3.[6)~ [a] =I 55.a)1_ B30) 126 3600 $7.2) 100 ¥)286 €)1030 430.200 8 Ge OL ea 1) See pat (a). 68. 1G) = (Y~ 1! 67.) foals) = TexeAnBosed and xe Be fue)=1 and sis Ina) = 1 feo fo Mores eer po Hehe) foyer l a fi Fede faayades 1 fae) 18) fra rEA@ bo Gedandry mate g tas eB) 2 Tne) fi) AIA) = 1 Oey Te, ene |x] is already an integer, [|xJ] = [x]. b) False; x= | is. oxo) Tei ory ian pe es pope shine fae aiicne 90 ane or Cieineec hn =n candy 8 eh ann fags and Ca are pase el unt es han Wihemncrtyemen tasty) weer mtmtl ormtat Thole oe ges expen eters tm sh mens deteee ne Geet inensha 0, 8 dl. Oe $423 brome =F 1} acount ‘Sesaple Mira) apse ingen ssa opal Somppue tutte te vie! ie ae pee gare es tn ome innpertnl0 Se Thenboh yradvisl ovate de teten andr sob Se eq It poste mca hn he see ease Sarre ecu ie sale pret str tins,m banonepsve aces enc haze ‘ber with 0 < € < 1. Then both yx and Ja] = vn =m are Sheen an et bab ef ie epics gat," 78a)Domain 2: comin Re donain of {Einio isthtet of nas ingest ttf ls stich unde -motatalcson 1) Doma sZacosun io 7 omnes lcs ferwich fs undcned sl funn.) Doma 25. 2endoin's maint ion 2 (2 (0 feof vas fr vith / suns Z(t te Kinston) Donan is 2 2 colbman doin of eto ct Zs tf vcs fr wich 7 weed is rol faci e) Dai 2 7 oan Sona of ints im) fm oo es stich (ned) i Os dae = yn oe all 1050. The next four frms are $346, $353, 37471, and S409. CHAPTER3 Section 3.1 mac 1, f=2, max i= 8, Ha, 606, = % mae itt 3. procedure sum fori == 200% ‘um = sum +4, [sum has desired value) procedure duplicates (2.03. nondecreasing ore) ‘k= [this coum the duplicates) a iter) integers in fsjtt end (6. the desired list] “procedure last even locaton, m0 fori valor ita; seven then k end (isthe desired leation or if there reno evens) a integer) 9, procedure palindrome checHaa...0: tng) fort == 10 [9/21 hen answer = false ue sting i palindeome} 1 procedure inerchangetx, real numbers) y ‘The minimum numberof assignments needed i thre. 1B.Linearsearchs 43 7, location 1S, procedure nsr(, 0.4 ---+0y:itegers) tei isin order: a) $"< ay) tye HT

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