Take log: log|g(x)| > log C, Vx > b, therefore: log|f(x)| <= log C + log|g(x)| <= log|g(x)| + log|
(g(x))| = 2log|g(x)|. So there are constants 2 and b such that log|f(x)| <= 2log |g(x)|, x > b. thus,
log|f(x)| is O(log|g(x)|). Hence, proved.
Suppose that f (x) is O(g(x)). Does it follow that 2f (x) is O(2g(x))?
Let f1(x) and f2(x) be functions from the set of real numbers to the set of positive real
numbers. Show that if f1(x) and f2(x) are both theta(g(x)), where g(x) is a function from the set
of real numbers to the set of positive real numbers, then f1(x) + f2(x) is theta(g(x)). Is this still
true if f1(x) and f2(x) can take negative values?
3.3 – Complexity of Algorithms:
Give a big-O estimate for the number of operations (where an operation is an addition or a
multiplication) used in this segment of an algorithm.