Find function with higher growth rate

109 Views Asked by At

I'm trying to find which function has higher growth rate.

$$f(n) = 2^{n^2 + n}$$ $$g(n) = 5^{12 * n + n * log_2n}$$

I've tried L'Hopital's rule several times, but failed.

Maybe we have another approach?

1

There are 1 best solutions below

2
On

You can convert the $5$ to a $2$: $$ g(n) = 5^{12 n + n \log_2n} = 2^{(\log_2 5 )(12 n + n \log_2n)} $$

Now both $f$ and $g$ are written as powers of $2$

To see which of $2^{a(n)}$ and $2^{b(n)}$ grows faster, you want to look at $$ \frac{2^{a(n)}}{2^{b(n)}} = 2^{a(n)-b(n)} $$ when $n$ is large. So look at the difference $a(n)-b(n)$.

(Of course you will reach the same conclusion if you convert ti $5$ to a $2$, essentially because $\log_2(n)$ and $\log_5(n)$ are proportional - a useful fact I often find surprising even though I've known it for years.)