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

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

c# - Avoiding duplicate methods for Task and Task<T> -

javascript - Which segment of a polyline was clicked? -