1. The recursive definition of the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, ...) is:

f 0 = 0

f 1 = 1

f n = f n - 1 + f n - 2 for n 2

Complete the recursive algorithm that calculates the nth element in the sequence.

2. Complete the recursion tree showing the calls for fib(5).

3. For the fib(5)recursion tree, what would be the maximum number of fib "call-frames" on the "run-time stack" during execution.

4. In the fib(5)recursion tree, number the order in which the calls are performed.

5. Let T(n) represent the time to perform the call to fib(5). Complete the recurrence relation for the fibonacci.

T(n)=