How do i prove (n^2 - n)/2 is O(n^2)? [closed]

Tag: big-o Author: jh460219082 Date: 2013-03-25

I'm not too sure how to prove that. I may have an answer but i'm not sure if it is correct. This is what i have:

(n squared - n) / 2 <= C * n squared 1/2 n squared - 1/2 n <= (a + 1) n squared

so if n >= 1.5 then 1/2n <=n squared, so..

1/2 n squared + n squared <= 2 1/2 n squared

thus proving there is a C that can be an upper bound for the T(n) equation and is = O(n squared)

yes/no?

Other Answer1

The proof is in the definition

(n^2 - n)/2 is n^2/2 - n/2 and O(a,b) is the max (O(n^2/2), n/2) = O(n^2)