Docsity

Quiz 1 Solved Problems - Constructing Proofs | CS 1050, Quizzes of Computer Science

Toggle sidebar
bg1
Quiz 1
CS 1050C
Full Name __________________________
p๏ƒ™T ๏ƒ› p; p๏ƒšF ๏ƒ› p Identity Laws
p๏ƒšT ๏ƒ› T; p๏ƒ™F ๏ƒ› F Domination Laws
p๏ƒšp ๏ƒ› p; p๏ƒ™p ๏ƒ› p Idempotent Laws
๏ƒ˜(๏ƒ˜p) ๏ƒ› p Double Negation Law
p๏ƒšq ๏ƒ› q๏ƒšp; p๏ƒ™q ๏ƒ› q๏ƒ™p Commutative Laws
(p๏ƒšq)๏ƒšr๏ƒ›p๏ƒš(q๏ƒšr) Associative Laws
(p๏ƒ™q)๏ƒ™r๏ƒ›p๏ƒ™(q๏ƒ™r)
p๏ƒš(q๏ƒ™r) ๏ƒ› (p๏ƒšq)๏ƒ™(p๏ƒšr) Distribution Laws
p๏ƒ™(q๏ƒšr) ๏ƒ› (p๏ƒ™q)๏ƒš(p๏ƒ™r)
๏ƒ˜(p๏ƒšq)๏ƒ›(๏ƒ˜p ๏ƒ™ ๏ƒ˜q) De Morganโ€™s Laws
๏ƒ˜(p๏ƒ™q)๏ƒ›(๏ƒ˜p ๏ƒš ๏ƒ˜q)
p ๏ƒš ๏ƒ˜p ๏ƒ› T Or Tautology
p ๏ƒ™ ๏ƒ˜p ๏ƒ› F And Contradiction
(p๏‚ฎq) ๏ƒ› (๏ƒ˜p ๏ƒš q) Implication Equivalence
pf3
pf4
pf5

Partial preview of the text

Download Quiz 1 Solved Problems - Constructing Proofs | CS 1050 and more Quizzes Computer Science in PDF only on Docsity!

Quiz 1

CS 1050C

Full Name __________________________

p๏ƒ™T ๏ƒ› p; p๏ƒšF ๏ƒ› p Identity Laws p๏ƒšT ๏ƒ› T; p๏ƒ™F ๏ƒ› F Domination Laws p๏ƒšp ๏ƒ› p; p๏ƒ™p ๏ƒ› p Idempotent Laws ๏ƒ˜(๏ƒ˜p) ๏ƒ› p Double Negation Law p๏ƒšq ๏ƒ› q๏ƒšp; p๏ƒ™q ๏ƒ› q๏ƒ™p Commutative Laws (p๏ƒšq)๏ƒšr๏ƒ›p๏ƒš(q๏ƒšr) Associative Laws (p๏ƒ™q)๏ƒ™r๏ƒ›p๏ƒ™(q๏ƒ™r) p๏ƒš(q๏ƒ™r) ๏ƒ› (p๏ƒšq)๏ƒ™(p๏ƒšr) Distribution Laws p๏ƒ™(q๏ƒšr) ๏ƒ› (p๏ƒ™q)๏ƒš(p๏ƒ™r) ๏ƒ˜(p๏ƒšq)๏ƒ›(๏ƒ˜p ๏ƒ™ ๏ƒ˜q) De Morganโ€™s Laws ๏ƒ˜(p๏ƒ™q)๏ƒ›(๏ƒ˜p ๏ƒš ๏ƒ˜q) p ๏ƒš ๏ƒ˜p ๏ƒ› T Or Tautology p ๏ƒ™ ๏ƒ˜p ๏ƒ› F And Contradiction (p๏‚ฎq) ๏ƒ› (๏ƒ˜p ๏ƒš q) Implication Equivalence

1. Prove that ๏ƒ–3 is irrational. (20 points) Proof (by contradiction): Assume that ๏ƒ–3 is rational, i.e. that ๏ƒ–3 = a/b for a,b๏ƒŽN and b๏‚น0. Since any fraction can be reduced until there are no common factors in the numerator and denominator, we can further assume that a and b have no common factors. Then 3 = a^2 /b^2 which means that 3b^2 = a^2. So a^2 is divisible by 3 (by the definition of divisibility). By the Lemma below, since a^2 is divisible by 3, a is also divisible by 3. Thus a = 3k and 3b^2 = 9k^2. Thus b^2 = 3k^2 and b^2 is divisible by 3. But by the Lemma this means b is also divisible by 3. This means both a and b have a common factor (3), which is a contradiction of our original assumption. Therefore ๏ƒ–3 is irrational. Lemma: When m is a positive integer, then if m^2 is divisible by 3, then m is divisible by 3. Proof: Use an indirect proof. If m is not divisible by 3, then m^2 is not divisible by 3. There are two cases to consider: m = 3k+1 and m = 3k+2 where k๏ƒŽN. Case 1 If m = 3k+1 then m^2 = (3k+1)(3k+1) = 9k^2 + 6k + 1 = 3(3k^2 + 2k) + 1 which is not divisible by 3. Case 2 If m = 3k + 2 then m^2 = (3k+2)(3k+2) = 9k^2 + 12k + 4 = 3(3k^2 + 4k + 1) + 1 which is not divisible by 3.

3. Prove that if n is a positive integer, then n is odd if 5n+6 is odd. (20 points) Proof: From the contraposition, this is equivalent to n is even ๏‚ฎ 5n+6 is even. Assume that n is even. Then n = 2k where k๏ƒŽZ. Then 5n+6 = 5(2k) + 6 = 2(5k+3). Since (5k+3) must be an integer, then 5n+6 is even. Therefore the original proposition is true.

4. Find the Disjunctive Normal Form of (r ๏ƒš q) ๏‚ฎ (p ๏ƒš q) (20 points) p q r p ๏ƒš q (r ๏ƒš q) (r ๏ƒš q)๏‚ฎ (p ๏ƒš q) T T T T T T T T F T T T T F T T T T T F F T F T F T T T T T F T F T T T F F T F T F F F F F F T (p๏ƒ™q๏ƒ™r) ๏ƒš (p๏ƒ™q๏ƒ™๏ƒ˜r) ๏ƒš (p๏ƒ™๏ƒ˜q๏ƒ™r) ๏ƒš (p๏ƒ™๏ƒ˜q๏ƒ™๏ƒ˜r) ๏ƒš (๏ƒ˜p๏ƒ™q๏ƒ™r) ๏ƒš (๏ƒ˜p๏ƒ™q๏ƒ™๏ƒ˜r) ๏ƒš (๏ƒ˜p๏ƒ™๏ƒ˜q๏ƒ™๏ƒ˜r)

6. Using the logical equivalencies listed on the front page of the quiz prove that ((p๏ƒšq)๏ƒ™๏ƒ˜p)๏‚ฎq is a tautology. (20 points) ((p๏ƒšq)๏ƒ™๏ƒ˜p)๏‚ฎq ๏ƒ› ๏ƒ˜((p๏ƒšq)๏ƒ™๏ƒ˜p) ๏ƒš q Implication ๏ƒ› (๏ƒ˜(p๏ƒšq) ๏ƒš ๏ƒ˜๏ƒ˜p) ๏ƒš q DeMorgan ๏ƒ› (๏ƒ˜(p๏ƒšq) ๏ƒš p) ๏ƒš q Double Neg. ๏ƒ› ๏ƒ˜(p๏ƒšq) ๏ƒš (p๏ƒšq) Assoc. ๏ƒ› (p๏ƒšq) ๏ƒš ๏ƒ˜(p๏ƒšq) Comm. ๏ƒ› T Domination