Why $n^{\log{\log{n}}}=\log{n}^{\log{n}}$

exponentiationlogarithms

I was reading the solution of one exercise on my book on algorithms.
What I need to do in short is order some function from fast to slow.
This is the link of the solution: site.

At some point I get the following property:
$$n^{\log{\log{n}}}=\log{n}^{\log{n}}$$
but how do you prove that?

I've tried to use the properties of logarithm, but I wasn't able to get that result.
Can you give me some hints?

Best Answer

$$n^{\log{\log{n}}} = n^{(\log{\log{n}})/(\log{n})(\log n)} = n^{(\log_n \log n)(\log{n})} = \left(n^{\log_n \log n}\right)^{\log{n}} = (\log n)^{\log{n}}$$

Related Question