- Iterated logarithm
In
computer science , the iterated logarithm of "n", written log*"n" (usually read "log star"), is the number of times thelogarithm function must be iteratively applied before the result is less than or equal to 1. The simplest formal definition is the result of this recursive function::
or, in
pseudocode :function iterLog("real" n) if n ≤ 1 return 0 else return 1 + iterLog(log(n))
or, in iterative pseudocode:
function iterLog("real" n) i = 0 while n > 1 n = log(n) i = i + 1 return i
or, on the positive real numbers, the continuous
super-logarithm (an inverse function oftetration ) definition is equivalent::but on the negative real numbers, log-star is 0, whereas for positive "x", so the two functions differ for negative arguments.In computer science, lg* is often used to indicate the binary iterated logarithm, which iterates the
binary logarithm instead. The iterated logarithm accepts any positivereal number and yields aninteger . Graphically, it can be understood as the number of "zig-zags" needed in Figure 1 to reach the interval [0, 1] on the "x"-axis.Mathematically, the iterated logarithm is well-defined not only for base 2 and base "e", but for any base greater than .
The iterated logarithm is closely related to the generalized logarithm function used in
symmetric level-index arithmetic . It is also proportional to the additivepersistence of a number , the number of times one must replace the number by the sum of its digits before reaching itsdigital root .Analysis of algorithms
The iterated logarithm is useful in
analysis of algorithms andcomputational complexity , appearing in the time and space complexity bounds of some algorithms such as:
* Finding theDelaunay triangulation of a set of points knowing theEuclidean minimum spanning tree : randomized O("n" log*"n") time, Olivier Devillers
* Fürer's algorithm for integer multiplication: O("n" log "n" 2lg* "n")
* Finding an approximate maximum (element at least as large as the median): lg* "n" − 4 to lg* "n" + 2 parallel operations [Noga Alon and Yossi Azar, "Finding an Approximate Maximum". "SIAM Journal of Computing" 18:2 (1989), pp. 258–267.]The iterated logarithm is an extremely slowly-growing function, much more slowly than the logarithm itself; for all practical values of "n" (less or equal than 265536, which is far more than the number of particles in the universe), even the iterated logarithm to the base 2 is less or equal than 5.
Higher bases give smaller iterated logarithms. Indeed, the only function used in complexity theory that grows more slowly is the inverse of the
Ackermann function .References
*Introduction to Algorithms|2|chapter=3.2: Standard notations and common functions|pages=pp. 55–56
Wikimedia Foundation. 2010.