How do I convert ${\log n}^n$ to the form $n^x$, for some $x$? I'd like to compare the big-O runtime of $(\log n)^n$ to $n^{\log n}$ directly. Intuitively, $(\log n)^n$ grows faster since the exponent grows faster but I'm not sure how to prove the result directly. Any tips or guidance is appreciated.
Asked
Active
Viewed 969 times
1
-
Take $\log$ of both sides to get $x=\frac{n\log\log n}{\log n}$. – A.S. Feb 23 '16 at 17:18
3 Answers
4
Well, you want to write
$$(\log n)^n = n^x$$
If you take logarithm of both sides:
\begin{align*} \log \left( \log n \right)^n &= \log(n^x) \\ n \log(\log n) &= x \log n \\ x &=\frac{n \log (\log n)}{\log n}\end{align*}
mweiss
- 23,647
-
-
1Thank you @wythagoras for correcting the important omission of $n$ in the numerator. – mweiss Feb 23 '16 at 18:07
-
Please thank @Simpson17866 instead. I merely approved and improved his edit by fixing a little formatting. – wythagoras Feb 23 '16 at 18:16
-
2
How about this $(\ln n)^n = e^{n\ln\ln n}$ and $n^{\ln n} = e^{\ln n\ln n}$. Is it helpful?
echzhen
- 1,029
1
We can rewrite it as following:
$$\log(n)^n = (n^{\log_n (\log (n))})^n = n^{n \log_n( \log(n))} = n^{\frac{n \log (\log (n))}{\log(n)}}$$
wythagoras
- 25,026