John, you look so similar to the man in the picture! ]]>

You say Â«You need at least lg (n!) + O(1) bits of information to discover this number, and therefore need at least lg (n!) + O(1) comparisons to do the sortÂ».

But, for example, we can check that array is sorted in n-1 comparisons, which means that some permutations can be âdiscoveredâ in O(n) comparisons, not in O(nÂ ĂÂ lg(n)) as stated. And who knows, may be some other permutations need maximum possible nĂ(n-1)Â /Â 2 = O(n^2) comparisons to discover.

The problem come from statement Â«A binary comparison gives you one bit of informationÂ». I think that is wrong, because the amount of information the comaprison gives you depends on comparisions you done before.

]]>I am curious as to why people don’t like the ln notation; It could be my Asperger’s talking, but explicit seems better then implicit to me.

]]>But isn’t this equation true for ALL x ? Independent of whatever x may represent.

]]>However, this is not a case of an advanced source writing “log” and implicitly meaning log_10. This is what I’m claiming essentially never happens.

]]>TAOCP V1 p 23 where it’s defined, or any of the appendix B ‘Index to notations’. ]]>

Aside from Excel macros, every programming language I know of uses “log” to mean natural log. And so does every **advanced** math book I can recall.

I have occasionally seen ln for natural log; I saw it a couple weeks ago in an article written for an undergraduate audience. But I have never seen a math article that writes “log” and assumes the reader knows that the author intends this to mean log_10. On the other hand, I often see things like “log(1 + x) ≈ x for small x” which implies natural logs.

Numerous people have commented that they learned to use “log” for log_10, that’s it’s common in their country or profession, etc. But nobody has cited an advanced math source that makes this implicit assumption.

]]>Growing up in the South in the U.S., we used “ln” for base-e, and “log” for either base 10 or base 2. This appears to be pretty common. I have worked with people all over the world since then, and I haven’t run into any trouble or confusion with these conventions.

It’s true that this approach means that “log” is ambiguous. In this case that’s a good thing. It means that each author can pick the convention that works best for what they are working on, rather than people using the “wrong” convention having to noise up their formulas with a bunch of constants.

]]>Yes I think the debate here is really about national conventions, I’m also a PhD, also from the Ecole Normale SupĂ©rieure in Paris (I remind you that Americans are still measuring sticks with inches…) and in France we actually consider poor education to use `log` without subscript (as the log without base is only defined up to a constant, as it was remarked), and we will always use `ln` to denote the natural logarithm.

]]>In the interest of consistency (“use what makes the most sense”) then you should define Pi as 3.283….

It fits much more naturally into the world of logs of e and radian measurement.

]]>I guess national specifics does have a role. E.g. in former USSR countries:

log is for any base

lg is for base 10

ln is for base e

On my scentific calculator (made in China, obviously), there are separate buttons which are marked as follows:

log_a so that one could specify any base,

log for base 10

ln for base e

The Wikipedia article about the decadic logarithm says this:

On calculators it is usually “log”, but mathematicians usually mean natural logarithm rather than common logarithm when they write “log”. To mitigate this ambiguity the ISO specification is that log_10(x) should be lg (x) and log_e(x) should be ln (x).

I admit I don’t do math daily but I would stick with these standards so as not to complicate things.

]]>Actually, g, the number of comparisons required to sort n items using only binary comparisons is n lg n plus low order terms, not n ln n.

This follows from basic information theory. You are trying to “discover” a number between 1 and n!. A binary comparison gives you one bit of information. You need at least lg (n!) + O(1) bits of information to discover this number, and therefore need at least lg (n!) + O(1) comparisons to do the sort.

It’s then a matter of using Stirling’s approximation or something similar to get this in whatever form you need:

lg (n!) + O(1) = n lg n + O(n) = (1 + o(1)) n lg n

]]>Elementary math books often use log as you say, in English speaking countries and around the world. But I have never seen a mathematics journal article, for example, that writes “log” and implicitly means “log_10”.

]]>As far as I know your statement “(log log base 10) is the UNIVERSAL convention in advanced mathematics.” is true only if the UNIVERSAL is equivalent to “english speaking world”.

]]>