Proof $10n = O(n^2)$

394 Views Asked by At

As it says in the question name. I want to proof this big-o notation:

10n = O(n^2)

Is this way here the correct an proper way to do so?

n0 = 0
10n = O(n^2)
n = O(n^2)

for N n > 0
n + 1 ≤ (n+1)^2
n + 1 ≤ n^2 + 2n + 1
n ≤ n^2 + 2n

I feel not 100% comfortable with it. We are struggeling with this question now for a while. It's - of course - for university. ;)

Cheers and thx for your help!

2

There are 2 best solutions below

0
On

Big hint: If $n>10$ then $n^2>10n$.

0
On

There are a couple of ways of going about it. To show $f$ is $O(g)$, one way is to show that $f$ is eventually dominated by some multiple of $g$, that is, there exists $n_0$ and $k$ such that for all $n > n_0$, $|f(n)| \leq k|g(n)|$.

So, when we replace our $f$ and $g$, we see that we need a $k$ for which (eventually) $|10n| \leq k|n^2|$. Since $n$ is positive, we're okay to drop the absolute value signs. So, we must find a $k$ such that (eventually) $10n \leq k \cdot n^2$.

At this point, a suitable $k$ should come to mind.