1
$\begingroup$

Question: $T(n) = 9T(n/3) + n^2\log{n} + 2n$

Solution as in the notes:

$a=9, b=3, \log_3{9},$ however, since the question doesn't follow the master theorem guidelines, we need to find f(n) to use the master theorem:

So the prof used: $\lim \dfrac{n^2 \log n + 2n } {n^2 \log n}$

which ==> 1 + 2 * 0 ==> 1

thus, $n^2 \log n + 2n$ ∈ θ( $n^2 \log n$)

My question is: How did he choose the denominator and numerator of the lim above ?

  • 0
    You realize you only gave us one tenth of the proof you are asking about, right? Best guess: the professor showed that $n^2\log n + 2n = O(n^2\log n)$ (by showing the ratio you wrote is bounded -- actually goes to $1$ when $n\to \infty$), then applied the Master theorem using "$f(n)=n^2\log n + 2n = O(n^2\log n)$."2017-02-11
  • 0
    @ClementC. my bad. I'll edit the question now.2017-02-11
  • 0
    @ClementC., ok updated it. my question, On what basis did he choose the denominator and numerator of the lim ? is there a rule I don't know about ? or it was just intuition ?2017-02-11
  • 0
    Intuition/experience/eyeballing. $2n$ is linear in $n$, $n^2\log n$ is (more than) quadratic: so $n^2\log n+2n$ is dominated by the first term, the second is negligible.2017-02-11
  • 0
    @ClementC. awesome ty2017-02-11

0 Answers 0