You are on page 1of 3

# MATH 135, Fall 2010

Midterm Solution
Problem 1.(8pts)
(a) (6pts) Construct a truth table for the statement
P =⇒ 

(NOT Q) ⇐⇒ R .

(b) (2pts) State the contrapositive of the statement “if n is prime, then n = 2 or n is odd”.
Solution.
(a) (6pts) The truth table is
P Q R (NOT Q) (NOT Q) ⇐⇒ R P =⇒ (NOT Q ⇐⇒ R)
T T T
F
F
F
T T F
F
T
T
T
T
T
T F T
T F F
T
F
F
F
F
T
F T T
F
T
T
F T F
F F T
T
T
T
F F F
T
F
T
(b) (2pts) “If n 6= 2 and n is even, then n is not a prime.”
Problem 2.(12pts) Consider the following statement “for any two numbers x and y, if x > y,
then x2 > y.”
(a) (4pts) Write down this statement using mathematical quantifiers.
(b) (4pts) Write down and simplify the NOT of this statement. Your answer should not have
the word “NOT” in it.
(c) (4pts) Is the statement in (a) true if the universe of discourse is the set of positive real
Solution.
(a) (4pts)
∀x, ∀y, (x > y =⇒ x2 > y)
(b) (4pts) Note that “NOT (P =⇒ Q)” is equivalent to “P 
AND (NOT Q)”, and “NOT ∀”
is “∃ NOT”. Thus, “NOT ∀x, ∀y, (x > y =⇒ x2 > y) ” is equivalent to
∃x, ∃y(x > y AND x2 ≤ y).
(c) (4pts) Over the positive real numbers, the statement is FALSE. The following is a counterexample. Let x = 1/2 and y = 1/3. Then x2 = 1/4 < 1/3 = y.
Problem 3.(9pts) A sequence {yn } is defined recursively by y1 = 16, y2 = 44, and
yn = 2yn−1 + 3yn−2 ,

n ≥ 3.

Prove that for all n ∈ P, yn = (−1)n+1 + 5 · 3n .
Solution. We prove the statement by Principle of Strong Induction.
If n = 1, (−1)2 + 5 · 31 = 1 + 15 = 16 = y1 . Thus the statement is true for n = 1.
If n = 2, (−1)3 + 5 · 32 = −1 + 45 = 44 = y2 . Thus the statement is true for n = 2.
Suppose there is a positive integer k ≥ 2 so that for 1 ≤ r ≤ k,
yr = (−1)r+1 + 5 · 3r
1

Problem 4. By Principle of Strong Induction.(11pts) (a) (3pts) Determine the coefficient of x3   1 6 2 in the expansion of 2x − . ∀n ∈ P. k ∈ P with n > k. we have n−1 n−1 − k k−1 Solution. y ∈ Z such that gcd(46134.(7pts) Find x. yn = (−1)n+1 + 5 · 3n . 6 So the coefficient is (2)3 (−1)6−3 = (20)(8)(−1) = −160 3     n−1 n−1 (b) (8pts) − k k−1 (n − 1)! (n − 1)! = − k!(n − 1 − k)! (k − 1)!(n − 1 − (k − 1))! (n − 1)! (n − 1)! = − k!(n − 1 − k)! (k − 1)!(n − k)! (n − 1)!(n − k) (n − 1)!k = − k!(n − k − 1)!(n − k) k(k − 1)!(n − k)! (n − 1)!(n − k) − (n − 1)!k = k!(n − k)! (n − 1)!(n − k − k) = k!(n − k)! n(n − 1)!(n − 2k) = k!(n − k)!n n! n − 2k = k!(n −  k)!  n n − 2k n = n k Problem 5. yk = (−1)k+1 + 5 · 3k and yk−1 = (−1)k + 5 · 3k−1 = (−1)k [2(−1) + 3] + 5 · 3k−1 [2 · 31 + 3] = (−1)k + 5 · 3k−1 [9] = (−1)k+2 + 5 · 3k+1 Since (−1)k = (−1)k (−1)2 = (−1)k+2 Thus the statement is true for n = k + 1 when it is true for 1 ≤ r ≤ k. 2244) = 46134x + 2244y.    6−r 6 1 2 r (a) (3pts) The general term is (2x ) − r x We want 2r + r − 6  = 3⇒ r = 3.   x  (b) (8pts) Prove that all n.   n − 2k n .Consider n = k + 1. = n k . We have yk+1 = 2yk + 3yk−1 k+1 = 2[(−1) From the recursive definition of {yn } and k + 1 ≥ 3 + 5 · 3k ] + 3[(−1)(k−1)+1 + 5 · 3k−1 ] From the assumption.

Since qx + by ∈ Z. Solution. Problem 6. 21 990 1254 = 1 · 990 + 264 1 −1 (−1) · row 3 + row 2 −1 (−1) · row 4 + row 3 2 −41 264 990 = 3 · 264 + 198 3 −3 (−3) · row 5 + row 4 −7 144 198 264 = 1 · 198 + 66 1 −1 (−1) · row 6 + row 5 9 −185 66 → gcd 198 = 3 · 66 + 0 Thus we have 66 = 9 · 46134 − 185 · 2244. i. a + b). b) = gcd(3a + 2b. by Proposition 2. d|(a + b) and e = gcd(3a + 2b. by Proposition 2. a + b). Let d = gcd(a. Multiplying by b.x y 46134x + 2244y Euclidean Algorithm q −q 1 0 46134 0 1 2244 46134 = 20 · 2244 + 1254 20 −20 (−20) · row 2 + row 1 1 -20 1254 2244 = 1 · 1254 + 990 1 −1 Solution. d|(3a + 2b) and d|(a + b). e|a. b ∈ Z. y ∈ Z. we have e ≤ d. e|b. c) = 1. we get b = abx + bcy = qcx + bcy = c(qx + by).. e|b. by the Euclidean algorithm.e. gcd(a. b) and e = gcd(3a + 2b. we have d = e. y = −185 is a solution. e|(a + b) − b. not both zero.11(ii). Since d ≤ e and e ≤ d. and x = 9. a + b). a + b). Since d|a and d|b.11(ii). c) = 1..e. Since gcd(a. i. we have c|b. We want to prove that d = e. c ∈ Z with c|ab and gcd(a. Since e|(3a + 2b) and e|(a + b). ..e. we have d ≤ e. b). Since e|(a + b) and e|b.(8pts) Let a. b. and d = gcd(a. Solution. i. Prove that c|b. Prove that gcd(a.(5pts) Let a. e|3(a + b) − (3a + 2b). Problem 7. Since c|ab. by Proposition 2. Since d|(3a + 2b). such that 1 = ax + cy. b) = gcd(3a + 2b. there exists q ∈ Z such that ab = qc. Since e|a.11. there exist x.