0
$\begingroup$

I am learning about algorithmic complexities and I read that if f(n) and g(n) are asymptotically positive functions and if $f(n) =O(g(n))$ then the relationship $log(f(n)) = O(log(g(n)))$ holds.

I would like to know what are the necessary and sufficient conditions for this relation to hold?

$\endgroup$
1
$\begingroup$

It's obviously wrong. As an example take f(n) = 2, g(n) = $1 + e^{-n}$.

log f(n) = 1, log g(n) ≈ $e^{-n} / \log e$.

$\endgroup$
  • 1
    $\begingroup$ @Jyotish Robin: $f(n)\leq 2*g(n)$ so $f$ is indeed $O(g)$ $\endgroup$ – eru-cs Oct 22 at 20:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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