[Math] Prove Big-Oh using Induction

asymptoticsdiscrete mathematicsfactorialinduction

Prove using induction: $n! = O(n^n)$. Just need to prove this, and I was told that it could be done with induction. The base case is easy to solve for, but how would I go about solving the case of $n=k$,$n=k+1$?

I know that it is true just by plugging in a number, but I don't think it is supposed to be proved my contradiction…

Best Answer

$P(n): n!\le n^n$

Base case: $P(1): 1!\le 1^1$ true.

Induction step: assume $P(n)$ true, which is $n!\le n^n$. Then:

$$(n+1)!=n!\cdot(n+1)\le n^n\cdot(n+1)\le (n+1)^n\cdot(n+1)=(n+1)^{n+1}$$

So $(n+1)!\le (n+1)^{n+1}$, which means that $P(n+1)$ is true.

Then in the definition of "Big Oh", you may take $C=1$, and your proof is complete.