简体   繁体   中英

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.

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 . So you can get:

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

and 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)) .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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