HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Are $\log_{10}(x)$ and $\log_2(x)$ in the same big-O class of functions?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
samethearelog_log_2bigandfunctionsclass

Problem

Are $\log_{10}(x)$ and $\log_{2}(x)$ in the same big-O class of functions? In other words, can one say that $\log_{10}(x)=O(\log x)$ and $\log_{2}(x)=O(\log x)$?

Solution

Why?

$2^{\log_2 x} = x$

$\log_{10}(2^{\log_2 x}) = \log_{10} x$

$\log_2 x(\log_{10}2) = \log_{10} x$ $(*)$

$\log_2 x = \dfrac{\log_{10} x}{\log_{10}2}$

QED.

$() \log x^y = y\log x$

Context

StackExchange Computer Science Q#4968, answer score: 2

Revisions (0)

No revisions yet.