complexity theory - How to analyzing this algorithm with justification -


is following claim true? why?

c(n) = log2(nn) implies c(n) theta(log n)

no, claim wrong. (assuming c(n)=c(n), , that's typo).

c(n) = log_2(n^n) = n*log_2(n) = nlog(n)  

since nlog(n) not in theta(logn), claim false, , in fact c(n) in theta(nlogn).


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -