3

How we can prove that if $O(f(x))=O(g(x))$ then $Θ(f(x))=Θ(g(x))$?

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503
Nick James
  • 33
  • 2

1 Answers1

2

Hint: Follow these steps:

  1. Since $O(f) = O(g)$ then in particular $f = O(g)$ and $g = O(f)$.
  2. Since $f = O(g)$ and $g = O(f)$ then $f = \Theta(g)$ (which is equivalent to $g = \Theta(f)$).
  3. Since $f = \Theta(g)$, if $h = \Theta(f)$ then also $h = \Theta(g)$, and vice versa, and so $\Theta(f) = \Theta(g)$.

It is somewhat confusing that $O(f) = O(g)$ means one thing and $f = O(g)$ means another thing; if $O(f)$ is the collection of all functions $h$ such that for large enough $n$ and some $C > 0$, $h(n) \leq Cf(n)$, then $O(f) = O(g)$ is set equality while $f = O(g)$ should more properly be written $f \in O(g)$.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503