how are nlog5 and 5logn of the same order?
Knowing that n2 < 5n i would assume that nlog5 < 5logn
CodePudding user response:
This is because if you follow logarithmic laws you see that they are the same, following this:
CodePudding user response:
a^b = e^(b*log(a)) = (e^b)^(log(a)) = (exp(b))^(log(a))
.
The first equality is a definition, the second one is a well-known rule on powers, the third one is just a notation.
With a=5
and b=log(n)
this gives
5^(log(n)) = (exp(log(n))^(log(5)) = n^(log(5))
because exp(log(n))=n
.