









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










2 2 T(n/2) + 2cn (^2 3) = 2[2T(n/2) + c(n 2 2 ) ] + 2cn (^3 3) = 2T(n/2^ ) + 3cn …jj = 2T(n/2^ ) + jcnk^ Suppose n = 2^ and T(1) = c
k^ ⇒ T(n) = 2 T(1) + kcn = n + cnlg(n)
2 2 2)^ + o(n))/(cn+ o(n), which in the (^2) limit is equal to 4. o(n) means lower order terms.
-^ If T(n) =^ Θ(nlogn)^ – Doubling the input size roughly doubles the time [sameas linear]^ – T(2n)/T(n) = (c2nlog(2n) +o(nlogn))/(nlog(n)+o(nlogn)) =^ = (c2nlogn + o(nlogn))/(cnlogn + o(nlogn)), which inthe limit is equal to 2
2 2 ,…, T(10000)/
∞?