I have a question about the following recurrence relation:
$$T(n) = 27 \cdot T\left(\frac n 3\right ) + n^3 \log n$$
Using the master theorem, will this be
- $T(n) = \Theta(n^3)$, or
- $T(n) = \Theta(n^3 \log \log n)$?
I have a question about the following recurrence relation:
$$T(n) = 27 \cdot T\left(\frac n 3\right ) + n^3 \log n$$
Using the master theorem, will this be
If a recurrence relation is of the form
$$ T(n)= aT \left( \frac{n}{b} \right) + {n^k}(\log n)^p $$
then, as per the Master Theorem, we have six conditions depending on value of $a,b,k$ and $p$
In any problem, our main motive is to find $a,b,k$ and $p$.
For the problem with
$\log_3 27 = 3$, so $\log_b a = k$, and since $p=1$, the answer is $\Theta({n^k}\log\log n)$
$$\Theta({n^3}\log\log n)$$
\bigg
when \left
will do. 4. $p = 1$, not $p = -1$.
$\endgroup$
Commented
Sep 21, 2021 at 9:39
Quick check:
$$\Theta(n^3)=27\,\Theta\left(\frac{n^3}{27}\right)+n^3\log\log n$$
does not hold.