Homework 5 Answers for CMSC250, Fall 2003 - Prof. John Aloimonos, Assignments of Discrete Structures and Graph Theory

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

Pre 2010

Uploaded on 07/30/2009

koofers-user-fe6
koofers-user-fe6 🇺🇸

9 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC250, Fall 2003 Homework 5 Answers
Due Wednesday, October 8 at the beginning of your discussion section.
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.
1. Complete the following proofs using the method described in class.
(a)
P1 xD R(x)[Q(x)T(x)]
P2 yD P (y)[R(y)Q(y)]
P3 zDT(z)→∼ P(z)
wD T (w)
Answer:
# Statement Rule Lines Used
1P(a)[R(a)Q(a)] instantiation P2
2P(a) Assume
3T(a)modus tollens 2, P3
4P(a)T(a) Closing cond world w/o contra 2–3
5R(a)Q(a) Assume
6R(a) Conjunctive simplification 5
7Q(a) Conjunctive simplification 5
8R(a)[Q(a)T(a)] instantiation P1
9Q(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–10
12 T(a) Dilemma 1, 4, 7
13 wD T (w)generalization 12
Another way using a conditional world with contradiction:
# Statement Rule Lines Used
1P(m)[R(m)Q(m)] instantiation P2
2R(m)[Q(m)T(m)] instantiation P1
3T(m) P(m)instantiation P3
4T(m) Assume
5P(m) Modus ponens 3, 4
6R(m)Q(m) Disjunctive syllogism 5, 1
7R(m) Conjunctive simplification 6
8Q(m)T(m) Disjunctive syllogism 2, 7
9Q(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–11
13 wD T (w)generalization 12
1
pf3
pf4

Partial preview of the text

Download Homework 5 Answers for CMSC250, Fall 2003 - Prof. John Aloimonos and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

CMSC250, Fall 2003 Homework 5 Answers

Due Wednesday, October 8 at the beginning of your discussion section.

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.

  1. Complete the following proofs using the method described in class.

(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:

Statement Rule Lines Used

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:

Statement Rule Lines Used

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:

Statement Rule Lines Used

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:

Statement Rule Lines Used

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

  1. Assume you know that ∃x ∈ S ∀y ∈ T P (x, y). Do you necessarily know that ∀y ∈ T ∃x ∈ S P (x, y)? Explain your answer in English. You may wish to provide an example to support your reasoning. Answer: Yes. Let’s say S = T = {all people} and P (x, y) = x likes y. Since you know that “∃x ∈ S ∀y ∈ T P (x, y)”, you know that it is true that there is a person (lets call him Bob) who does indeed like every person. “∀y ∈ T ∃x ∈ S P (x, y)” means that if we go down the list of all people one at a time, for each of them we can find a person who likes them. Since Bob is known to like everyone from the first statement, we could (if there were nobody else) pick Bob for each person in the list.

(c) Of the members of the Alpine Club, who is a mountain climber but not a skier? Answer: Mike.

  1. For each of the following statements, give a proof to show it is true, or give and verify a counterexample to show it is false.

(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 ).