Could you please give an example that disproves the following Big-O comparison:
$$f(n)^2=O(g(n)^2)\qquad\text{implies}\qquad constant^f=O(constant^g)$$
Could you please give an example that disproves the following Big-O comparison:
$$f(n)^2=O(g(n)^2)\qquad\text{implies}\qquad constant^f=O(constant^g)$$
Copyright © 2021 JogjaFile Inc.
Just take $f(n) = 2n$ and $g(n) = n$. Then $c^{f} = c^{2n}$ is not $O(c^g) = O(c^n)$ when $c > 1$. To see this, you can note that $\lim_{n \to \infty} c^{2n}/c^{n} = \infty$.