简体   繁体   English

重现:T(n)=(2 + 1 / log n)T(n / 2)

[英]Recurrence: T(n) = (2+1/log n)T(n/2)

I have to solve this recurrence relation with tree method, because Master theorem does not apply. 我必须用树方法解决这种递归关系,因为Master定理不适用。

T(n) = (2+1/log n) T(n/2) T(n)=(2 + 1 / log n)T(n / 2)

After a some thoughts I can not come up with an exact solution. 经过一番思考后,我无法想出一个确切的解决方案。 Master's theorem does not work here and unrolling the tree has not gave me anything reasonable. 硕士定理在这里不起作用,展开树并没有给我任何合理的东西。 So I will just estimate the complexity in the following way. 所以我将以下列方式估算复杂性。

For any reasonably big n you can estimate 0 < 1/log n < 1 . 对于任何合理的大n您可以估计0 < 1/log n < 1 So you can get: 所以你可以得到:

T1(n) = 2 * T1(n/2)
T2(n) = 3 * T2(n/2)

and O(T1) < O(T) < O(T2) . O(T1) < O(T) < O(T2) You can find the complexity for both recurrences using master theorem . 您可以使用主定理找到两次重复的复杂性。 The complexity of T1 is O(n) and of T2 is O(n^log2(3)) . T1的复杂度是O(n)T2的复杂度是O(n^log2(3))

So you can be sure that the complexity of your recurrence is bigger than O(n) and less than O(n^1.58) , so less than quadratic. 因此,您可以确定重复的复杂性大于O(n)且小于O(n^1.58) ,因此小于二次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM