Solution Verification: turning recurrence relation into asymptotic bound with master theorem

42 Views Asked by At

Here are some recurrences I think I've correctly converted to bounds. Please let me know if I am right or wrong.

T(n) = 3T(n/3) + lg(n) = Θ(n)

T(n) = 3T(n/6) + n = Θ(n)

T(n) = 4T(n/2) + n^2 = Θ(n^2 log n)

1

There are 1 best solutions below

2
On BEST ANSWER

First one is fine: $\log(n) \in o \left ( n^{\log_3(3)} \right )$, so you have case 1, which you applied correctly.

Second one is fine: $n \in \Omega \left ( n^{\log_6(3)} \right )$, so you have case 3, which you applied correctly.

Third one is fine: $n^2 \in \Theta \left ( n^{\log_2(4)} (\log(n))^0 \right )$, so you have case 2 with $k=0$, which you applied correctly.

Here I am following the Wikipedia article's notation.