This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Concordia University Department of CSE COMP 232 Mathematics for Computer Science Solutions to Assignment 4 1. Use strong induction to prove that for every integer n 8 there exist nonnegative integers x,y such that n = 3 x + 5 y . SOLUTION: Basis : n = 8 : Take x = y = 1. n = 9 : Take x = 3 ,y = 0. n = 10 : Take x = 0; y = 2. Inductive hypothesis : Assume that for some n 10, and for all m such that 8 m n , there exist nonnegative integers x,y such that m = 3 x + 5 y . Inductive step : Now consider n + 1. Since n + 1 3 = n 2 8, using the inductive hypothesis, there exist x and y such that n 2 = 3 x + 5 y . Then n + 1 = 3( x + 1) + 5 y . This completes the inductive step. Remark: This problem can also be solved using standard induction. For the basis, if n = 8 then take x = y = 1. For the inductive step, suppose for some n ( n 8) we have n = 3 x + 5 y . Then n + 1 = 3 x + 5 y + 1 = 3 x + 5 y + 6 5 = 3( x + 2) + 5( y 1). Now y 1 could be negative if y = 0. In this case n = 3 x , and we must have x &gt; = 3. Thus in this case we can write n + 1 = 3 x + 5 y + 1 = 3 x + 5 y + 10 9 = 3( x 3) + 5( y + 2) where x 3 0. 2. The Fibonacci numbers are defined as follows: f = 0 ,f 1 = 1, and f n +2 = f n + f n +1 whenever n 0. Prove that when n is a positive integer: f f 1 + f 2 + ... f 2 n 1 + f 2 n = f 2 n 1 1 SOLUTION: Basis : n = 1. f f 1 + f 2 = 0 1 + 1 = 0 = f 1 1, since f = 0 and f 1 = 1. Inductive hypothesis : Suppose for some positive integer n : f f 1 + f 2  f 2 n 1 + f 2 n = f 2 n 1 1. Inductive step: We must show that f f 1 + f 2  f 2 n 1 + f 2 n f 2 n +1 + f 2 n +2 = f 2 n +1 1. ( f f 1 + f 2  f 2 n 1 + f 2 n ) f 2 n +1 + f 2 n +2 = f 2 n 1 1 f 2 n +1 + f 2 n +2 = f 2 n 1 1 ( f 2 n + f 2 n 1 ) + f 2 n +1 + f 2 n = f 2 n +1 1, as needed....
View
Full
Document
This note was uploaded on 01/05/2012 for the course COMP 232 taught by Professor Tba during the Spring '11 term at Concordia Canada.
 Spring '11
 TBA
 Computer Science

Click to edit the document details