Excrcises In Evertives I-6. erandane die given stacement inos proposi. tinal lasic uite itbe propoitions provided. are an atminimane. Eupres your amocr in tereir af f : are an adainitratoc" 2. Yoer cat see the movic ody if you ace ore 18 ycars old over 18 years old," and A: "You have the permission of a parent." 1. You can eraduate only if gou have formpleted the requireat least 32GB free hard disk space" inetits of your major and you do not owe money to the univenity and you do not bane an overduc librury book, 7. Express these systern specifications using the Prop tions P "The message is seanned for viruses" and message was sent from an unknown system" the with logical connectives (including negations). a) "The nessage is seanned for viruses whencied message was sent from an unknown sysem:" b) "The message was sent from an unknown byteat. Expeen yoer answer in ternins of g? "You can graduate," m: "Yoe awe money to the univenity," r " "You have compieted the rocuirements of your majar," and be "You have it was not scanned for viruses." at overdue hioray book." c) "It is necessary to scan the message for viraiesusch ever it was sent from an unknown systeta," 4. To use the wirtess network in the aiport you ands pay d) "When a message is not sent from an uakeob nip ina the daily fee unlety you are a tabisribist to the service. it is not scanned for viruses." lime of your binth bith of yoar pereith selecitisens, and yeu bave lived at kearr 14 years an the comntry. Eapreis your answer io termei of 5. "Yoe e e cligible lo be Prex. ident of the U.S A. "a "You are at lewe 35 yeas old," b. "You were bom in the US A," p : "At the time of your Eirth, both of your pareats where citizcns," and r. "You hine lived at leas 14 years in the U 5. A." " 8. Express these system specifications using the proy bons p "The user enters a valid password, q"Thitil granted," and r "The user has paid the subscriptitiole. and logical connectives (including negations). a) "The user has paid the subscription fee, but doss coter a valid password," b) "Access is granted whenever the uset has puid to stabscription fee and enters a valid passwoed. c) "Aceess is denied if the user has not paid the sutkan tion fee., d) "If the user has not entered a valid passwocd be by you answer in terms of a: "You can upgrade your oper-_ tioaing. The kernel is not fumetioning or the sy internpt mode, If the system is not in multinice ur the sysuem ailu are is toine upgradod, usen ianent ascess the file syofem. If wers can access the ble wy wem. if Kandi will the there, and Kinhi wid not attend uniess Bas-: then ifroy can save now files. If users canaul save new. files, then the syodem soffu are is not being uperaded." 11. Are cheve aysten spocitications scobitstent? "Ttie router: can sena poskets io itse edee sy atem coly if it wrppers the now badress youce. For che reuner bo mpport the hew addrens space it is necessary that the lateit ingtreare releave be indealied. The nuefer can send packets bo the colpe ayschint aleo does. Which combinations of these thece friends. can you invite so ar food to make soencene unhappy? sem if the tantut haftware rellewe is instalfed. The router Evercises 19-23 retale to inhahitants of the kuland of knights the truat and knaves always lie. You encouncer two people, A and B. Determine, if possible, what A and B are if they address you in the ways described. If you carinot detrrmine what these two people are, can you draw any conclusions"l does not stpport the new aMleces space" 20. A says "The teo of us are both knightr" and 8 ays" "A 12. Ane these aysfem ypecificarions cunsistem? "If the file wsiem is noe locked, ahcn natw mesages will be queued. If the file system is met locked, aben the systrm is fanc: tioning normally, and conversely. If new macsages are not. queasd, then they will be aene to the message buffer. If the file syspent is not bocked, then new messabes wilt the went fo the message bufler. Now messagcs will not be sent so the moss-1ge butfec" 13. What Bookean scarch wvald you tese to fock for Web paces about teaches in New Jersoy? What if you wanted fo find Web pagrs ahout beaches on the iale of Iersey (in bet Enjlish Channel)? A Brad C. You koow one of these exvotunter three people, A, B, and C2, You know one of these tye type of person each of other two is, For each of these situatiosis, if possible, determune whether there is an unique todution and determine who the knave; kniggti, and afy are. When there is no unique solution, list all possible solutions or state that there are no solutions. - I5. Each inhabitane of a remote village alsays tells the truth or always lies. A villager will give oaly a "Yes" or a "No" 24. A says "C is the knave," B says, "A is the knight," and C response to a queston a tourist asks. Suppose you are a fourist visiting rhis area and come to a foek in the road. -says "1 am tho sgy," One branch leads to the ruins you want to visit; the ocher branch leads decp iato the jungle. A villager is standing at the fork ia the road. What one question can yoe ask the villager to determine whach branch to take? 16. An explorer is capturcd by a group of cannibals. There are fwo types of eannibals those who always tell the truth C says "B is the knight." nnd those who always be. The cannibals will barbecue the cyploref anless he can determine whether a particu- 26. A says "I am the knave, B says "I am the knave," and C dar cannibal afways lies or always tells the truth. He is says "I am the knave" aifowod to ask the cannibal exactly one question. 27. A says "1 am the knight," B says "A is teling the zuth" 2) Explain why the question "/he you a liar?" does not and C says "I am the spy." work b) Fatif q question that the explorer can use fo determine 28. A says " 1 am the knight," B says," A is not the knave," Flether the cannibal always lies or ahways tells the and C says " B is not the knave." truta. 29. A says "1 am the knight," B says "I am the knight," and C says "I am the knight." 30. A says "I am not the spy." B says "I am not the spy." and C says " A is the spy." 31. A says "I am not the spy," B says "I am not the spy," and C says "I am not the spy." 17. Whea throeprofessors are seated in a restaurant, the host- Exercises 3238 are puzzles that can be solved by translating ess dws them: "Does everyone want coffee?" The first professor says: "I do not know," The second professor statements into logical expressions and reasoning from these then silys: "I do not know." Finally, the third professor expressions using truth tables. says: "No, not everyone wants coffee. "The hostess comes. 32. The police have three suspects for the murder of Mi back and gives coffee to the professors who want it. How Cooper: Mr. Smith. Mr. Jones, and Mr. Wullams. Sminl did she figure out who wanted coffee? Jones, and Williams each declare thas they did not k. Cooper. Smith also states that Cooper was a friend 18. When planning a party you want to know whom to inJones and that Williams disliked him. Jones also sta vite. Among the pcople you would like to invite are three touchy friends. You know that if Jasmine attends, she will that he did not know Cooper and that he was out of to the day Cooper was killed. Williams also states that 24 1 The Fuasidaine. Lerk and Frows saw boit Smith and Jone with Cocecr the dave of alled a) one of the thise men is grale. the iwo inmstest men are aclited the enuth, the the stakements of the guily man my or my net be mie? relative saluries of Fred. Mageic, and Jacice from what Sicre kisowa? If so, who is paid the mast and who the leas? Eyplain your frasoning. 4. Fue friends have awees so a chat rocent is it passible wo detcrinine who is chatrieg if the foliswing of bosh, are chatting. Kowal? Either Kovin or Hearher, of bach, are chirting Either Randy or Vijay, tut not bosha, are chasting are either both Milk is drunk in the mothe The Norwegian's house is hy. blue one. The violinist drinks orange guice. The ctutritg of ncither is. If Hearher is chacting. then so are. Atery and Kevin. Explain your reasoning. are honest and? 15. A detective has interviend four witnesses to a crime. From the stories of the withcsses the detective has con- 40. Find the output of each of these combinatorial cirpaia . cluded that if the betler is relling the truth then so is the cook the cook and the gardener cannet buch be telling the Gruth: the gardener and the handyman are noe both lying: and if the handyman is telling the truth then the cook is lying. For each of the four nitnesses, cap the detective detemine whether that perion is telling the truth or lying? Evplain your reasening. 36. Four finends kave been identifide as serpects for an unsuthoriaed access into a computer 5y=4cm. They have madestatements to the investigating authorities. Alice said "Carlas did it." John szid 7 did not do it". Carlos said "Diana did it" Diana said Tarios licd whert bin sild that 41. Find the output of each of these combinatorial cirue I did it:" a) a) If the authonities also know that es astly oac of the four surpects is relling the in dh, thiw dit at? Explain your reasoning b) If ahe authorities also loow finat ecacdy one is lying. who did it? Explain yoer reasuninw? 37. Suppose there are igns an the doon io two rooms, The ajgn on the first door reads "In this room there is a lady. and in the other one there is a tiger"; and the siggn on the secood door reads "In one of ehese rooms, there is a lady, and in one of them there is a tiece." Suppose that you know thar one of thexe signs is iruc and the other is false. Behind which door is the lady? -38.Solvethisfamouslogicporele,altrbutedtoAlbertEin-42.Constructacombinatorialcircuitusinginiester stein, and known as the zebra puzele. Five men with OR gates, and AND gates that produces the oup different nationalities and with different jobs live in coa- (pr)(yr) from input bits p. g. and r secutive houses on a stroet. These hoeses are painted different coloss. The men have different pets are painted difOR gates, and AND gates that produces the cute ((pr)q)(p(qr)) from input bils q, and r