advertisement

CS 330 - DISCRETE STRUCTURES HOMEWORK #1 KEY 1. Points=6 2. Points=4 a) If you get promoted, you must have washed the boss’s car. b) If there are winds from the south, then there is a spring thaw. c) If you bought the computer less than a year ago, then the warranty is good. d) If Willy cheats, then he gets caught. 1 3. Points=2 Are these system specifications consistent? Consistent means there is at least one set of truth values for the propositions that make all the specifications true. Or in other words, not a contradiction. “Whenever the system software is being upgraded, users cannot access the file system. If users can access the file system, then they can save new files. If users cannot save new files, then the system software is not being upgraded.” Consistent (In other words, can they be satisfied simultaneously) To determine whether these specifications are consistent, we first express them using logical expressions. Let p denote “The system software is being upgraded”, and let q denote “users can access the file system”, and let r denote “users can save new files”. The specifications can then be written as p→¬q, q→r, ¬r→¬ p. An assignment of truth values that makes all three specifications true could be that p is false, q is false, and r is false. Therefore, these specifications are consistent. 4. Points=3 Without using truth tables p↔q = = p→q q→p = = (¬p q) (¬q p) = = (¬q (¬p q)) (p (¬p q)) = = ((¬q ¬p) ( ¬q q)) ((p ¬p) (p q)) = =((¬q ¬p) F) (F (p q)) = = (¬q ¬p) (p q) (the only way p→q and q→p is if p and q are both true or p and q are both false 5. Points=3 Determine if the following argument is correct or not and show in detail why: "If I play baseball, then I am sore. I use the swimming pool if I am sore. I did not use the swimming pool. Therefore, I did play baseball". B=” I play baseball” S=” I am sore” P=” I use the swimming pool” [(B->S) ^ (S->P) ^ ~P] -> B There are many ways to prove this implication is FALSE, here is one way. (S->P) is true is the same as (~P->~S) (see table 6) and we know that ~P is true, therefore ~S must be true (B->S) is true is the same as (~S->~B) (see table 6) and we know that ~S is true, therefore ~B must be true this contradicts the conclusion that B is true 6. Points=5 2 (b) (d) x ( F ( x) C ( x) D ( x )) x (F ( x ) C ( x ) D ( x )) 7. Points=4 a) True. There exist real numbers x 2 that x 2 2 b) False. 1 is an imaginary number. No real number x makes x 2 1 c) True. x 2 2 1 x 2 1 . This is true for all real numbers. d) False. An counter example is that for x 1 , x 2 x . 8. Points=5 a) x y Q(x, y) b) x y ¬ Q(x, y) c) x Q(x, Jeopardy) Q(x, Wheel of Fortune) d) y x Q(x, y) e) x1 x2 ((Q(x1, Jeopardy) Q(x2, Jeopardy)) x1 ≠ x2) 3 9. Points=8 4 c) Valid conclusions are “Dragonflies have six legs,” “Spiders are not insects.” Let A(x) denote “x is an insect”, and B(x) denote “x has six legs”. Then the premises are x A(x) →B(x), A(dragonflies), ¬B(spiders). 1. x A(x) →B(x) Premise Universal instantiation from (1) 2. A(dragonflies)→B(dragonflies) 3. A(dragonflies) Premise 4. B(dragonflies) Modus Ponens from 2 and 3 5. A(spiders)→B(spiders) Universal instantiation from (1) 6. ¬B(spiders) Premise 7. ¬A(spiders) Modus tollens from 5 and 6 d) Valid conclusion is “Homer is not a student.” Let A(x) denote “x is a student”, and B(x) denote “x has an internet account”. Then the premises are x A(x)→B(x), ¬B(Homer), B(Maggie). 1. x A(x)→B(x) Premise Universal instantiation from (1) 2. A(Homer)→B(Homer) 3. ¬B(Homer) Premise 4. ¬A(Homer) Modus tollens from 2 and 3 5