Question: (i) Consider the following algorithm. function recursive (n>=1:integer) :integer if n= 1 then return (1) else return (recursive (n/3) + recursive (2*n/3)) endif Let T(n)

 (i) Consider the following algorithm. function recursive (n>=1:integer) :integer if n=

(i) Consider the following algorithm. function recursive (n>=1:integer) :integer if n= 1 then return (1) else return (recursive (n/3) + recursive (2*n/3)) endif Let T(n) (n > 1) denote the time complexity of the algorithm. Write recursive equations for T(n). T(1)= T(n)= ,n22 (ii) Solve the following equations to obtain the exact value of T(n), n1. Assume n= 3k, k integer, a>0, b>0.. T(1)= a, T(n)=3*Tn/3)+b*n, n>2. (iii) Write down the complexity of T(n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!