156k views
1 vote
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.

User Noti
by
3.5k points

1 Answer

1 vote

Answer:

Explanation: see attachment below

Consider the following recurrence, defined for n a power of 4 (for the time of some-example-1
Consider the following recurrence, defined for n a power of 4 (for the time of some-example-2
User LayfieldK
by
3.9k points