For every b > 1 and every x > 0, we have logb n = O(nx).
For every r > 1 and every d > 0, we have nd = O(rn).
2log3n = nlog23
T(n) = T(n/3) + T(2n/3) + cn, T(n) is O(nlgn).
Proof of T(n) is Ω(nlgn):
T(n) ≥ (work done by leftmost leaves) + (cn⋅hleft)
≥T1⋅2log3(n)+cn⋅log3(n)
=T1⋅nlog3(2)+cn⋅log3(n)
≈T1⋅n0.63+cn⋅log3(n)
=Ω(nlgn)
网友评论