In this problem you will analyze the running time of the fol

In this problem, you will analyze the running time of the following algorithm: SillyRecursion(n) if (n

Solution

lets take n=0 then

Recurrence S(0): 1

lets take n=1 then

Recurrence S(1) : 1

lets take n=2 then

Recurrence S(2): 8

lets take n=3 then

Recurrence S(3): 13

if n is greater than than 2 then recurrence will be = 4*s(n/2) +(n^2)= 4*s(1.5) + (3^2)=4*1+9=4+9=13

lets take n=4 then

Recurrence S(4): 44

4*s(n/2) +(n^2)= 4*s(2)+4*4=4*8+16=32+16=48

lets take n=5 then

Recurrence S(5): 57

4*s(n/2) +(n^2)= 4*s(2.5)+5*5=4*s(2)+25=4*8+25=32+25=57

lets take n=6 then

Recurrence S(6): 88

4*s(n/2) +(n^2)= 4*s(3)+6*6=4*13+36=52+36=88

lets take n=7 then

Recurrence S(7): 101

4*s(n/2) +(n^2)= 4*s(3.5)+7*7=4*S(3)+49=4*13+49=52+49=101

lets take n=8 then

Recurrence S(8): 240

4*s(n/2) +(n^2)= 4*s(4)+8*8=4*44+64=176+64=240

 In this problem, you will analyze the running time of the following algorithm: SillyRecursion(n) if (n Solutionlets take n=0 then Recurrence S(0): 1 lets take

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site