CmSc 180 Discrete Mathematics Unit Exam 2 - Solutions Proofs, Induction, Recursion 1. Prove that the product of two even integers is a multiple of 4 Let P and Q be two even numbers (1) x, even(x) p, integer(p) & x = 2p (2) even(P) given in the problem (3) even(Q) given in the problem (4) p, integer(p) such that P = 2p by (1), (2) and MP (5) q, integer(q) such that Q = 2q by (1), (3) and MP (6) M = P * Q = (2p)*(2q) = 4pq basic algebra (7) x, (integer(m) & x = 4m divisible by 4(x) (8) M = 4m, m = pq (9) divisible by 4 (M) by definition by (6) by (7), (8) and MP 2. Prove or disprove that the sum of any three consecutive integers is even. Disproof by counterexample: 4, 5, 6 are three consecutive integers. Their sum is 15 – odd number. 3. Using mathematical induction, prove that 5 + 10 + 15 + … 5n = 5n(n+1)/2 Let Sn = 5 + 10 + 15 + … 5n We shall prove by mathematical induction that P(n): Sn = 5n(n+1)/2 is true for all positive integers n a. Inductive base. S1 is the first term, S1 = 5 P(1) is S1 = 5.1.(1 + 1)/2 = 5 Therefore P(1) is true b. Inductive step We shall show that P(k) P(k+1) is true. Assume P(k) is true for some positive integer k. 1 We shall show that P(k+1): Sk+1 = 5(n+1)(n+2)/2 is true Sk+1 = Sk + 5(n+1) = 5n(n+1)/2 + 5(n+1) = 5n(n+1)/2 + 10(n+1)/2 = = (5n(n+1) + 10(n+1)) / 2 = 5( n(n+1) + 2(n+1))/2 = 5(n+1)(n+2)/2 Therefore P(k) P(k+1) is true By the principle of mathematical induction P(n): Sn = 5n(n+1)/2 is true for any positive integer n. 4. Find the explicit formula and write down the recurrence relation and the initial condition for each of the following sequences. a. 1, 3, 5, 7, 9, .. This sequence is the odd numbers, and the general formula is: an = 2n - 1 By the general formula an+1 = 2(n+1) – 1 = 2n -1 + 2 = an + 2 Recurrence relation: a1 = 1 an+1 = an + 2 b. 2, 6, 10, 14, 18, 22, ... In this sequence each next term is obtained from the previous by adding 4, hence the recurrence relation is: a1 = 2 an+1 = an + 4 In order to find the general formula, we do the following: a1 = 2 a2 = a 1 + 4 =2+4 a3 = a 2 + 4 = 2 + 4 + 4 = 2 + 2.4 a4 = a 3 + 4 = 2 + 2.4 + 4 = 2 + 3.4 We notice the following pattern: an =2 + (n-1).4 Recurrence relation: a1 = 2 an+1 = 2 + (n-1).4 2 5. The sequence below is given by its initial term and recurrence relation 1, 3, 9, 27, 81, ... a1 = 1 an+1 = 3an, n 1 Using mathematical induction prove that its general formula is an = 3n-1, n 1 Solution Proof by mathematical induction that an =3n-1 , n = 1, 2, … 1. Inductive base: Let P(n): an =3n-1 For n = 1 we obtain: P(1): 31-1 = 30 =1 On the other hand, a1 = 1, therefore P(1) is true 2. Inductive step: Assume that for some k, ak = 3k-1 We shall show that ak+1 =3k By the recurrence relation ak+1 = 3ak Substituting ak with 3k-1, we obtain: ak+1 = 3. 3k-1 = 31 + k -1 = 3k Therefore by the principle of mathematical induction, an =3n 3