The Characteristic Polynomial Is P (X) X) 2) (2) (1 (+ The General Solution Is
The Characteristic Polynomial Is P (X) X) 2) (2) (1 (+ The General Solution Is
p ( x) = ( x 1)( x 2 )( x + 2 )
n 2
1 2n/2
T(n)= 4 T(n-1) - 15 = 4 [ 4 T(n-2) - 15] - 15 = 42 T(n-2) + 4 (-15) - 15 = 42 [4 T(n-3) - 15] + 4 (-15) - 15 = 43 T(n-3) +42 (-15) + 4 (-15) - 15 ...... =4i-1[4 T(i) - 15] + 4 i-2 (-15) +.....+ 4 (-15) - 15 = 4 iT(i) + 4 i-1 (-15) +...+ 4(-15) 15 ...... = 4 n-1T(1) + 4 n-2 (-15) +...+ 4(-15) - 15 = 5 4 n-1+ [4 n-2 +...+ 4 + 40] (-15)= 5 4
n 1
Problem #3:The characteristic polynomial is p(x) = (x2 - 3x + 2)(x-2) which can written as:
p( x) = ( x 1)( x 2) 2 The general solution is: Solving for the constants, we get: Therefore: t (n) = 3 2 n +1 + 3n 2 n1
Problem #4:
t (n) = c1 + c 2 2 n + c3 n 2 n
c1 = 3,
c2 = -2,
c3 = 3/2
t(n) (n2n)
The change of variable t(k) = T(2k) yields the following recurrence; tk = 4 tk-1 + 2k Whose characteristic polynomial is: The general solution: Which is: p(x) = (x-4)(x-2)
t (k ) = c1 4 k + c 2 2 k when n is a power of 2. c1 = 2, c2 = -1
T (n) = c1 n 2 + c 2 n
The change of variable t(k) = T(2k) yields the following recurrence; Whose characteristic polynomial is: The general solution: p(x) = (x-2)(x-1)2
tk = 2 tk-1 + k
t (k ) = c1 2 k + c 2 + c3 k
Which is: T (n) = c1n + c 2 + c3 log n Solving for the constants, we get: Therefore; So, T(n) = 3n log n -2
(when n is a power of 2)
T(n) (n | n is a power of 2)