Is this true $f(n)+\mathcal O(f(n)) = \Theta(f(n))$?

72 Views Asked by At

Is this true $f(n)+\mathcal O(f(n)) = \Theta(f(n))$?

f(n) + {set of all functions upper bounded by f(n)} = function upper bounded by f(n) and so $\mathcal O$ follows from this.

But how lower bound is also f(n) from which we can infer $\Theta $

$f(n)+\mathcal O(f(n)) \geq ?$

In above statement in Qn, if i replace $\mathcal O $ with $\mathcal o$ then how the statement is true? kindly elaborate

1

There are 1 best solutions below

4
On BEST ANSWER

No, it is entirely possible that $g\in O(f)$ and $f+g\in o(f)$. Namely, with $g=-f$.

It is however true that if $g\in o(f)$, then $f+g\in \Theta(f)$. In fact, eventually $\lvert g\rvert\le \frac12\lvert f\rvert$ and therefore, eventually, $$\frac12\lvert f\rvert\le\lvert f\rvert-\lvert g\rvert\le\lvert f+g\rvert\le\lvert f\rvert+\lvert g\rvert\le\frac32\lvert f\rvert$$