{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sol_Prac_Final_3

Sol_Prac_Final_3 - Solutions to the Practice Final Exam...

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

View Full Document Right Arrow Icon
Solutions to the Practice Final Exam December 2, 2009 1. Solution: (a) a (0) = 1 , a (1) = 2 , a (2) = 7 , a (3) = 26 , a (4) = 97, and a (5) = 362. (b) Notice that the characteristic polynomial of the recurrence relation is x 2 - 4 x +1, which has roots 2 ± 3, yielding template solution a ( n ) = α (2 + 3) n + β (2 - 3) n . From the initial values, we have α + β = 1 α (2 + 3) + β (2 - 3) = 2 which has solution α = 1 / 2 and β = 1 / 2. Thus, we have a ( n ) = (2 + 3) n 2 + (2 - 3) n 2 . (c) Proof by induction. Step 1. (Base case) It is easy to verify that a (0) = (2+ 3) 0 2 + (2 - 3) 0 2 = 1 and (2+ 3) 1 2 + (2 - 3) 1 2 = 2. Step 2. (Induction) Suppose a ( n ) = (2+ 3) n 2 + (2 - 3) n 2 for some n 1. We then compute a ( n + 1) = 4 a ( n ) - a ( n - 1) = 4( (2 + 3) n 2 + (2 - 3) n 2 ) - ( (2 + 3) n - 1 2 + (2 - 3) n - 1 2 ) = (2 + 3) n - 1 2 (4(2 + 3) - 1) + (2 - 3) n - 1 2 (4(2 - 3) - 1) = (2 + 3) n - 1 2 (2 + 3) 2 + (2 - 3) n - 1 2 (2 - 3) 2 = (2 + 3) n +1 2 + (2 - 3) n +1 2 and the induction step is complete. 2. Solution: Notice that x ( n + 1) + n + 1 = 2( x ( n ) + n ) + 1. Letting y ( n ) = x ( n ) + n , we have y ( n + 1) = 2 y ( n ) + 1 , n 1 . Since x (1) = 1, then y (1) = 2. Guessing now that the general solution has the form y ( n ) = α 2 n + β , if we plug into the recurrence we get α 2 n +1 + β = 2 · α 2 n + 2 β + 1 which implies β = - 1. Now substituting into the recurrence for n = 1, we get α = 3 2 . Thus, y ( n ) = 3 · 2 n - 1 - 1 which implies that x ( n ) = 3 · 2 n - 1 - n - 1 .
Background image of page 1

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

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

{[ snackBarMessage ]}