Would it be possible to use the master theorem to solve the following recurrence?
T(n) = 9 T(n/2) + n^3 lg n
This recurrence hasn't been mentioned before in any of the questions on StackOverflow.
Best,
Would it be possible to use the master theorem to solve the following recurrence?
T(n) = 9 T(n/2) + n^3 lg n
This recurrence hasn't been mentioned before in any of the questions on StackOverflow.
Best,
You should use the Master Theorem to solve that kind of recurrence relation:
The general form of the Master Theorem is: $T(n) = a T(n/b) + O(n^d)$ or $T(n) = a T(n/b) + f(n)$, where $f(n)$ can take multiple forms (I'll let you dive into that).
That being said, let us begin solving the recurrence relation, step by step:
$$T(n) = 9 T(n/2) + n^3 \lg n$$
Step 1: Identify a, b and d. In your relation $a = 9$, $b = 2$. We need to work a little harder to find $d$, as you can see. The function $f(n)$ is of the form $n^\mathbf{d} \log^k n$. So $f(n) = O(n^3 \lg n)$, thus $\mathbf{d} = 3$.
Step 2: Analyze the a, b, d output of your recurrence relation and decide which of the following cases is valid:
I) $a = b^d$, then $T(n) = O(n^d \log^{k+1} n)$;
II) $a < b^d$, then $T(n) = O(n^d)$;
III) $a > b^d$, then $T(n) = O(n^{\log_b a})$.
In your situation, we have $9 > 2^3$, thus $T(n) = O(n^{\log_29}) = O(n^{3.17})$.
As you can see, this is a simple exercise on asymptotic notation. Next time try to give more insight on your thoughts regarding your problems, don't just post your homework blankly.