Find a closed form solution for each of the following recurr

Find a closed form solution for each of the following recurrences (assume nis a power of 2). (a)T(0) = 2 T(n) = 4T(n1) + 1 (b)T(1) = 1 T(n) = 2T(n=4) +n

Solution

T(0) = 2

T(n) = 4T(n=1) + 1

closed form solution is recurrence relation ith substitution

T(n)=4*(4 * T(n=0)+1)+1

there fore

T(n)=4*(4 * T(0)+1)+1 closed form

T(n)=4*(4*2+1)+1

T(n)= constant

b)

T(1) = 1

T(n) = 2T(n=4) +n

T(n)=2 *(2*T(n=3)+3)+4

T(n)=2 *(2* (2*T(n=2)+2) +3)+4

T(n)=2 *(2* (2* (2*T(n=1)+1 ) +2) +3)+4 closed form

T(n) =2 * (2* (2* (2*1 +1 ) +2) +3)+4 =26

Find a closed form solution for each of the following recurrences (assume nis a power of 2). (a)T(0) = 2 T(n) = 4T(n1) + 1 (b)T(1) = 1 T(n) = 2T(n=4) +nSolution

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site