


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The answers to problem set 5 for the computer science course cmsc250, offered at the university of x in the fall 2003 semester. Proofs for various logical statements using predicate calculus, as well as examples and counterexamples for mathematical statements.
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



You must write the solutions to the problems single-sided on your own lined paper, with all sheets stapled together, and with all answers written in sequential order or you will lose points.
(a)
P1 ∀x ∈ D R(x) ∨ [Q(x) → T (x)] P2 ∃y ∈ D P (y) ∨ [∼ R(y) ∧ Q(y)] P3 ∀z ∈ D ∼ T (z) →∼ P (z) ∴ ∃w ∈ D T (w) Answer:
1 P (a) ∨ [∼ R(a) ∧ Q(a)] ∃ instantiation P 2 P (a) Assume — 3 T (a) ∀ modus tollens 2, P 4 P (a) → T (a) Closing cond world w/o contra 2– 5 ∼ R(a) ∧ Q(a) Assume — 6 ∼ R(a) Conjunctive simplification 5 7 Q(a) Conjunctive simplification 5 8 R(a) ∨ [Q(a) → T (a)] ∀ instantiation P 9 Q(a) → T (a) Disjunctive syllogism 8, 6 10 T (a) Modus ponens 9, 7 11 [∼ R(a) ∧ Q(a)] → T (a) Closing cond world w/out contra 5– 12 T (a) Dilemma 1, 4, 7 13 ∃w ∈ D T (w) ∃ generalization 12 Another way using a conditional world with contradiction:
1 P (m) ∨ [∼ R(m) ∧ Q(m)] ∃ instantiation P 2 R(m) ∨ [Q(m) → T (m)] ∀ instantiation P 3 ∼ T (m) → ∼ P (m) ∀ instantiation P 4 ∼ T (m) Assume — 5 ∼ P (m) Modus ponens 3, 4 6 ∼ R(m) ∧ Q(m) Disjunctive syllogism 5, 1 7 ∼ R(m) Conjunctive simplification 6 8 Q(m) → T (m) Disjunctive syllogism 2, 7 9 Q(m) Conjunctive simplification 6 10 ∼ Q(m) Modus tollens 8, 4 11 ∼ Q(m) ∧ Q(m) Conjunctive addition 9, 10 12 T (m) Closing cond world w/ contra 4– 13 ∃w ∈ D T (w) ∃ generalization 12
(b)
P1 ∀t ∈ D ∼ L(t) P2 ∀u ∈ D S(u) → (R(u) ∧ T (u)) P3 ∀v ∈ D [L(v) → ∼ S(v)] → [R(v) → L(v)] ∴ ∀h ∈ D ∼ S(h) Answer:
1 ∼ L(a) ∀ instantiation P 2 [L(a) →∼ S(a)] → [R(a) → L(a)] ∀ instantiation P 3 [∼ L(a)∨ ∼ S(a)] → [∼ R(a) ∨ L(a)] Definition of → 2 4 ∼ [∼ L(a)∨ ∼ S(a)] ∨ [∼ R(a) ∨ L(a)] Definition of → 3 5 ((L(a) ∧ S(a)) ∨ ∼ R(a)) ∨ L(a) DeMorgan’s law 4 and associative law 6 (L(a) ∧ S(a)) ∨ ∼ R(a) Disjunctive syllogism 5, 1 7 ∼ L(a)∨ ∼ S(a) Disjunctive addition 1 8 ∼ (L(a) ∧ S(a)) DeMorgan’s law 7 9 ∼ R(a) Disjunctive syllogism 6, 8 10 ∼ R(a)∨ ∼ T (a) Disjunctive addition 9 11 ∼ (R(a)∧ ∼ T (a)) DeMorgan’s law 10 12 ∼ S(a) ∀ modus tollens 11, P 13 ∀h ∈ D ∼ S(h) ∀ generalization 12 Another way using a conditional world with contradiction:
1 ∼ L(m) ∀ instantiation P 2 S(m) → (R(m) ∧ T (m)) ∀ instantiation P 3 [L(m) → ∼ S(m)] → [R(m) → L(m)] ∀ instantiation P 4 S(m) Assume — 5 R(m) ∧ T (m) Modus ponens 2, 4 6 ∼ L(m)∨ ∼ S(m) Disjunctive addition 1 7 L(m) → ∼ S(m) Definition of → 6 8 R(m) → L(m) Modus ponens 3, 7 9 ∼ R(m) Modus tollens 8, 1 10 R(m) Conjunctive simplification 5 11 R(m)∧ ∼ R(m) Conjunctive addition 9, 10 12 ∼ S(m) Closing cond world w/ contra 4– 13 ∀h ∈ D ∼ S(h) ∀ generalization 12
(c) Of the members of the Alpine Club, who is a mountain climber but not a skier? Answer: Mike.
(a) Given any even integer x, the sum of x − 1 and x + 1 is divisible by 4. Answer: TRUE. Proof: Let x be an arbitrary even integer. So ∃k ∈ Z such that x = 2k by the definition of even. Therefore, x − 1 = 2k − 1 and x + 1 = 2k + 1 by substitution. So (x − 1) + (x + 1) = (2k − 1) + (2k + 1) by substition, and (2k − 1) + (2k + 1) = 2k + 2k − 1 + 1 = 4k by algebra. Since k ∈ Z and (x − 1) + (x + 1) = 4k, 4|((x − 1) + (x + 1)) by the definition of divides. (b) If x and y are rational, but x/y is not rational, then y = 0. Answer: TRUE. Proof: Let x and y be arbitrary in Q. So ∃a, b, c, d ∈ Z such that x = a/b and b 6 = 0, and y = c/d and d 6 = 0 by the definition of rational. Therefore x/y = (a/b)/(c/d) by substitution, and (a/b)/(c/d) = (ad)/(bc) by algebra. Since we know that x/y = (ad)/(bc) is not rational, we know that either ad /∈ Z, or bc /∈ Z, or bc = 0. By closure of the integers under multiplication, we know that ad and bc both are in Z. So (by disjunctive syllogism) we know that bc = 0. Since bc = 0, either b or c is zero. We already know that b 6 = 0, so therefore c = 0, by disjunctive syllogism. Therefore, y = 0/d = 0 by algebra. (c) If x and y are both even integers, then their sum is divisible by 4. Answer: FALSE. Counterexample: Let x = 2 and y = 4. Both 2 and 4 are even integers, but their sum, 6, is not divisible by 4. (d) x^2 − 1 is odd for all integers x. Answer: FALSE. Counterexample: Let x = 3. So x^2 − 1 = 3^2 − 1 = 9 − 1 = 8, which is not odd. (e) The sum of any two perfect squares is a perfect square. Answer: FALSE. Counterexample: Let x = y = 1. So x^2 = y^2 = 1, so both x^2 and y^2 are perfect squares. But x^2 + y^2 = 1 + 1 = 2, which is not a perfect square. (f) There are two perfect squares such that their sum is a perfect square. Answer: TRUE. Proof: Let x = 3 and y = 4. So x^2 = 9 and y^2 = 16, so both x^2 and y^2 are perfect squares. Therefore x^2 + y^2 = 9 + 16 = 25, which is a perfect square (25 = 5^2 ).