How to prove that $n^{n-2} = O(2^{n^2})$

55 Views Asked by At

I'm struggling to show that : $n^{n-2} = O(2^{n^2})$ .

I know the definition of big O but I don't know any method to show this. Could you please help me giving a few methods?

2

There are 2 best solutions below

0
On BEST ANSWER

Here is a less obvious approach for the cases when it will not be as simple as in Shubham's answer. Note that $f(x) < g(x) \iff \ln f(x) < \ln g(x)$ and compare the logs to get $$ \ln\left(n^{n-2}\right) = (n-2) \ln n = \Theta(n \ln n) $$ versus $$ \ln \left(2^{n^2}\right) = n^2 \ln 2 = \Theta\left(n^2\right)... $$

3
On

$$\lim_{n\to\infty}\frac{n^{n-2}}{2^{n^2}}=\lim_{n\to\infty}\frac1{n^2}\cdot\Big(\frac{n}{2^n}\Big)^n=0$$