Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Discussion Problems and Solutions 2 1 Section 1.4 Exercise 1: Express each of these statements using mathematical and logical operators, predicates and quantifiers, where the domain consists of all integers. (a) The sum of two negative integers is negative. (b) The absolute value of the product of two integers is the product of their absolute values. Solution: (a)∀x∀y((x < 0) ∧ (y < 0) → (x + y < 0)). (b)∀x∀y(|xy| = |x||y|) Exercise 2: Translate each of these nested quantifications into an English statement that expresses a mathematical fact. The domain in each case consists of all real numbers. (a)∃x∀y(xy = y) (b)∀x∀y∃z(x + y = z) Solution: (a)This says that there exists a real number x such that for every real number y, the product xy equals y. (b)This says that for every pair of real numbers x and y, there exists a real number z that is their sum. 2 Section 1.5 Exercise 3: For each of these arguments determine whether the argument is correct or incorrect and explain why. (a) Every computer science major takes discrete mathematics. Harry is taking discrete mathematics. Therefore, Harry is a computer science major. 1 (b) All parrots like fruit. My pet bird is not a parrot. Therefore, my pet bird does not like fruit. Solution: (a)This is invalid. After applying universal instantiation, it contains the fallacy of affirming the conclusion. (b)This is invalid. After applying universal instantiation, it contains the fallacy of denying the hypothesis. Exercise 4: Use rules of inference to show that if ∀x(P (x) ∨ Q(x)), ∀x(¬Q(x) ∨ S(x)), ∀x(R(x) → ¬S(x)), and ∃x¬P (x) are true, then ∃x¬R(x) is true. Solution: Step Reason 1. ∃x¬P (x) Premise 2. ¬P (c) Existential instantiation using (1) 3. ∀x(P (x) ∨ Q(x)) Premise 4. P (c) ∨ Q(c) Universal instantiation using (3) 5. Q(c) Disjunctive syllogism using (4) and (2) 6. ∀x(¬Q(x) ∨ S(x)) Premise 7. ¬Q(c) ∨ S(c) Universal instantiation using (6) 8. S(c) Disjunctive syllogism using (5) and (7) 9. ∀x(R(x) → ¬S(x)) Premise 10. R(c) → ¬S(c) Universal instantiation using (9) 11. ¬R(c) Modus tollens using (8) and (10) 12. ∃x¬R(x) Existential generalization using (11) 3 Section 1.6 Exercise 5: Show that if n is an integer and n3 + 5 is odd, then n is even using (a) a proof by contraposition. (b) a proof by contradiction Solution: (a) We must prove the contrapositive. If n is odd, then n3 + 5 is even. Assume that n is odd. Then we can write n = 2k + 1 for some integer k. Then n3 + 5 = (2k + 1)3 + 5 = 8k 3 + 12k 2 + 6k + 6 = 2(4k 3 + 6k 2 + 3k + 3). Thus n3 + 5 is two times some integer, so it is even. (b) Suppose that n3 +5 is odd and that n is odd. Since n is odd, and the product of odd numbers is odd, in two steps we see that n3 is odd. But then subtracting we conclude that 5, being the difference of the two odd numbers n3 + 5 and n3 2 is even. This is not true. Therefore our supposition was wrong and the proof by contradiction is complete. Exercise 6: Show that these statements about the real number x are equivalent: (1) x is irrational, (2) 3x + 2 is irrational. Solution: We need to prove (1) → (2) and (2) → (1). For the first of these, suppose that 3x + 2 is rational, namely equal to p/q for some integers p and q with q 6= 0. Then we can write x = ((p/q) − 2)/3 = (p − 2q)/(3q), where 3q 6= 0. This shows x is rational. For the second conditional statement, suppose that x is rational , namely equal to p/q for some integers p and q with q 6= 0. Then we can write 3x + 2 = (3p + 2q)/q. This shows that 3x + 2 is rational. 4 Section 1.7 Exercise 7: Prove that if x and y are real numbers, the max(x, y) + min(x, y) = x + y. Solution: We consider the two cases determined by the relative sizes of x and y. First suppose that x ≥ y. Then by definition max(x, y) = x and min(x, y) = y. Therefore in this case max(x, y) + min(x, y) = x + y. For the second case, suppose that x < y. Then max(x, y) = y and min(x, y) = x. Therefore in this case max(x, y) + min(x, y) = y + x = x + y. Hence the equality holds. 3