0% found this document useful (0 votes)
20 views2 pages

The Characteristic Polynomial Is P (X) X) 2) (2) (1 (+ The General Solution Is

The document contains solutions to 5 problems involving analyzing recurrence relations and determining their asymptotic bounds. Problem 1 involves finding the characteristic polynomial and general solution for a recurrence with constant coefficients, and determining it is Θ(1). Problem 2 finds the solution is Θ(1). Problem 3 determines the solution is Θ(n^2n). Problem 4 finds the solution is Θ(n^2) when n is a power of 2. Problem 5 determines the solution is Θ(n) when n is a power of 2.

Uploaded by

Dipthi Nair
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

The Characteristic Polynomial Is P (X) X) 2) (2) (1 (+ The General Solution Is

The document contains solutions to 5 problems involving analyzing recurrence relations and determining their asymptotic bounds. Problem 1 involves finding the characteristic polynomial and general solution for a recurrence with constant coefficients, and determining it is Θ(1). Problem 2 finds the solution is Θ(1). Problem 3 determines the solution is Θ(n^2n). Problem 4 finds the solution is Θ(n^2) when n is a power of 2. Problem 5 determines the solution is Θ(n) when n is a power of 2.

Uploaded by

Dipthi Nair
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MET CS566 HOMEWORK #3 SOLUTIONS Problem#1: The characteristic polynomial is p(x) = x3 - x2 - 2x + 2 which can written as:

p ( x) = ( x 1)( x 2 )( x + 2 )

The general solution is:

t (n) = c1 + c 2 ( 2 ) n + c3 ( 2 ) n Solving for the constants, we get: Therefore: c1 = 100, c2 = c3 = 3

t (n) = 100 + 3[( 2 ) n + ( 2 ) n ]

When n is even: ( 2 ) n = ( 2 ) n = 2 2 and the general solution becomes:

t (n) = 100 + 6(2)

n 2

When n is odd: ( 2 ) n + ( 2 ) n = 0 and t(n) = 100.

We conclude that t(n) g(n) where g(n): g(n) = Or,


Problem#2:

1 2n/2

when n is odd when is even g(n)(1)

g(n) O(2n/2) and

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

[4 n 1 1] + (15) = 5 T(n) = 5 (1) 3

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

Solving for the constants, we get: Therefore; So,


Problem #5:

T(n) = 2n2 n (n is a power of 2) T(n) (n2| n is a power of 2)

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. c1 = 3, c2 = -2, c3 =-1

(when n is a power of 2)

T(n) (n | n is a power of 2)

You might also like