3

Suppose that $f, g$ are functions from the positive integers to the positive reals. Under what circumstances will $\log f(n)=O(\log g(n))$ imply $f(n)=O(g(n))$?


It's easy to see that this isn't always true: If $f(n)=3^n$ and $g(n)=2^n$ then we know that $3^n\notin O(2^n)$, but taking logs gives $\log3^n = n\log 3$ and $\log 2^n=n\log 2$ and it's obvious that $n\log 3=O(n\log 2)$.

The reason is also clear: If there exists a $c>0$ such that $\log f(n)\le c\,\log g(n)$ then all we can say is that $f(n)\le (g(n))^c$, which won't necessarily allow one to conclude $f(n)=O(g(n))$. When, though, can we correctly make the inference?

Rick Decker
  • 15,016
  • 5
  • 43
  • 54

1 Answers1

1

It is at least sufficient to have $\log f(n) \in o(\log g(n))$. This gives us that for sufficiently large $N$, we have $\log f(n) \leq \log g(n)$ for all $n > N$.

Hence immediately we have that for $c=1, n > N$, $f(n) \leq c\cdot g(n)$ and ergo $f(n) \in O(g(n))$.

This also suggests the condition that if we have that $\log f(n) \leq c\cdot \log (g(n))$ where $c \leq 1$ for sufficiently large $n$, then we also get $f(n) \in O(g(n))$.

Luke Mathieson
  • 18,373
  • 4
  • 60
  • 87