-1

I need to find the asymptotic behavior of T(n) = 4T(n/5) + (log(nn))5, in the form Θ(…).

I know of three ways:

  • recursion tree
  • master method
  • recurrence

Which way is easiest? And, how I can be sure I got the right answer?

ruakh
  • 175,680
  • 26
  • 273
  • 307
mukul dhiman
  • 37
  • 1
  • 6
  • 2
    So do all three ways and tell us which one was best? – superb rain Feb 26 '21 at 17:30
  • Master method, you'll get n to some power. – David Eisenstat Feb 26 '21 at 18:32
  • @ruakh Hmm, well, it at least changes the question in the sense that it allows different answers. Without the request for big-Theta, an answer could say it's O(n) and wouldn't be wrong. – superb rain Feb 26 '21 at 23:56
  • Cross-posted: https://math.stackexchange.com/q/4040897/14578, https://stackoverflow.com/q/66389860/781723. Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068). – D.W. Jun 16 '21 at 19:32

1 Answers1

2

For the asymptotic behavior, you can find the master theorem (if it can be applied) useful. Although in the master theorem's proof, it is using from the recursion tree, and these methods that you have written are not independent.

To using the master theorem, first simplify the not recursive part:

log(n\sqrt(n)) = log(n) + log(\sqrt(n)) = 3/2 log(n)

Hence:

T(n) = 4T(n/5) + (3/2 log(n))^5

From the master theorem, c_critic = log_5(4) = log(4)/log(5) ~ 0.86, we know that (3/2 log(n))^5 = O(n^0.5) such that 0.5 < c_critic. Therefore, T(n) = Theta(n^{log(4)/log(5)}) ~ Theta(n^0.86).

OmG
  • 18,337
  • 10
  • 57
  • 90