I misunderstanding about some logarithm property in algorithm course:
is it correct that we say following three term is equivalent?
$O(\log a + \log b)$
$O(\log (ab))$
$O(\log (a+b))$
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.
Sign up to join this communityI misunderstanding about some logarithm property in algorithm course:
is it correct that we say following three term is equivalent?
$O(\log a + \log b)$
$O(\log (ab))$
$O(\log (a+b))$
Let $a>b>0$. From $\log(a+b)=\log(a)+\log\left(1+\dfrac ba\right)$, we draw
$$\log(a)\le\log(a+b)\le \log(a)+\log(2)$$ and similarly for $b>a$.