In lecture this week we gave formal definitions of the big-O and big-Omega notation. Here f and g are functions from N to the reals, ε is a positive real, and n and n0 are naturals.
Questions are in black, answers in blue.
In this discussion we will use these definitions, and the proof rules for quantified statements from CMPSCI 250, to prove some of the properties of big-O and big-Omega. (Anyone who took 250 from me should remember the rules of Existence, Instantiation, Specification, and Generalization -- I'll go over these on the board as needed.)
To show the first statement, we can let c=1 and n0 = 1, then because α < β implies nα ≤ nβ for positive n, we are done. If the second statement were true for any c and any n0, for all large n we would have nβ ≤ cnα. But this can't be true for all n, because for large enough n, nβ-α will be bigger than any fixed c.
To show f2 = O(f), pick c and n0 from the fact that
f = O(1) so that n ≥ n0 implies f(n) ≤ c. Then for the same
c and n0, n ≥ n0 implies that f2(n) ≤
cf(n).
To show f2 = Ω(f), pick ε and n0 from
the fact that f = Ω(1) so that n ≥ n0 implies
f(n) ≥ ε. Then for the same ε and n0, n ≥
n0 implies f2(n) ≥ εf(n).
The sum in question is that log(n!) is the sum for i from 1 to n of log(i). To see that log(n!) = O(n log n), note that this sum is ≤ n log n because each term is ≤ log(n). To see that log(n!) = Ω(n log n), note that the sum is ≥ (1/4)(n log n) because the second half of the terms are each bigger than (1/2)(log n) (as long as n is at least 4).
Last modified 14 March 2007