t MAT 243 Test 1 SOLUTIONS, FORM A 1. [10 points] Rewrite the statement below in positive form (i.e., so that all negation symbols immediately precede a predicate). ( x IR)( y IR)((T (x, y) Q(x, y)) R(x, y)) Solution: Step by step, the solution is: ( x IR) ( y IR)((T (x, y) Q(x, y)) R(x, y)) ( x IR)( y IR) ((T (x, y) Q(x, y)) R(x, y)) ( x IR)( y IR)( (T (x, y) Q(x, y)) R(x, y)) ( x IR)( y IR)((T (x, y) Q(x, y)) R(x, y)) Graded on a 0-3-5-7-10 point basis. 2. Let A = {, x, {x, y}} and let B = {4, 5}. a. [5 points] Find A B. Solution: { } (, 4), (, 5), (x, 4), (x, 5), ({x, y}, 4), ({x, y}, 5). Grading for common mistakes: 1 points for no outer braces {}; +2 points (total) if the elements were not ordered pairs. b. [5 points] Find P(A), the power set of A. Solution: {, { }, {x}, { {x, y} }, {, x}, {, {x, y} }, { x, {x, y} }, {, x, {x, y} }}. Grading for common mistakes: +1 points (total) if the answer was not a set of sets; 1 points for no ; 1 points for no outer braces {}. 1
3. [15 points] Prove p, assuming the following. Be sure to indicate the rules of inference that you used. (1) s (2) s r (3) q (4) (p r) q Solution: A typical solution is Graded on a 0-5-10-15 point basis. (1) s Hypothesis (2) s r Hypothesis (3) q Hypothesis (4) (p r) q Hypothesis (5) r Modus Ponens (1), (2) (6) p r Disjunctive syllogism (3), (4) (7) p Disjunctive syllogism (5), (6) 2
4. [5 points] What is the contrapositive of the statment If n 2 3 is even, then n is odd? Solution: The contrapositive of If p, then q is If q, then p, so a correct answer will look like If n is even, then n 2 3 is odd. 5. [15 points] Prove that for all integers n, if n 2 3 is even, then n is odd, using a proof by contraposition. Solution: A typical proof follows. (1) n Z Assumption (2) n is even Assumption (3) ( m Z)(n = 2m) Definition of even (2) (4) a Z n = 2a Existential Instantiation (3) (5) a Z Simplification (4) (6) n = 2a Simplification (4) (7) n 2 3 = (2a) 2 3 = 4a 2 3 = 2(2a 2 2) + 1 Algebra (5) (8) 2a 2 2 Z Closure (5) (9) 2a 2 2 Z n 2 3 = 2(2a 2 2) + 1 Conjunction (7), (8) (10) ( m Z)(n 2 3 = 2m + 1) Existential Generalization (9) (11) n 2 3 is odd Defintion of odd (10) (12) If n 2 3 is even, then n is odd. Proof by contraposition (11) (13) ( n Z)(If n 2 3 is even, then n is odd.) Universal Generalization (1), (12) Grading: +5 points for setting up a proof of the contrapositive statement, +5 points for using the definitions of even and odd, +5 points for the algebra. Grading for common mistake: 3 points for leaving out the closure statement. 3
6. Let E(x) be the predicate I will do exercise x in the the textbook and G(x) be the predicate I will get a grade of x in this course. Express each of these as a combination of E and G. a. [5 points] I will get an A in this course only if I do every exercise in the textbook. Solution: G(A) ( x)e(x) or ( x)(g(a) E(x)); these are equivalent, but the first form is closer to the original meaning. (Note that p only if q means p q, not q p.) Graded on a 0-2-3-5 point basis. b. [5 points] I will get an B in this course and I will do an exercise in the textbook. Solution: G(B) ( x)e(x) or ( x)(g(b) E(x)); the uniqueness quantifier (!x) was also acceptable in place of ( x), as an exercise can mean exactly one exercise or at least one execise in English. Graded on a 0-2-3-5 point basis. 7. Determine whether the following statements are true or false. You do not need to provide any reasons; just write TRUE or FALSE. (No partial credit) a. [5 points] ( x IR)( y IR)(x 0 xy = 3) Solution: TRUE. (Let y = 3/x.) b. [5 points] ( y IR)( x IR)(x 0 xy = 3) Solution: FALSE. (No matter which y you choose, if you let x = y (if y 0) or x = 1 (if y = 0), you will have x 0 and xy 3.) 4
8. [10 points] Show that the boolean formulas p ( p q) and p q are equivalent, using the table of Logical Equivalences. Solution: A typical derivation is: p ( p q) (p p) (p q) (p q) p q Distribitive Law Negation Law Identity Law (The reasons were not required on the test.) Graded on a 0-3-5-7-10-point basis. Grading for common mistakes: +5 points (total) for using a truth table. 9. [5 points] Evaluate j A j, where A = {1, 4, 5, 7}. Solution: 1 + 4 + 5 + 7 = 17. 5
10. [10 points] Let f : IR \ { 1} IR be the function defined by f(x) = x + 2. Prove f is not onto. x + 1 Solution: In order to prove that f is not onto, you need to find a y IR such that f(x) = y has no solutions. Solving x + 2 1 y 2 = y for x produces the equation x =, which is undefined when x + 1 1 y y = 1. So now prove that f(x) 1 for all x, using the definition; this is a proof by contradiction. (1) Let y = 1. y IR Assumption (and axiom) (2) Suppose x IR \ { 1} Assumption (3) f(x) = x + 2 x + 1 = y Assumption (4) x + 2 = (x + 1) y = x + 1 Algebra (3) (5) 2 = 1 Algebra (4) (6) 2 1 Axiom (7) (2 = 1) (2 1) Conjunction (5), (6) (8) f(x) y Proof by contradiction (9) ( x IR \ { 1})(f(x) y) Universal Generalization (8), (2) (10) ( y IR)( x IR \ { 1})(f(x) y) Existential Generalization (9) (11) f(x) is not onto. Definition of onto (10) Graded on a 0-3-5-7-10 point basis. Grading for common mistakes: +5 points (total) for saying that f( 1) is undefined. 6
MAT 243 Test 1 SOLUTIONS, FORM B 1. [10 points] Rewrite the statement below in positive form (i.e., so that all negation symbols immediately precede a predicate). ( x IR)( y IR)(T (x, y) ( Q(x, y) R(x, y))) Solution: Step by step, the solution is: ( x IR) ( y IR)(T (x, y) ( Q(x, y) R(x, y))) ( x IR)( y IR) (T (x, y) ( Q(x, y) R(x, y))) ( x IR)( y IR)(T (x, y) ( Q(x, y) R(x, y))) ( x IR)( y IR)(T (x, y) (Q(x, y) R(x, y))) Graded on a 0-3-5-7-10 point basis. 2. Let A = {4, y, {x, y}} and let B = {, 5}. a. [5 points] Find A B. Solution: { } (4, ), (4, 5), (y, ), (y, 5), ({x, y}, ), ({x, y}, 5). Grading for common mistakes: 1 points for no outer braces {}; +2 points (total) if the elements were not ordered pairs. b. [5 points] Find P(B), the power set of B. Solution: { }, { }, {5}, {, 5}. Grading for common mistakes: +1 points (total) if the answer was not a set of sets; 1 points for no ; 1 points for no outer braces {}. 7
3. [15 points] Prove p, assuming the following. Be sure to indicate the rules of inference that you used. (1) s (2) q s (3) q ( r p) Solution: A typical solution is Graded on a 0-5-10-15 point basis. (1) s Hypothesis (2) q s Hypothesis (3) q ( r p) Hypothesis (4) q Disjunctive Syllogism (1), (2) (5) r p Modus Ponens (3), (4) (6) p Simplification (5) 8
4. [5 points] What is the contrapositive of the statment If n 2 + 5 is odd, then n is even? Solution: The contrapositive of If p, then q is If q, then p, so a correct answer will look like If n is odd, then n 2 + 5 is even. 5. [15 points] Prove that for all integers n, if n 2 + 5 is odd, then n is even, using a proof by contraposition. Solution: A typical proof follows. (1) n Z Assumption (2) n is odd Assumption (3) ( m Z)(n = 2m + 1) Definition of odd (2) (4) a Z n = 2a + 1 Existential Instantiation (3) (5) a Z Simplification (4) (6) n = 2a + 1 Simplification (4) (7) n 2 + 5 = (2a + 1) 2 + 5 = 4a 2 + 4a + 1 + 5 = 2(2a 2 + 2a + 3) Algebra (5) (8) 2a 2 + 2a + 3 Z Closure (5) (9) 2a 2 + 2a + 3 Z n 2 + 5 = 2(2a 2 + 2a + 3) Conjunction (7), (8) (10) ( m Z)(n 2 + 5 = 2m) Existential Generalization (9) (11) n 2 + 5 is even Defintion of even (10) (12) If n 2 + 5 is odd, then n is even. Proof by contraposition (11) (13) ( n Z)(If n 2 + 5 is odd, then n is even.) Universal Generalization (1), (12) Grading: +5 points for setting up a proof of the contrapositive statement, +5 points for using the definitions of even and odd, +5 points for the algebra. Grading for common mistake: 3 points for leaving out the closure statement. 9
6. Let E(x) be the predicate I will do exercise x in the the textbook and G(x) be the predicate I will get a grade of x in this course. Express each of these as a combination of E and G. a. [5 points] I will get an B in this course if I do every exercise in the textbook. Solution: ( x)e(x) G(B) or ( x)(e(x) G(B)); these are equivalent, but the first form is closer to the original meaning. (Note that p if q means q p, not p q.) Graded on a 0-2-3-5 point basis. b. [5 points] I will get an A in this course and I will do an exercise in the textbook. Solution: G(A) ( x)e(x) or ( x)(g(a) E(x)); the uniqueness quantifier (!x) was also acceptable in place of ( x), as an exercise can mean exactly one exercise or at least one execise in English. Graded on a 0-2-3-5 point basis. 7. Determine whether the following statements are true or false. You do not need to provide any reasons; just write TRUE or FALSE. (No partial credit) a. [5 points] ( x IR)( y IR)(x 0 x + y = 0) Solution: TRUE. (For every x, choose y = x.) b. [5 points] ( y IR)( x IR)(x 0 x + y = 0) Solution: FALSE. (Choose a y, then let x = 1 y (if y 1) or x = 1 (if y = 1).) 10
8. [10 points] Show that the boolean formulas (p q) (r s) and (p s) (r q) are equivalent, using the table of Logical Equivalences. Solution: A typical derivation is: (p q) (r s) ( p q) ( r s) (Unnamed Law) ( p s) ( r q) (p s) (r q) Associative and Commutative Laws (Unnamed Law) (The reasons were not required on the test.) Graded on a 0-3-5-7-10-point basis. Grading for common mistakes: +5 points (total) for using a truth table. 9. [5 points] Evaluate j A j, where A = {1, 4, 6, 8}. Solution: 1 + 4 + 6 + 8 = 19. 11
10. [10 points] Let f : IR \ { 2} IR be the function defined by f(x) = x + 1. Prove f is not onto. x + 2 Solution: In order to prove that f is not onto, you need to find a y IR such that f(x) = y has no solutions. Solving x + 1 2 y 1 = y for x produces the equation x =, which is undefined when x + 2 1 y y = 1. So now prove that f(x) 1 for all x, using the definition; this is a proof by contradiction. (1) Let y = 1. y IR Assumption (and axiom) (2) Suppose x IR \ { 2} Assumption (3) f(x) = x + 1 x + 2 = y Assumption (4) x + 1 = (x + 2) y = x + 2 Algebra (3) (5) 1 = 2 Algebra (4) (6) 1 2 Axiom (7) (1 = 2) (1 2) Conjunction (5), (6) (8) f(x) y Proof by contradiction (9) ( x IR \ { 2})(f(x) y) Universal Generalization (8), (2) (10) ( y IR)( x IR \ { 2})(f(x) y) Existential Generalization (9) (11) f(x) is not onto. Definition of onto (10) Graded on a 0-3-5-7-10 point basis. Grading for common mistakes: +5 points (total) for saying that f( 2) is undefined. 12