1
$\begingroup$

If so, then $O(log_2 n)$ = $O(log_{10} n)$ = $O(log_e n)$. It is very wired that computer scientist treat them equally.

Considering,

$(log_2 n)$ = $m$, meaning $n$ = $2^m$

$(log_{10} n)$ = $m$, meaning $n$ = ${10}^m$

$(log_e n)$ = $m$, meaning $n$ = $e^m$

So, does it mean that $O(2^m)$ = $O({10}^m)$ = $O(e^m)$

Is, base treated to have $O(1)$ time complexity, hence neglected?

NOTE: I want to understand in terms of computer science and not in terms of mathematics.

How does it explain the computer science part? Mathematician will explicitly mention $log_e$, but when we talk in terms of CS (time complexity) it doesn't matter, why? I have put a note also. Duplicated answer proved mathematical explanation.

$\endgroup$
5
  • $\begingroup$ Consider this: $log_bn = log_an / log_ab$ for any positive value of $a \neq 1$. $\endgroup$ – Marcelo Fornet Jan 15 '18 at 18:39
  • $\begingroup$ @D.W. How does it explain the computer science part? Mathematically it is can be proved. For an example, Mathematician will explicitly mention $log_e$, but when we talk in terms of CS (time complexity) it doesn't matter, why? I have put a note also. Duplicated answer proved mathematics explanation. $\endgroup$ – Umang.B Jan 15 '18 at 18:44
  • $\begingroup$ Big-O notation is mathematics. We use mathematics in computer science. That is the explanation. I'm not sure what you are expecting, what a "computer science explanation" means to you, why you reject the existing answer, or why you think a "computer science explanation" exists that isn't about the math. $\endgroup$ – D.W. Jan 15 '18 at 18:51
  • $\begingroup$ There isn't really a "computer science part". The answer to the other question explains why $O(\log_b n)$ describes the same class of functions regardless what $b>1$ you choose. $\endgroup$ – David Richerby Jan 16 '18 at 13:35
  • $\begingroup$ @DavidRicherby yep! thanks once again! $\endgroup$ – Umang.B Jan 16 '18 at 14:36