Let $f(n) = n^{(n+1)}$ can we say that $f(n)$ is $O(n^n)$

80 Views Asked by At

Let $f(n) = n^{(n+1)}$ can we say that $f(n)$ is $O(n^n)$?

To solve this problem I am using the Big-Oh definition:

We must find $c_1$ and $N_0$ such that $f(n) \leq C_1 \times n^2$ for $n \geq N_0$

My Attempt:

I say that we cannot say that $f(n)$ is $O(n^n)$ because $n^{(n+1)} $ will always be greater than $n^n$ for $(n \geq 1)$.

$ n^{(n+1)} \leq n^n$ for $(n \geq 1) \rightarrow$ This is false

Am I on the right track? I'm not sure if what i've written is enough of a proof.

EDIT: I've gotten a little further

I let $f(n) = n^{n+1}$ and $g(n)=n^n$.

Now, $N_0 \geq 1$ and $C_1 = 2$

Now, $n^{n+1} \leq 2 \times n^n$ for $n \geq 1 \rightarrow$ This is false

However,

I let $f(n) = n^{n+1}$ and $g(n)=n^n$.

Now, $N_0 \geq 1$ and $C_1 = 2$

Now, $n^{n+1} \leq 2 \times n^n$ for $n \geq 2 \rightarrow$ This is True

Is my truth enough to be represented as a proof?

Edit # 2

$n^{n+1} \leq C\times n^n$

$n^n \times n^1 \leq C \times n^n$

$n^1 \leq c$

Therefore, $N_0 = 1$ and $C_1 \geq 1$

$n^{n+1} \leq 1 \times n^n$ for $n \geq 1$


I also have another problem: Let $f(n) = n!$. Prove $f(n)$ is $O(n^n)$

My Attempt:

I feel as if the answer is simply:

$n! \leq n^n$ for $(n \geq 1)$

I can prove this using a graph, but do I need to show more math?

The blue line is $n^n$, and the red line is $n!$

enter image description here