{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

c13_ps05_sol

# c13_ps05_sol - … ⇒ a k T(n/b k cn(a k-1/b k-1(a k-2/b...

This preview shows page 1. Sign up to view the full content.

C13 1. Solve the following recurrence equation using the iteration method. Show all the steps in your derivation. c n = 1 n T n ) ( = aT + cn n > 1 b Substitute the value of T(n) from the recurrence equation: aT(n/b) + cn a(aT((n/b)/b) + c(n/b)) + cn a 2 T(n/b 2 ) + cn(a/b) + cn a 2 T(n/b 2 ) + cn((a/b) + 1) a 2 (aT((n/b 2 )/b) + cn/b 2 ) + cn((a/b) + 1) a 3 T(n/b 3 ) + cn(a 2 /b 2 ) + cn((a/b) + 1) a 3 T(n/b 3 ) + cn((a 2 /b 2 )+ (a/b )+ 1)
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: … ⇒ a k T(n/b k ) + cn((a k-1 /b k-1 )+ (a k-2 /b k-2 )+ … + (a 2 /b 2 )+ (a/b) + 1) When k = log b n, ⇒ n = b k T(n) = a k T(1) + cn(a k-1 /b k-1 + . .. + a 2 /b 2 + a/b + 1) = a k c + cn(a k-1 /b k-1 + . .. + a 2 /b 2 + a/b + 1) = ca k + cn(a k-1 /b k-1 + . .. + a 2 /b 2 + a/b + 1) = cna k /b k + cn(a k-1 /b k-1 + . .. + a 2 /b 2 + a/b + 1) = cn(a k /b k + . .. + a 2 /b 2 + a/b + 1)...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online