I'm working through proof of f(n) + o(f(n)) = theta (f(n)) and I came across a part in the proof that I am having trouble understanding.
We let f(n) and g(n) be asymptotically positive functions and assume g(n) = O(f(n)).
In the proof, it states that since we know that f(n) + g(n) ≥ f(n) for all n, we can conclude that f(n) + g(n) = Omega((f(n)).
We can also conclude similarly that f(n) + g(n) ≤ 2 f(n). Therefore f(n) + g(n) = O(f(n)).
I am having trouble understanding why it is the case that f(n) + g(n) = Omega((f(n)) and f(n) + g(n) = O(f(n)) would be true. How is it that we can prove that the tight-lower bound is specifically when we add g(n) to f(n)? What is it that we are exactly concluding from the value of g(n)?
One way of proving that
f(n)istheta(g(n))is to prove two separate statements: thatf(n)isomega(g(n)), andf(n)isO(g(n)). It's pretty clear this way of proving is correct from the definitions of those notations.In this exact problem, if we choose some constant
cto be equal to1, we will have, for everyn, thatf(n) + g(n) >= c * f(n), so that, by definition, shows thatf(n) + g(n)isOmega(f(n)). Furthermore, for theO(f(n))part, if we choose the constantcto be2in this case, we need to prove that there exists somen0such thatf(n) + g(n) <= c * f(n)for everyn > n0, which is equivalent tog(n) <= f(n)for everyn > n0, which is equivalent to the definition ofg(n) = O(f(n))given in the problem statement.Hope this helps.