0

I have $f(a, b) \in O(b - a)$ and $g(a) \in O(a)$.

Can I conclude that $f(a,b) + g(a) \in O(b)$?

What if $f(a, b) \in \Theta(b - a)$ and $g(a) \in \Theta(a)$?

scand1sk
  • 323
  • 1
    Do you mean "subtractions" by any chance? (I'm not familiar with the term "soustractions".) If so, you might edit the title to make it easier to find in a search. – Brian Tung Jan 08 '24 at 23:42
  • I think the best you can get is $f(a,b) + g(a) \in O(a + b)$. – Bergi Jan 09 '24 at 12:05

1 Answers1

0

Well, answering my own question:

$f(a, b) = b - 2\cdot a$ is in $O(b - a)$, and $g(a) = a$ is in $O(a)$.

$f(a, b) + g(a) = b - 2\cdot a + a = b - a$ which apparently $\notin O(b)$.

So obviously I cannot conclude as intended, but I am still curious how I can reason about $f(a, b) + g(a)$.

scand1sk
  • 323