Which function is larger as $n$ gets very large?

72 Views Asked by At

Which function is larger as $n$ gets larger, $f(n)=2^{2^{2^n}}$ or $g(n)=256^{256^n}$?

I understand that logarithms would be useful for answering this question, and that indeed one could write $g(n)$ in a similar form to $f(x)$ and then compare. However, I am struggling to actually complete any of these approaches. Namely, I am struggling firstly in computing logs and logs and logs, etc, and also in writing $g(x)$ in a similar way to $f(x)$.

In your answers could you please help me by showing the stages :)

2

There are 2 best solutions below

2
On BEST ANSWER

We work with logarithms to base $2$. So $\log f(n) = 2^{2^{n}}\log 2 = 2^{2^{n}}$.

Repeat: $\log \log f(n) = 2^n \log 2=2^n$.

But $\log g(n) = 256^n \log 256 = 8 \cdot 256^n$ so $\log \log g(n) = \log 8 + n \log 256 = 8n + 3$.

Since eventually it's obvious we have $2^n > 8n + 3$ (if not, use induction) then $\log \log f(n) > \log \log g(n)$ and since $\log$ is strictly increasing we have $f(n) > g(n)$ for sufficiently large $n$.


Alternatively (well, really the same thing written differently), note that $256 = 2^8$ so $$g(n) = \left(2^{8}\right)^{2^{8n}}=2^{2^{8n+3}} < 2^{2^{2^n}}$$ when $2^n > 8n+3.$

0
On

Logarithms are not necessary here. Rewrite the second expression as $$256^{256^n}=\bigl(2^8\bigr)^{2^{8n}}=2^{2^3\cdot2^{8n}}=2^{2^{8n+3}},$$ and you can check $2^{2^n}>2^{8n+3}$, which amounts to $2^n>8n+3$ for all $n\ge 6$ by induction.