0

My first thought was using the third case of the master theorem, but I am not sure if I can use $\epsilon \rightarrow 0$, so $f(n) \in \Omega(n^{log_2^4+\epsilon})$.

Otherwise, I tried solving the equation by iteration where I got $T(n) \in \Theta(n^2log_2^3n)$ instead of $T(n) \in \Theta(n^2log_2n)$.

Which solution is right and why? Thanks.

Kii
  • 1
  • You cannot use the Master Theorem on this recurrence relation because $f(n)$ must be polynomially larger than $n^{\log_b a}$ for case 3. I would recommend using the recursion tree approach, as it is a straightforward $\log_2 n$ depth overall. You must figure out the work at each level though. – ryan Sep 11 '17 at 17:01
  • 1
    While some books have a simplified case 2 for whatever reason, many other resources have a version that solves your recurrence. Closing as duplicate for now; if you have problems applying that version of the lemma, please edit and flag for reopening. – Raphael Sep 11 '17 at 17:11

1 Answers1

-1

When you applied the master theorem, f(n) is n^2 right. This is anyways asymptotically lesser than O(n) which is the n^2log(n). Hence at each node of the recursion tree, the O(n) would dominate computation hence T(n) is O(n). The reason why this is true is because when you apply the recursion tree the number of processes at each node if you calculate would be 2O(n/2)+4O(n/4)...... whose sum turns out to be lesser than O(n).

user77108
  • 9
  • 2