hw5_key - COT3100 Summer2001 Assignment #5 (Solution)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COT3100 Summer’2001 Assignment #5 (Solution) Assigned: 07/05, due: 07/19 in recitation Total 100 points. 1. (8pts) Prove by induction that for every nonnegative integer n 0, 2 0 +2 1 +… 2 n =2 n +1 - 1. Basis . n =0: LHS=2 0 =1; RHS=2 0+1 - 1 = 2 - 1 =1. So, LHS=RHS. IH . Assume that for n = k , where k is some integer k 0, the equality holds. In other words assume that for some k 0 2 0 +2 1 +…2 k =2 k +1 - 1. IS . We need to prove that the equality holds for n = k +1, i.e. 2 0 +2 1 +…2 k + 2 k +1 = 2 ( k +1)+1 - 1. 2 0 +2 1 +…2 k + 2 k +1 = (2 k +1 - 1) + 2 k +1 (by IH) = 2 2 k +1 - 1 = 2 k +2 - 1 So, induction step is proved. By induction principle the summation formula is true for any n 0. 2. (9pts) A sequence of numbers a n is defined recursively as follows: a 0 =0; a n +1 =2 a n + n , for n 1 Prove that a n =2 n - n - 1. Basis . We need to check that the given formula is correct for n = 0. This formula gives a 0 =2 0 - 0 - 1 = 1 - 1 = 0, in agreement with a 0 = 0 by recursive definition. IH . Assume that the formula is correct for n = k , where k is some integer k 0, i.e. we assume that a k = 2 k - k - 1. IS We need to prove that the formula is correct for n = k +1, i.e. that a k +1 =2 k +1 - ( k +1) - 1 = = 2 k +1 - k - 2. But by recursive definition we have that a k +1 =2 a k + k . By substitution a k =2 k - k - 1 from IH we get a k +1 =2 (2 k - k - 1) + k = 2 k +1 - 2 k - 2 + k = 2 k +1 - k - 2. So, induction step is proved. By induction principle the formula a n =2 n - n - 1 is correct for any n 0. 3.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 07/14/2011.

Page1 / 3

hw5_key - COT3100 Summer2001 Assignment #5 (Solution)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online