Search code examples
big-ocomputer-science

Does O(f(n)) + Ω(g(n)) equal Ω(f(n)) + O(g(n))?


Is the following equation true? :

O(f(n)) + Ω(g(n)) = Ω(f(n)) + O(g(n))

I know that Big O means no better than (function), and Big Omega means no worse than (function). But I don't know if that makes the above statement true or false.


Solution

  • Let $f(n) = n, g(n)= 2^n$

    $t(n) = 2n$ is in second set, because $n = Ω(f(n))$ and $n = O(g(n))$, but not in the first