How we can prove that if $O(f(x))=O(g(x))$ then $Θ(f(x))=Θ(g(x))$?
Asked
Active
Viewed 59 times
1 Answers
2
Hint: Follow these steps:
- Since $O(f) = O(g)$ then in particular $f = O(g)$ and $g = O(f)$.
- Since $f = O(g)$ and $g = O(f)$ then $f = \Theta(g)$ (which is equivalent to $g = \Theta(f)$).
- 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