Comment by bobmarleybiceps
1 day ago
that's not the convention I know... (from CLRS algorithms book).
Big O is sort of like <=. little o is sort of like <.
1 day ago
that's not the convention I know... (from CLRS algorithms book).
Big O is sort of like <=. little o is sort of like <.
yes, GP is slightly off, but the idea of <= and < is accurate.
O(n) is: "there exists a K such that, for sufficiently large n, K*n is always larger".
o(n) is: "for every K, for sufficiently large n, K*n is always larger". (So o(2n+1) and o(2n) and o(n) are the same thing.)
> "there exists a K such that, for sufficiently large n, K*n is always larger".
For what it's worth you can leave out the 'sufficiently large n' part, assuming we're talking about positive integers (or continuous functions on the nonnegative reals). I like to leave it in though because it makes the jump to defining both o, O and Theta in terms of lim sup f/g a little easier.