Which grows faster than 2 ^ (2 ^ n) or n ^ (2n)

I am sure that the former function is growing faster. But when I built it on Wolfram alpha, the latter seemed to dominate.

In general, if I want to compare f (n) and g (n), can log (f (n)) and log (g (n)) be used to analyze the original functions?

+4
source share
1 answer

log(x)is an increasing function, therefore, f(x) <= g(x)if and only if log(f(x)) <= log(g(x)).

In this case

log(2^2^n) = 2^n*log(2)

It is growing exponentially

But

log(n^(2*n)) = 2*n*(log(n)) = O(nlog(n))

which is subexponential.

Thus, you are right that 2^2^nasymptotically dominates n^(2*n).

, Wolfram Alpha. , 2^2^n n^(2*n) n: 2^(2^9) 1.34 x 10^154, 9^(2*9) - 1.5 x 10^17.

+7

Source: https://habr.com/ru/post/1667511/


All Articles