Home > other >  Why is n^log5 the same order as 5^logn , I would assume 5^logn would be the higher order
Why is n^log5 the same order as 5^logn , I would assume 5^logn would be the higher order

Time:12-10

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: enter image description here

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.

  • Related