Homework #2
Here are some exercises dealing with the Big-Oh notation. The due
date for this homework is Monday, April 12. You will be graded on
whether you did the homework. It is in your best interest to do your
best. Try to do these problems without consulting your notes. If you
cannot, consult your notes, then try again. If you have questions,
drop by office hours.
Big-oh exercises
- Give the definition of f(n) = O( g(n) ).
- Demonstrate, by applying the definition of big-oh, that
- n2 = O(n2)
- n2 + 1 = O(n2)
- k n2 + 1 = O(n2), where k is a positive constant
- Demonstrate, by giving appropriate counterexamples, that the
following claims are false:
- If f(n) = O(g(n)) and f(n) = O(h(n)) then g(n) = h(n).
- If f(n) = O(g(n)) and g(n) = O(f(n)) then f(n) = g(n).
- Prove, by applying the definition of f(n) = O(g(n)), each of the
following:
- If f(n) = O(g(n)) and g(n) = O(h(n)) then f(n) = O(h(n)).
- If f1(n) = O(g1(n))
and f2(n) = O(g2(n))
then
f1(n) f2(n) = O(g1(n)g2(n))
Carl G. Alphonce
Last modified: Wed Feb 25 08:52:19 EST 2004