Where The Log Vanishes

A candidate solves T(n)=4T(n/2)+nlg⁡nT(n) = 4T(n/2) + n \lg n by saying: "master theorem case 2, so T(n)=Θ(nlog⁡24lg⁡n)=Θ(n2lg⁡n)T(n) = \Theta(n^{\log_2 4} \lg n) = \Theta(n^2 \lg n)."

Compare f(n)=nlg⁡nf(n) = n \lg n against nlog⁡ba=n2n^{\log_b a} = n^2 and give the correct answer.

A

Θ(nlg⁡2n)\Theta(n \lg^2 n)

B

Θ(n2)\Theta(n^2). nlg⁡nn \lg n is polynomially smaller than n2n^2, so the leaves dominate and the lg⁡n\lg n never reaches the answer.

C

Θ(n2lg⁡n)\Theta(n^2 \lg n). Case 2 applies whenever f(n)f(n) carries a log factor.

D

Θ(n2lg⁡2n)\Theta(n^2 \lg^2 n), since the tree has lg⁡n\lg n levels and each contributes a log.