Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
COT 3100: Fall 2013 Exam 1, 50 min. PROBLEM 1. SOLUTION: There are 4 problems on this exam on 4 pages. Write your name on each page. Keep your answers to each problem on its own page. You may write on the back, if needed. (25 points) Let p be the statement “Prof. Davis is walking in the rain.” Let q be the statement “Prof. Davis gets wet.” Suppose p → q is always true. • (a) State the contrapositive as a logical proposition. Solution: ¬q → ¬p • (b) State the contrapositive in English. Solution: If Prof Davis is not wet, then he isn’t walking in the rain. (there are also other ways of saying it). • (c) State the inverse ¬p → ¬q in English. Solution: If Prof Davis does not walk in the rain, he does not get wet. (there are also other ways of saying it). • (d) If p → q is always true, does this imply the inverse is always true? (answer yes or no): Solution: no • (e) Prove your answer to (d). If your answer to (d) is “yes,” explain. If your answer to (d) is “no,” determine the value(s) of p and q for which (p → q) is true yet the inverse is false. Solution: If p is false but q is true, then (p → q) ≡ (F → T ) is true yet the inverse (¬p → ¬q) ≡ (T → F ) is false. COT 3100: Fall 2013 Exam 1, PROBLEM 2. SOLUTION: (25 points) • (part a) The following statements are false. Find all possible counter-examples, where the domain is all real numbers. 1. ∀x(x2 6= x) Solution: x = 1 and x = 0 are the only counter-examples 2. ∀x(|x| > 0) Solution: x = 0 is the only counter-example. • (part b) Determine the truth value of each of these statements if the domain of each variable consists of all real numbers. Explain. 1. ∀x∃y(x = y 2 ) Solution: This is false, since no such y can exist if x < 0. Recall that the domain of discourse is the real numbers, so y cannot be a complex number. 2. ∃x∀y((y 6= 0) → (xy = 1)) Solution: This is false. It attempts to say that there is an x that is the reciprocal of all nonzero values y. Such a number x does not exist. COT 3100: Fall 2013 Exam 1, PROBLEM 3. SOLUTION: (25 points) Determine if the following argument is valid (show your work): 1. 2. 3. 4. Premise 1: ¬a Premise 2: s → a Premise 3: (¬r ∨ ¬g) → (s ∧ d) Conclusion: r Solution: The argument is valid. • Starting with the first premise, ¬a, and the 2nd, we can conclude that s is false. • this means s ∧ d must be false (it does not matter what d is) • since s ∧ d is false, we know (¬r ∨ ¬g) is false, from the contrapositive of premise 3. • the DeMorgan equivalent of (¬r ∨ ¬g) is ¬(r ∧ g). Since this is false, (r ∧ g) is true. • Since (r ∧ g) is true, both r and g are true. • Thus, r is true. COT 3100: Fall 2013 Exam 1, PROBLEM 4. SOLUTION: (25 points) Use a direct proof to show that the product of two odd numbers is odd. Solution: Consider two odd numbers m and n. Since they are odd, we can write m = 2k + 1 and n = 2t + 1 for some integers k and t. Multiplying, mn = (2k + 1)(2t + 1) = 4kt + 2k + 2t + 1 = 2(2kt + k + t) + 1 Let s = (2kt + k + t). Since s is an integer, we have mn = 2s + 1 for some integer s, and thus mn is odd.