This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: YORK UNIVERSITY Faculty of Arts Faculty of Pure and Applied Science January  April 2003 AS/SC/MATH 2320 3.0 M Term Test 2b SOLUTIONS 1. (7 marks) Let f 1 = 1 , f 2 = 1 and f n = f n 1 + f n 2 , for n = 3 , 4 , 5 , . Show that f n 2 n , for every positive integer n. Hint: Use the second principle of Mathematical Induction. Answer: Prove: ( n Z + ) P ( n ) , where P ( n ) is the proposition f n 2 n . Basis Step: P (1) is true, since f 1 = 1 and 1 2 = 2 1 ; P (2) is also true, since f 2 = 1 and 1 4 = 2 2 . Induction Hypothesis: Assume that P ( j ) is true for all j : 1 j k, i.e. f j 2 j , j = 1 ,k. Induction Step: Then P ( k + 1) must be true also. f k +1 = f k + f k 1 2 k + 2 k 1 (by the induction hypothesis) 2 k + 2 k = 2 2 k = 2 k +1 . Hence, P ( k + 1) is also true. 2. (5 marks) Write a pseudocode description for a recursive algorithm that computes the value of 5 2 n , where n is a nonnegative integer....
View Full
Document
 Spring '14

Click to edit the document details