I am trying to prove that n^2 + 5 log(n) = O(n^2), O representing big-O notation. I am not great with proofs and any help would be appreciated.
Asked
Active
Viewed 1,162 times
0
-
2hint: detemine the *fastest growing component* on the left side of the equation (either implicitly, or explicitly) - (Big O notation)[https://en.wikipedia.org/wiki/Big_O_notation] only takes the *fastest growing* component. You can also prove this by e.g. solving a limit `lim n->inf LEFT_SIZE/PROPOSED_RIGHT_SIZE = 1` (proving that is IMO sufficient as a proof that given big O is OK), by finding an asymptotic boundary etc. – Sep 03 '15 at 20:14
-
Easiest way to prove it is just to show that 5 log(n) is less than n^2. Then n^2 + 5 log(n) is less than 2n^2 then n^2+5 log(n) is O(n^2) – Chad S. Sep 28 '15 at 19:14
1 Answers
1
Informally, we take big-O to mean the fastest growing term as n grows arbitrarily large. Since n^2 grows much faster than log(n), that should be clear.
More formally, asymptotic behaviors are identical when the limit of the ratio of two functions approaches 1 as their parameter(s) approach(es) infinity, which should sound like the same thing. So, you would need to show that lim(n->inf)((n^2+5log(n))/n^2) = 1.

John C
- 1,931
- 1
- 22
- 34