Solving a Recurrence Equation using the Iteration Method: c(n) = aT(n/b) + cn, n > 1, Exercises of Aeronautical Engineering

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

2011/2012

Uploaded on 07/20/2012

savitri_122
savitri_122 🇮🇳

4.6

(14)

184 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
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
a2T(n/b2) + cn(a/b) + cn
a2T(n/b2) + cn((a/b) + 1)
a2(aT((n/b2)/b) + cn/b2) + cn((a/b) + 1)
a3T(n/b3) + cn(a2/b2) + cn((a/b) + 1)
a3T(n/b3) + cn((a2/b2)+ (a/b )+ 1)
akT(n/bk) + cn((ak-1/bk-1)+ (ak-2/bk-2)+ … + (a2/b2)+ (a/b) + 1)
When k = logb n,
n = bk
T(n) = akT(1) + cn(ak-1/bk-1 + ... + a2/b2 + a/b + 1)
= akc + cn(ak-1/bk-1 + ... + a2/b2 + a/b + 1)
= cak + cn(ak-1/bk-1 + ... + a2/b2 + a/b + 1)
= cnak/bk + cn(ak-1/bk-1 + ... + a2/b2 + a/b + 1)
= cn(ak/bk + ... + a2/b2 + a/b + 1)
docsity.com

Partial preview of the text

Download Solving a Recurrence Equation using the Iteration Method: c(n) = aT(n/b) + cn, n > 1 and more Exercises Aeronautical Engineering in PDF only on Docsity!

C

  1. Solve the following recurrence equation using the iteration method. Show all the steps in your derivation. c n = 1 T ( n )= (^) aT n √+ 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) … ⇒ 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)

docsity.com