Question: 5. (10 pts) (i) (3 pts) Consider the following algorithm. function recursive (n>=1:integer) :integer if n=1 then return (1) else return (recursive (n/3) + recursive

5. (10 pts) (i) (3 pts) 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 2 1) denote the time complexity of the algorithm. Write recursive equations for T(n). T(1)= T(n) = , n > 2 (ii) (5 pts) Solve the following equations to obtain the exact value of T(n), n 2 1. Assume n = 3k, k integer, a>0, b>0.. T(1) = a, T(n) = 3*Tn/3)+b*n, n>2. (iii) (2 pts) Write down the complexity of T(n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
