55.6k views
3 votes
Problem 3. Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(n/4) + 4n + 1 otherwise (a) Calculate T(16) by hand. Show your work. (b) Use the tree method to solve the recurrence exactly, assuming n is a power of 4. (c) Use the formula to calculate T(1). Show your work. (d) Use the formula to calculate T(4). Show your work. (e) Use the formula to calculate T(16). Show your work. (f) Use Mathematical Induction to prove that your formula is correct in general.

1 Answer

3 votes

Answer:

See attached pictures.

Step-by-step explanation:

See attached pictures for explanation.

Problem 3. Consider the following recurrence, defined for n a power of 4 (for the-example-1
Problem 3. Consider the following recurrence, defined for n a power of 4 (for the-example-2
User Abbes Yassine
by
4.3k points