主定理,求解递推,T(n)= 3T(n / 2)+ nlogn

时间:2017-02-28 14:42:00

标签: algorithm recurrence

T(n)= 3 * T(n / 2)+ n * log(n)

应该应用哪种情况?为什么?我认为案例1但不确定。

硕士定理:

enter image description here

1 个答案:

答案 0 :(得分:0)

T(n) = 3 * T(n / 2) + n * log(n)

a = 3 / b = 2 / f(n) = n log n

n^( log_b(a-ep) ) = n^(log_2(3-ep)) = n^1.58...

f(n) = n log n and is in O(n^1.58) as in case (1)

Therefore, T(n) in Theta(n^1.58...)