For my course in analyzing the algorithm, I got the function f (n) = n ^ 2 - n + 2 from the algorithm. Now I need to prove or disprove f (n) ∈ O (n) . Obviously, this is not so, so I tried to refute it for several hours and cannot figure out how to do it.
To disprove this, I need to prove a negative result:
∀M > 0, ∀N > 0, ∃n > N s.t. n^2 - n + 1 < M·n
I tried to work back and forth, but it seems I’m not going anywhere. I also tried to prove that, in my opinion, f (n) ∈ O (n):
∃M > 0, ∃N > 0 s.t. ∀n > N, n^2 - n + 1 ≥ M·n
... without success. What am I doing so terribly wrong?
source
share