-2
$\begingroup$

How can I prove this: f(n) = o(g(n)) if and only if f(n) = O(g(n)), but f(n) ≠ Θ(g(n)) ?

$\endgroup$
1
  • $\begingroup$ What have you tried? $\endgroup$
    – zkutch
    Commented Aug 28, 2022 at 6:19

1 Answer 1

2
$\begingroup$

The result is false. For example, consider the following functions:

  • $f(n) = \left\{\begin{array}{ll}n&\text{if }n\text{ is even}\\ n^2&\text{otherwise}\end{array}\right.$;
  • $g(n) = n^2$.

Then $f \in \mathcal{O}(g)$ and $f\notin \Theta(g)$, but $f\notin o(g)$ either.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.