Question: (b) Illustrate all recursive calls made by the algorithm on input n=5 , i.e., when calling fn(5) , by drawing the recursion tree. [6 marks]
(b) Illustrate all recursive calls made by the algorithm on input
n=5,\ i.e., when calling
fn(5), by drawing the recursion tree. [6 marks]\ (c) What does
ff(n)compute for
n>=0? Justify your answer. [6 marks]\ (d) Compute an estimate of the execution time as a function of
n. Give\ your answer in Big-Oh notation and justify your answer. [6 marks]

(b) Illustrate all recursive calls made by the algorithm on input n=5, i.e., when calling fn(5), by drawing the recursion tree. [6 marks] (c) What does fn(n) compute for n0 ? Justify your answer. [6 marks] (d) Compute an estimate of the execution time as a function of n. Give your answer in Big-Oh notation and justify your answer. [6 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
