0% found this document useful (0 votes)
32 views

HWKI

logic

Uploaded by

sizaralshufy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
32 views

HWKI

logic

Uploaded by

sizaralshufy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
Hand un 9->t by “Thursday. AB echoben MTH 207. Homework Le From the book « Section 11: 6, 8M 42, 45, 48,49, 20, 92, 24, 25 - * Section 1434 4, 4, 2/64 2 ABA © Saotion 642 4, 2,4) 5, 9, M4, 4d 33 Negatcat Malek 4, Sy (p + 0) If you know that the proposition (p Aq) —> (r Vs) is false, what is the truth value of the proposition p> Gvr Vs . If you know that the proposition p —> (q ~> s) is true, what is the truth value of the propesition r + (p > q) Are the two statements (p Aq) +7 and p+ (q+) equivalent? Justify. Given the statement: "If you understand the material, you will pass the test.” (2) Write its contrapositive (b) Write its converse (©) Write its inverse (a) Which of the above is equivalent to the original statement? Let P,Q and R be the following predicates: P(r) : x has three elements; Q(x) +x has an even number of elements and R(x, y) : © and y have the same number if elements. Write cach of the following statements in terms of P,Q and R and any quantifiers necessary, (2) Every set has 3 elements (b) If aset has 3 elements then it doesn't, have an even number of elements (©) There is no set that: has 3 elements (a) If x has an even mumber of elements and y has an odd nuniber of elements, then rand y have the same number of elements )-p vi pva op d) pag ® peg O-p gp A~g —h) sp vipa) a psa baer ogen @) pvavr 9 @>—~)VG@>—r) D Dr@voqan 7. Let p and g be the propositions tis below freezing, 4: Ihis snowing. ‘Write these propositions using p and g and logical con- nectives (including negations). 4) Itisbelow freezing and snowing, b) Itis below freezing but not snowing. ©) Itis not below freezing and its not snowing. @) Itiseither snowing or below freezing (or both). ©) fits below freezing, itis also snowing 1) Either it is below freezing or it is snowing, but itis not snowing fit is below freezing. 2) That itis below freezing is necessary and sufficient for itto be snowing 7.4. and r be the propositions 1p You get an A on the final exam. 1g You do every exercise in this book. You get an A in this class. Write these propositions using p,q, and r and logical connectives (including negations). 1) You get an A in this class, but you do not do every exercise in this book. 1b) You getan A on the final, you do every exercise in this book. and yon get an in this cass. ©) To get an Ain tis class, its necessary for you to get an A on the final. 1 Propositional Logic 13 4) You get an A on the final, but you don't do ex ¥-% ercise in this book; nevertheless, you get an class. . ©) Getting an A on the final and doing every exercise in this book is sufficient for getting an A in ths class. 1) You will got an in this clas if and only if you cither © in this book or you get an A on the 9. Let p and g be the propositions p *You drive over 65 miles per hour 7 :You get a speeding ticket. Write chese propositions using p and and logical con ectives (including negations) 8) You do not drive over 65 miles per hour ) You drive over 65 miles per hour, but you do not get a speeding ticket. ©) You will get a speeding ticket 65 miles per hour. 4) If you do not drive over 65 miles per hour, then you ‘ill not get a speeding ticket ©) Driving over 65 miles per houris suficient for geting a speeding ticket. 1) You get a speeding ticket, but you do not drive over 65 miles per hour, 8) Whenever you get a speeding ticket, you are diving ‘over 65 miles per hour. 10, Let p, q, andr be the propositions : Grizzly bears have been seen inthe area. 4: Hiking is safe on the tail 1 Berries are ripe along the trail Write these propositions using p, 4, and r and logical connectives (including negations). a) Bemes are ripe along the tral, but grizzly bears have not been seen in the area. 1) Grizzly bears have not been seen inthe area and hik= ing on the tail is safe, but berries are ripe along the trail, ©) berries are ripe along the tral, hiking is safe if and ‘only if grizzly bears have not been seen in the ares. @) Itis not safe wo hike on the trail, but prizzly bears have ‘notbeen seen inthe area and the berries along te rail, areripe. ©) Forhiking onthe wail tobe safe, it is necessary but not sufficient that berries not be ripe along the tail and for grizzly bears not to have been seen inthe area. ) Hiking is not safe on the trail whenever grizaly bears hhave been seen in the area and berries are ripe along. the wail, you drive over teue or false, @) termine whether each of these conditional statements 4) IF1+1=2then2+2 b) W141 =3,ten2+2=4 ©) W141 =3,ten2+2=5, If monkeys can fly, then 1 1 = vr 141 (The Foundations Logic and Prools ©) 1-41 = 3 ifard only if monkeys can fly €) 0 > 1 ifand only if2 > 1 13, Foreacnof these sentences, state whatthe sentence means ifthe logical connective or isan inclusive or (thats, is junction) versus ar exclusive or. Which ofthese meanings ‘of or do you thinks intended? 8) To take discrese mathematics, you must have taken calculus or a esurse in computer science. 'b) When you buya new car from Acme Motor Company, you get $2000 back in eash or a 2% car loan. ‘¢) Dinner for two includes «wo items from column A or thee items from column B. 4) Schoo! is closed if more than 2 fet of snow falls or if the wind chillis below —100. 14, For each of these sentences, determine whether an in- clusive or, or an exclusive of, is intended. Explain your answer. 8) Experience with C-++ ot Java is required b) Lunch includes soup or salad. ©) To enter the country you need a passport or a voter registration car ) Publish or perish rte each ofthese statements in the form “if p, then q” English, (Hine Refer to the list of common ways to ‘express conditional staemtents.) ‘a) Itsnows wherever the wind blows from the northeast 'b) The apple tres will loom fit stays warm for a week. (©) That the Pistons win the championship implies that they beat the Lakers ) Tris necessary to walk 8 miles to get (0 the top of Long's Peak. 6) To gettemure asaprofessor, itis suficientto be world famous. £) Ityou drive more than 400 miles, you will need to buy ‘gasoline. 1) Your guarantee is good only if you bought your CD player less than 90 days ago. hh) Jan will go swimming unless the water is too cod. 16. Write each of these propositions in the form “p if and only if q” in English. 8) For you to get an A in this cours, it is necessary and sufficient tha you lear how to solve diserete mathe- ‘matics problems. b) If you read the newspaper every day, you will be in- formed, and conversely ©) Itrains if tis a weekend day, and itis @ weekend day if trains. 4) You can see the wizard only if the wizard is notin, and the wizard is not in oly if you can see im. 17. Write each of these propositions in the form “p if and only if q” in English. 8) If itis hot ontside you buy an ice cream cone, and if you buy an ice eream cone itis hot outside. ) Foryou to winthe contest itis necessary end sufficient that you have the only winning ticket. ©) You get promoted only if you have connect «+4 you have connections only if you get promote? 4) If you watch television your mind will decay. versely ©) The trains run late on exactly those days when [take it 18, fate the converse, contrapositi {hese conditional statements. 4) IF it snows today, I will ski tomorrow. b) Icome to class whenever there is going to be a quiz. © A positive integer isa prime only if it has no divisors ‘other than | and itself 19, }low many ros appear in 2 truth table foreach of these ‘compound propositions? a) p> =p b) (py AV —s) ©) gv pyasvarvtv oom re, and inverse ofeach of @ (PATAD GAD Jonstructa truth table for each of these compound propo- Aitions. b) perme @ (pag (Pva) a pp © pe(pya) 2 @ +P + pea 0 peae(—o79) 2. Consiructa truth sble foreach ofthese compound prope- sitions 8) pane b) pvp 0 (pyng 4a &) (va> (PAD ) (p+ 4) a> =P) ) p=a>Q>P) 32. onstructa tut table foreach ofthese compound prope- . ®) pep » pa-p 9 pe a) pea 9 PaDvPa—~a fH (PEDAPE~D 23, Construct truth table foreach ofthese compound propo- sitions ®) pocayn p> a> 9 > avOP>Y & D> DAcP>n ) peavogen Cpeae Gen Fonstruct a tuth table for ((p > 9) > 7) & struct a uth abe for (p <4) + (F #8) S36, Explain, without using a truth table, why (PV =9) A (@Vn7) A(eV =p) is true when p, q, andr have the same truth value and itis false otherwise, 5-27, Explain, without using a truth table, why (p Vg V7). (pV 2q.V a9) is true when at leat one of p,q. and r is tre and atleast one i false, but is false when al three variables have the same truth value 32 1/ The Foundations: Logie and Proofs Solving Sa" <-hility Problems = AA truth table can be used to determine whether a compound proposition is satisiable, or eGuiv= alently, whether its negation is a tautology (see Exercise 38). This can be done by hand for compound proposition with a small number of variables, but when the number of variables grows, this becomes impractical. For instance, there are 2° = 1,048,576 rows inthe truth ta- ble for a compound proposition with 20 variables. Clearly, you need a computer to help you determine, in this way, whether a compound proposition in 20 variables is satisfiable. ‘When many applications are modeled, questions concerning the satisfiability of compound propositions with hundreds, thousands, or millions of variables arise, Note, for example, that ‘when there are 1000 variables, checking every one of the 21° (a number with more than 300 decimal digits) possible combinations of truth Values of the variables ina compound propasition cannot be done by a computer in even trillions of years. No procedure is known that a com- puter can follow to determie in a reasonable amount of time whether an arbitrary compound proposition in such a large number of variables is satifiable. However, progress has been made ‘developing methods for solving the satisfiability problem forthe particular types of compound propositions that arise in practical applications, such as for the solution of Sudoku puzzles. ens Wt Many computer programs have been developed for solving satisfiablity problems which have practical use. In our discussion of the subject of algorithms in Chapter 3, we will discus this ‘question further. In particular, we will explain the important ole the propositional satisfibil problem plays in the study of the complexity of algorithms. Exercises 7 eee igen Pqirel apn ») pvFe ) Carlos wil bicycle or run tomerrow. 9 pakek Bovret €) Mei walks eke th bus to las nee Dee E, 4) Ibrahim is smart and hard working se a truth abet vet De Morgan lav . iibecieeivsbecsyrneeceeeeeeeetaie F's, ow that each of these conditional statements sa tat- Uses truth ate to verify the distributive law ‘ology by using wth tables. AGQV A) m(pAQY (par). 9) (pag » p> ova Chee Morgan’ last ind the negation ofeach of the p> (Pe) (pag) >(p>a) lowing statement. 2-947 N-sa>-% HENRY MAURICE SHEFFER (1883-1964) “Henry Maurice Sheffer, born to Jewish parents inthe western ‘Ukraine, emigrated tothe Unite States in 1892 with his parents and six siblings. He studied tthe Boston Latin ‘School before entcring Harvard, where he completed his undergraduate deares in 1905, his master's in 1907, and his Ph.D. in philosophy in 1968, Aer holding a postdoctoral position at Harvard, Henry traveled to Europe ‘na fellowship. Upon returning to the United States, he became an academic nomad, spending one year each atthe University of Washington, Cornel, the University of Minnesoa, the University of Missouri, and City F College in New York. In 1916 he returned to Harvard as a faulty member inthe philosophy department. He remained at Harvard until his retirement in 1952, ‘Sheffer introduced whats now known.as the Sheer stroke in 1913; t became well known only aftrits use in the 1925 edition of Whitehead and Russells Principia Mathematica. In tis sare etion Rusel wrote that heifer had invented ‘2 powerful method that could be ased to simplify the Frineipia. Because of this comment, Sheffer was something ofa mystery man tologicians, especially because Sheffer, who publishes litle in his career, never published the details ofthis method, only describing iin mimeographed notes and in a brief published abstract. Sheffer was a dedicated teacher of mathematical logic. He liked hisclasseso be small and didnot like auditors, When strangers "peared in his classroom, Sheffer would order them (9 eave even his eolleegues or distinguished guests visiting Harvard. Sheer ‘vas barely five fee all; he was noted fo his wit and vigor, aswell a fr bis nervousness and mstabily. Although widely liked, he ‘was quite lonely. He is noted fora quip he spoke at his retirement: “Old professors never dic, they just become emei." Sheffer is also credited with coining the term "Boolean algebre (the subject of Chapter 12 ofthis text). Sheffer was briefly marred and lived ‘most of hs later life in small rooms ata hotel packed with his logic books and vast ils of slips of paper he wed to jot down his ‘ideas. Unforunately, Sheffer suffered from severe depression during the last two decades of his life. eer fs-6, show that each of these conditional = temonts is a tau foogy by using truth cables, a) pA@val>a b) (p> DAQ> > E> © paw aoa @ (OVDAP NAGI NT 17, Show that each conditional statement in Exercise 5 is a auiology without using truth tables. Determine whether (-y A (p -> g)) —r =p isa tavtol ogy. Tata xr 12 ss you show havo campos sae ooas ae pial eget Tod cee Benes edu esa bs cry S228 onan of wu abe of te pops = sine eps (aches ease Capi tnt=p ss ¢andp o> gar logal eae d sponta > Ap > Panip > ig meoe ‘1, Show that (p > r). A (g —> r) and (p vq) — rare log- caip enue ta Soon at(p > 9V@-> Hand (9 A9) rae be ally equivalen. Coa. So that (p+ a) (F>5) and (Pon SG 5) ate not logically equivalent. Show that (pV g) A (=p Vr) -> (@ Vr) is atautolegy. “The dual of a compound proposition that contains only the logical operators V, A, and — is the compound proposition ‘obtained by replacing each v by A, each A by v, each T by F, and each F by The dual of sis denoted by s*. 1, Find the dual ofeach ofthese compound propositions. a) panganr b) @aganys 9 @VPAGvD 16, Find the dual of each of these compound propositions. a) pv-a ») pPAG@V@AD) 9) DAD Y GAP) 17, Show that (s*)* = + when sis a compound proposition. 18, Find a compound proposition involving the propositional vatables p, q, and r that is true when p end q are true and r is false, but is fase otherwise. (Hint: Use a con- Junetion of each propositional variable or ts negation] 19, Find a compound proposition involving th propositional variables p, q, andr thats true when exactly Woo p, a, and r are tre and i false otherwise. (Hint: Form adi Junetion of conjunctions. Include @ conjunetio for each ‘combination of values for which the compound proposi- tion is rue. Each conjunction should include each ofthe three propositional variables or its negations] 5-20, suppose that a truth table in m propositional variables i specitied. Show that a compound proposition with this truth table can be formed by taking the disjunction of conjunctions ofthe vaviables or thei negations, with one conjunction included for each combination of values for ‘which the compound proposition is true. The resulting compound proposition is sai to be in disjunctive nor- ‘mal form (See Sectoa 1,7), 1.3 Propositional Equivalences 33 A collection of logical operators is called f+ stmt com- plete if every compound proposition is logiceu> ~_svalentto ‘8 compound proposition involving only these logical opera- tors 21. Show that -, 0, and ¥ form a funetionally complete col lection of logical operators (Hint: Use the fat that every ‘compound proposition is logically equivalent to one in disjunctive normal form, as shown in Exercise 20.) 422, Show that > and form a functionally complete col- lection of logical operators. [Hints Fitst use a De Mor- zn law (0 show that p vq is logically equivalent to Sepang) Show that — and v form a functionally complete cllee- tion of logical operators, ‘The following exercises involve the logical operators NAND and NOR. The proposition p NAND q is true when either p og, or both are false; and it is false when both p and q are true. The proposition p NOR q is true when both p and gare false, and iti fase otherwise. The propositions p NAND q and p NOR q are denoied by p | q and p 4-4, respectively (The operators | and | ate called the Sheffer stroke and the Peirce arrow alter H. M. Sheffer and C. S. Peirce, respec tively) 2A, Construct a truth table for the logical operator NAND. 25. Show that p | q is logically equivalent to >(p A 4). 26, Construct a trath table forthe logical operator NOR, 21, Show that p 4 g is logicelly equivalent © “(p V g). 28. In this exercise we will show that ($) is a functionally ‘complete collection of logical operators, 2) Show that p J p is logically equivalent to =p. ) Show that (p 4 4) 4 (p $4) is logically equivalent topva. ©) Conclude from parts) and (b) and Exercise 4, that {4} is a functionally complete collection of logical operators, '*29, Find a compound proposition logically equivalent to p> q using only the logical operator J. 30, Show tha I} isa functionally complete collection of og- ical operators. 31, Show that p | q and | p are equivalent 32, Show that p | (q |r) and (p | q) |r ace not equivalent, ‘0 thatthe logical operator |i not associative, 133, How many different uth tables of compound proposi- tions are there that involve the propositional variables andq? 34, Show thatif p,q, and rare compound propasitons such that p and g ate logically equivalent and g andr ae og- ically equivalent, then p andr ae logically equivalent. 35. The following sentence is taken from the specification of a telephone sysiem: “Ifthe directory database is opened, thea the monitor is putin a closed stat. ifthe system is notin its intial sate" This specification is hard to under- 501 The Foundations: Logic and Proofs produces “ + ---nonse because the fact enyolled{kevin, math273) was provided as input. The query Yenrol Led (x, math273) produces the response kevin kiko 2eeaches (x, juana! ‘This query returns. ‘To produce this response, Prolog determines all possible values of X for which enrolled(X, math273) has been included as a Prolog fact. Similarly, to find all the professors ho are instructors in classes being taken by Juana, we use the query patel grosenan Exercises 7 7 et Pe) denote the statement x <4" What are these rth ves? ®) Pio) » Pw) 9 6) Ce P(x) be the statement “the word x contains the tera" What ae these tat values? a) P(orange) 'b) P(lemon) © Pie) d) Pitas) 3, State the value ofxafterthe statement if P(x) then s= 1 is executed, where P(x) isthe statement “x > 1) if the value of x when ths statement is reached is a) x=0, b)x=l ‘ a) Wx(R(x) > HG) b) ¥a(R(x) 0 Hix) English. a) 3xP() BY YPC) 9) xP) @) We >P) 6, Let C(x) be the statement “x has a ca,” let D(x) be the “asa dog,” and let P(x) be the statersent “x se.” Express each ofthese statements ia tems of C(x), D(x), F(a), quantifiers, and logical connectives, Let the domizin consist ofall students in your class, 8) A stadent in your class has 9 cat, a dog, anda ferret. 'b) All students in yourclass have acat, adog, ora ferret, ©) Some student in your class has a cat and a feret, but not a dog. 44) No studert in your class has a eat, a dog, and a ferret. f) Foreach of the three animals, cats, dogs, and ferets, there isa student in your class who has this animal as pet 7. Let P(x) be the statement “x can speak Russian’ and let Q(x) be the statement “x knows the computer language C+-H." Express each ofthese sentences in termsof P(x), Q(x), quantifiers, end logical connectives. The domain or quantifiers consists of all students at your school a) There is student at your school who can speak Rus- sian and who knows C++. 'b) There is a student at your school who can speak Rus- jan bul who doesn’t know C++. ©) Every student at your school either can speak Russian or knows C++. 4) No student at your schoo! can speak Russian or knows CH. & 8. Lp. P(e) be the statement “x = 12" Ifthe domain con- \ as of the integers, what are these truth values? a) PO) ») PCD 9 PQ 4) Pi-1) ©) 3xP(x) 0) WPI) termine the truth value of each of these statements if 1e domain consists ofall integers. a) Yin +1 > n) b) 3n(2n = 3n) ©) n(n = =n) 4) YaG3n = $n) 0, Determine the uth value of ¢= + ese statements if the domain for all variables consis! + all integers. a) Yate? = 0) b) Sa(n? = 2) vine? 22) @) Snir? <0) zppose thatthe domain of the propositional function ia) consists ofthe integers O, 1,2, 3, and 4, Weite cut ach of these propositions using disjunctions, conjunc- tions, and negations. as) B)YSPQ) —@) 3PQ) Q) ve=PG) —) 7BEP(x)—f) YEP) pose that the domain of the propositional function 73) consists ofthe integers 1, 2, 3, 4, and S. Express nese statements Without using Quantfirs, instead using only negations, disjunctions, and conjunctions. a) xP) b) ¥xPG) o) ~3xP() 4) WeP) o) ¥e((r #3) + PO) V AEP) 13, Translate in two ways each of these statements into logi- cal expressions using predicates, quantifies, and logical connectives. First et the domain consis ofthe studerts in your class and second, lt it consist of all people. 2) Someone in your class can speek Hind b) Everyone in your class is friendly ‘©) There is person in your class who was not born in California, 4) A student in your eass has been in movie. ©) No studeat in your class has taken a course in logic programming. 14, Translate in two ways each ofthese statements into lo cal expressions using predicates, quantifiers, and logical coanectves. Firs, let the domain consist of the studerts in your class and second, let it consist ofall people. 8) Everyone in your class has acellular phone, ) Somebody in your class has seen a foreign movie, ©) There isa person in your elass who cannot swim. 4) All students in your elass can solve quadratic equs- tions {© Some stndent in your cass does not want tobe ich, 1S. Translate each of these statements into logical expres- sions using predicates, quantifies, and logical conne>- tives. 4) No ones perfect. ) Not everyone is perfect ©) Allyour friends are perfect. 4) Atleast one of your fiends is perfect. ‘) Everyone is your frond and is perfect. £) Not everybody is your fiend or someon fect. 16, Translate each of these statements into logic expres- sions in tee different ways by varying the domain and by using predicates with one and with (0 variables 8) Someone in your school has visited Uzbekistan. ») Everyone in yourclasshas studied caleulusand C++ ©) Noone in your school owns both a bicycle anda mo- torcyele. 4) There is @ person in your schoo! who is not happy. isnot pe 1.4 Predicates and Quantities: SL ©) Everyone in your school wae a." the ewentieth ‘century. 17. Express each ofthese statements using logical opersmrs, predicates, and quantifiers, 8) Some propositions are tautologies. b) The negation of a contradiction is a tautology ©) The disjunction of two contingencies can be a tatol- ogy. 4) The conjunction of wo tautologies isa tautology. 18, Translate each of these statements into logical expres- sions using predicates, quantifiers, and logical connec tives, ). Something is not in the correct place D) All tools ate in the correct place and are in excellent condition. © Everything isin the correct place and inexcellentcon- dition, 44) Nothing isin the correet place and is in excellentcon ition. ©) One of your tools s not in the coret place, but itis in excelent condition. 19, Suppose thatthe domoin of OC, 3.2) consis of wiles x,y, 2, where x = 0,1, or 2, y = Dor J, andz = 0or ‘Write out these propositions using disjunctions and con- junetions a) ¥yO(0, y.0) b) 3xOGx, 1, 1) ©) 32-000.0.2) @) 06.0.1) 20, Express each ofthese statements using quantifes. Then form the negation of the statement so that no negations tothe lett ofa quantifier Next, express the negation in simple English. (Do not simply use the phrase “It is not the case that”) a) All dogs have fess. 1) Theres horse that ean ad ©) Every koala can elim d) No monkey can speak French. ©) There exists pig that can Swi and catch fish 21. Expres each ofthese stctements using quaifers. Then form the negation of the statement, so that no negeton isto the let ofa quantifier. Next, expess the acgatio in simple English. (Do not simply use the phrase “Iti not the case that”) 8) Some old dogs can learn nev tricks. 'b) No rabbit knows calculus, ©) Bvery bird ean fy {There is no dog that can tate ©) There is n one inthis class who knows French and Rassian 22, Expres the negation of these proposition using quant fers, and then express the negation in Enlish, a) Some drivers donot obey the speed limit b) All Swedish movies are serious. 6) No one can keep a sere 4) There is someone in thit class who does not have a good stud 23, Finda counterexample. if possible, to these universally cqantfid statements, where the domain forall vales consists of al integers 52 1/"The Foundations: Logie and Proofs a) Yet? = 0) b) ¥x(@e > OVE <0) 9 Yee = 0) Baereises 24-25 deal with the translation between system specification and logical expressions involving quantifiers, 24, Express each ofthese system specifications using predi- cates, quantifiers, and logical connectives 8) When there is less than 30 megabytes free on the hard disk, a warning message is sent t0 all users. 'b) No directories in the file system can be opened and ro files ean be closed when system errors have been detested ©) The ile system cannot be backed vp if there is user currently lopeed on. 4) Video on demand ean be delivered when there are at Jeast 8 megabytes of memory available and the con- nection speed I atleast 56 kilbits pe second. 25, Express each of these statements using predicates and quantifiers. a) 4 passenger onan tine qualifies as an lite Ayer if the passenger Mies more than 25,000 miles in a year fortakes more than 25 fights during that year 'b) A man qualifies forthe marathon if his best previe ous time is less tan 3 hours and a woman qualifies forthe marathon if her best previous time is less than 3.5 hours. 9. A student must take at east 60 course outs, ora least 4 course hours and write « master’ thesis, end re- ceivea grade no lower than Bin allrequred covrses, to receive a masters degree. 8) There isa student who bas taken more than 21 credit hours in a semester and received alls 26, Determine whether Vi(P(x) —> Q(2)) and Wx PCs) > Yr O(a) are logically equivalent Justify your answer. 27. Show that 3x(P(«) V Q(x)) and Bx P(x) V Be Q's) ae logically equivalent Exercises 28-29 establish rues for null quantification thet ‘we can une when a quantified variable doesnot appearin part of statement 28, Establish these logical equivalences, where x does ot ‘occur asa fee variable in A. Assume that the domi is nonempty, a) ¥x(A > P(x)) = A> YaP(x) by ax(A > PO) A APO) 29, Establish these logical equivalences, where x does not ‘eur asa fre variable in A, Assume that the demain is nonempty. a) (WP) AAmYS(PG) AA) b) GrPta) AA w3x(PE)AA) 30, Show that ¥x P(x) V Vx Q(x) and Wx( P(x) V Q.x)) are not logieally equivalent 31. As mentioned in the text.18, son Six P(x) denotes “There exists a unique #8 ~ that P(x) is tue.” If the domain consists of all integers, what are a tooth values of these statements? a) ax > D. by ae? =0) ©) alee $3 =2x) @) ee =r) 32, Write out 3x P(x), where the domain consists ofthe is ers 1, 2, and 3, in terms of negations, conjunctions, af disjunction. 133. hat ace the truth values of these statements? ‘a) 3x P(x) > Ae P(e) b) ¥r P(x) > xP) ©) IxaP() > APC) 34, Given the Prolog factsin Example 28, what would Prolog retum given these queries? @) instructor (chan ,math273) b) ?instructor (pate, cs301) ©) enrolled (x,cs301} a) Penrolled(kiko,¥) ©) ?Leaches (grossman, ¥) 38, Suppose that Prolog facts are used to define the predicates mother(. ¥) and faaher(F, X), which sepreseat that M_ isthe mother of ¥ end F isthe fether of X, respectively. Give a Prolog rule to define the predicate sibling(X, ¥). Which represents that X and ¥ are siblings (that is, have the same mother and the same father), Exercises 36-38 are hased on questions found in the book Symbolic Logic by Lewis Cattol. 36. Let P(x), O(x),and R(x) be the statements “xis aclear explanation,” "xis satisfactory” and “xis an excuse,” re~ spectively, Suppose that the domain for x consists of all, English text. Expresseach ofthese statements using quen- titers logical connectives, and P(x), Q(x), and RC). ‘8) Allclear explanations are satisfactory bb) Some excuses are unsatisfactory ©) Some excuses are not clear explanations. 94) Does (¢) follow from (a) and (b)? 37. Let P(x), Q(x), and R(x) be the statements “xis @ pro- fessor“ is ignorant” and "x is vain,” respectively. Ex press each of these statements using quantifiers; logical connectives; and P(x), Q(x), and R(x), where the do- ‘main consists ofall people. 1a) No professors are ignorant. 'b) Ail ignorant people are vain ©) No professors are vain, 4) Does (c) follow from (a) and (b)? 38. Let P(x), Q(2), R(x), and S(x) be the statements “x is ‘baby? “x is logical," "x is able to manage a crocodile.” ‘and'"x is despised,” respectively. Suppose thatthe domain ‘consists of all people. Express each of these statements using quantifies; logical connectives; and P(x), Q(#). R(x), and SG), 1a) Babies ae illogical 1) Nobody is despised who can manage a crocodile. ©) Iilogical persons are despises. 44) Babies cannot manage crocodiles. e) Does (d) follow from (a), (b), and (0)? If not, is there ‘a correct conclusion? ~ 60 1/"The Foundations: Logic and Proofs EXAMPLE 16 (9's calculus) Use quantifiers and predicates 1 express the “3-* shat lim. (8) does nots = «were f (x) isa real-valued function of a teal variable x a” oelongs to the domain of f - Solution: To say that limrq f(x) does not exist means that for all real numbers Z, lim, f(2) # L. By using Example 8, the statement lim. f(x) # L can be expressed as We > 0.35 >0¥x(0 < [x —al <5 > If(x)~ LI <6) Successively applying the rules for negating quantified expressions, we construct this sequence of equivalert statements We > 35>0¥x(0<|x — al <5 |f(s) — Li0 35 > 0 Vx(0 | fx) — LI 0¥b>0 -¥x(0<|x — al <6 -» [f(@) - Li0¥5>0 Bx O< [x ~al if(x)- Ll 0V5>0ar(O<|x — al <8 A|f(x)— LIZ). In the last step we used the equivalence -(p ~> q) = p \—9, which follows from the fifth equivalence in Table 7 of Section 1.3, Because the statement “lim, ¢ f(x) does not exist” means for all real numbers L, limyooa £(4) # L. this can be expressed as VL3e>0 V8 > 0 3x0 < [x a} < 8 Al f(x) - Ll 26). 4 ‘This last statement says that for every real number L there is a real number ¢ > O such that for every real number 5 > 0, there exists a real number x such that 0 < |x —al <é and | If@)— Lz < Exercises a) YxSy(x < y) b) ¥a¥y (r= 0) AG 20) > Y= 0) ©) ¥x¥y3z(xy = 2) 2, Let Q(E, y) be the statement "x has sent an e-mail mes- sage to" where the domain for both x and y consists of, all students in your class. Express each of these quantif- cations in English a) 3r3yQCx, y) ©) ¥x3y (x, ¥) 4) 3y¥s Q(x, ») ©) YOU, ») 1) ¥e¥yQEx, 0 3. Let W(x, y) mean that student x has visited website y, where the domain for x consists ofall students in your school and the domain for y consists of all websites. Ex- press each of these statements by a simple English sen- tence, a) W(Satah Smith, wwwatt.com) b) 3xWCx, wwwimdb.org) ©) 3yW(losé Orez, ») b) 3e¥ 00x, ») a) ay(W(Ashok Pur, ») A W(Cindy Yeon, y)) ©) ay¥2) # (David Belcher) « (W(David Belcher, 2) > WO.) 1) Bedyvel(x Fy) A (WO, 2) > WEy 2) 4, Let 7, ») mean that student likes cuisine y, where the domain for ¥ consists of all stents at your school and the domain for y consists of all cuisines. Express each of these statements by a simple English sentence 8) T(Abdallah Hussein, Japanese) 4) ar 7Gx, Korean) 0 VeT (x, Mexican) ©) Ay(T donique Arsenault, 3) V T(Jay Johnson, y)) @) ¥xVeay((z #2} > TEx. ATE YD) e) Bsdevy(TG, y) > TE. y)) f) ¥rv¥e3y (T(x, y) Ty) Ce, ») be the statement x loves 9," where the do- in for both x and y consists of al people in the world. se quantifiers to express each ofthese statements a) Everybody loves Jery. 1b) Everybody loves somebody. ©) There is somebody whom everybody loves, 4) Nobody loves everybody. i @) There is somebes sm Lydia does not ove. f) There is semeboay s. 11 n0 one loves 1) Ther is exactly one person whom everybody loves. b) There are exactly two people whom Lynn loves, i). Everyone loves himself or herself. |) There is someone who loves no one besides himself tanton qvia show)” Express cach af these senteaces jn terms of QC y), quantifiers and logical connectives tihere tbe domain for x consiss of all students st your School and for y consists of all quiz showsontlevisioa, 4) There isa stadeat at your schoo! who has beea acon textant ona television qua show. b) No student st your schoo! bas ever been « contestant ‘on a television que show. €) There isa student at your schoo! who has been acon: testant on Jeopardy and on Wheel of Fortune 4) Evory television quiz show has had a student from your school as 2 contestant «) Atlessttwo students from your school have been con testans on Jeopardy. 7. Use quanifirs and predicates with more than one \ari- able toexpress these statements 1) Every compute science student nec acourse i dis- crete mathematics 1) There isa student in this class who owns a personal othe } (ts 3) be the statement “student x hasbeen a on- ‘computer. (©) Every student inthis class has taken at least one com puter science course, 4) There isa student inthis class who has taken at least fone course in computer science, ©) Every student in tis class has been in every buileing ‘on campus. £) There isa student inthis class who has been in every 100m of a least one building on campus. 2) Every student in this class has been in at least ane room of every building on campus. 8. Let (4) be the statement “x has an Internet connection” and C(x, y) be the statement “sr and y have chatted ever the Internet,” where the domain for the variables x and y consists ofall students in your class. Use quantifies to ‘express each of these staerments. 8). Jerry does not have an Internet connection. 1b). Rachel has notchatted over the Internet with Chelsea. ©) Jan and Sharon have never chatted over the Internet. 4) No one in the class has chatted with Bob. ©) Sanjay has chatted with everyone except Joseph. 1) Someone in your class does not have an Internet con- ection, 19) Not everyone in your class has an Intemet connec tion, 1b) Exactly one student in your class has an Tntemet con- nection. 8) Everyone except one student in your class has an In- ‘temet connection [5 Nested Quantifiers 61 JD. Everyone in you! 3." “th an Internet connection thas chatted over the iunet with at least one other student in your class - 1k) Someone in yourclass has ao Internet connection bat hhas notched with anyone else in your clas. 1) There are two students in your class who have not chatted with each other over the Internet m) There isa student in your class who has chatted with everyone in your class over the Internet. tn) There areat ieast wo students in your class who have ‘not chatted with the same person in your class (©). There are two studentsin the class who between them ‘z.. have chatted with everyone else in the class. 9. Express each of these system specifications using predi- cates, quantifies, and logical connectives, a) Every user has access to exactly one mailbox, 1b) Thereisaprocess that continves torun during alertor conditions only ifthe kernel is working correctly © Allusers on the campus network can access all web sites whose url has a edn extension. *d) There are exactly wo systems that monitor every e- ‘mote server, 10, Express cach of these statements using mathematical and logical operators, predicates, and quantifiers, where the domain consists ofall integers a) The sum of two negative integers is negative. 1) The difference of two postive integers is not neces saily positive ©) The sum of the squares of two integers is greater than or equal to the square of their sum, 4) The absolute value of the product of two integers is the product oftheir absolute values 11. Express each of these mathematical statements using predicates, quantifiers, logical connectives, and mathe: matical operators a) The product of two negative real numbers is postive, ) ‘The difference ofa real number and itself is zero. ©) Every positive real number has exactly two square roots. 4) A negative real number does not have a square root that areal nomber. 12, Transtate each ofthese nested quantifications into an En- lish statement that expresses a mathematical fact. The ‘domain in each case consists of al real numbers. a) 3x¥y(xy = y) b) ¥evy(x <0)A(y <0) + (ey > 0) ©) BG? > AG

You might also like