Make the same assumptions as in Exercise and, by finding counterexamples, refute the following statements:
a. f1(n) – f2(n) is O(g1(n) – g2(n)).
b. f1(n)/f2(n) is O(g1(n)/g2(n)).
Exercise
Assuming that f1(n) is O(g1(n)) and f2(n) is O(g2(n)), prove the following statements:
a. f1(n) + f2(n) is O(max(g1(n),g2(n))).
b. If a number k can be determined such that for all n > k, g1(n) ≤ g2(n), then O(g1(n)) + O(g2(n)) is O(g2(n)).
c. f1(n) * f2(n) is O(g1(n) * g2(n)) (rule of product).
d. O(cg(n)) is O(g(n)).
e. c is O(1).
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.