
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A step-by-step solution to the given recurrence equation using the iteration method. The derivation process and the final expression for the solution.
Typology: Exercises
1 / 1
This page cannot be seen from the preview
Don't miss anything!

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) … ⇒ akT(n/bk) + cn((ak-1/bk-1)+ (ak-2/bk-2)+ … + (a (^2) /b (^2) )+ (a/b) + 1)
When k = logb n, ⇒ n = bk T(n) = akT(1) + cn(ak-1/bk-1^ + ... + a^2 /b^2 + a/b + 1) = akc + cn(ak-1/bk-1^ + ... + a^2 /b^2 + a/b + 1) = cak^ + cn(ak-1/bk-1^ + ... + a^2 /b^2 + a/b + 1) = cnak/bk^ + cn(ak-1/bk-1^ + ... + a^2 /b^2 + a/b + 1) = cn(ak/bk^ + ... + a^2 /b^2 + a/b + 1)