To evaluate the claims regarding asymptotic notations, we first recall the formal definitions necessary for our arguments:
A function (f(n)) is (O(g(n))) if there exist constants (c > 0) and (n_0 > 0) such that (0 \leq f(n) \leq cg(n)) for all (n \geq n_0).
Claim 1: (f(n) - g(n) = O(s(n) - r(n)))
Disproof by Counterexample:
Let's choose specific functions for (f(n)), (g(n)), (s(n)), and (r(n)) that violate the supposed claim.
- Let (f(n) = 2n), and (s(n) = 2n). Clearly, (f(n) = O(s(n))).
- Let (g(n) = n), and (r(n) = n). Clearly, (g(n) = O(r(n))).
Now, (f(n) - g(n) = 2n - n = n) and (s(n) - r(n) = 2n - n = n).
At a glance, it seems to support the claim, but to disprove, let's adjust (r(n)) slightly:
- Adjust (r(n)) to be (\frac{1}{2}n), while keeping (g(n) = n). (g(n)) is still (O(r(n))) because (n \leq cn) for (c \geq 2).
Now, examine (s(n) - r(n) = 2n - \frac{1}{2}n = \frac{3}{2}n).
If (f(n) - g(n) = O(s(n) - r(n))), we would expect (n) to be bounded above by (c \cdot \frac{3}{2}n) for some constant (c). But in this case, (f(n) - g(n)) simply equals (n), and (s(n) - r(n)) also grows linearly; however, the claim 'expects' a generic truth regardless of actual functional forms, meaning without knowing more about how (s(n)) and (r(n)) compare, we cannot guarantee (f(n) - g(n)) is always (O(s(n) - r(n))). The essence here is that subtracting two functions can lead to different behaviors, and without specific constraints, it's possible for (f(n) - g(n)) to grow faster than (s(n) - r(n)), especially if (r(n)) grows significantly slower than (g(n)).
Claim 2: if (s(n) = O(g(n))), then (f(n) = O(r(n)))
Disproof by Counterexample:
Consider (s(n) = n) and (g(n) = n^2), so clearly, (s(n) = O(g(n))). However, let's choose (f(n) = n^2) and (r(n) = n), which are not compatible since (f(n)) grows faster than (r(n)), and it cannot be said that (f(n) = O(r(n))). This shows that even if (s(n)) is (O(g(n))), (f(n)) might not be (O(r(n))) without specific relationships between these functions' growth rates.
Claim 3: if (r(n) = O(s(n))), then (g(n) = O(f(n)))
Proof:
Given (r(n) = O(s(n))) implies there exist constants (c > 0) and (n_0 > 0) such that (0 \leq r(n) \leq cs(n)) for all (n \geq n_0).
Since we know (f(n) = O(s(n))) which means (f(n)) does not grow faster than (s(n)) up to a constant factor, and (g(n) = O(r(n))) where (g(n))'s growth is capped by (r(n)) also up to a constant factor.
Given the transitive property of (O) notation and the premise, if (r(n)) does not grow faster than (s(n)), and since (f(n)) itself is bounded by (s(n)), it follows logically that (g(n)), which is bounded by (r(n)), will also be bounded by (f(n)) under the transitive property of big-O notation, meeting the criteria to be (O(f(n))).