From: Martin Mares Date: Tue, 8 Apr 2008 09:53:15 +0000 (+0200) Subject: Ackermann's function. X-Git-Tag: printed~117 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ffcd7010392972b549a380f0a315e843e6f0dd1f;p=saga.git Ackermann's function. --- diff --git a/PLAN b/PLAN index 174f3a6..8fc44e1 100644 --- a/PLAN +++ b/PLAN @@ -97,7 +97,8 @@ Notation: - introduce \widehat\O early - unify { x ; ... }, { x | ...} and { x : ... } - capitalize Pointer Machine -- define \alpha(m,n) +- Ackermann: which of the Tarjan's set union papers should we cite? +- Ackermann function vs. Ackermann's function Varia: diff --git a/biblio.bib b/biblio.bib index cef5f70..d0b9784 100644 --- a/biblio.bib +++ b/biblio.bib @@ -1261,3 +1261,25 @@ pages={743--750}, year={2002} } + +@article{ ackermann:function, + title={{Zum Hilbertschen Aufbau der reellen Zahlen}}, + author={Ackermann, W.}, + journal={Mathematische Annalen}, + volume={99}, + number={1}, + pages={118--133}, + year={1928}, + publisher={Springer}, + notes={In German} +} + +@article{ klazar:gdss, + title={{Generalized Davenport--Schinzel Sequences: Results, problems, and applications}}, + author={Klazar, M.}, + journal={INTEGERS: The Electronic Journal of Combinatorial Number Theory}, + volume={2}, + number={A11}, + pages={2}, + year={2002} +} diff --git a/macros.tex b/macros.tex index cc1a0e9..b350a78 100644 --- a/macros.tex +++ b/macros.tex @@ -46,7 +46,7 @@ \def\deg{\mathop{\rm deg}} \def\timesalpha{\mskip2mu\alpha} \def\timesbeta{\mskip2mu\beta} -\def\tower{\mathop\uparrow} +\def\tower{\mathbin\uparrow} \def\Forb{{\rm Forb}} \def\minorof{\preccurlyeq} \def\per{\mathop{\rm per}} diff --git a/mst.tex b/mst.tex index 591d70c..5fef32f 100644 --- a/mst.tex +++ b/mst.tex @@ -494,7 +494,7 @@ with surprising efficiency: \thmn{Disjoint Set Union, Tarjan and van Leeuwen \cite{tarjan:setunion}}% Starting with a~trivial equivalence with single-element classes, a~sequence of operations comprising of $n$~\s intermixed with $m\ge n$~\s can be processed in time -$\O(m\timesalpha(m,n))$, where $\alpha(m,n)$ is the inverse Ackermann function.\foot{See Section \ref{ackersec} for a~precise definition.} +$\O(m\timesalpha(m,n))$, where $\alpha(m,n)$ is the inverse Ackermann's function.\foot{See Section \ref{ackersec} for a~precise definition.} \proof See \cite{tarjan:setunion}. diff --git a/notation.tex b/notation.tex index caaf93e..b63e595 100644 --- a/notation.tex +++ b/notation.tex @@ -142,6 +142,62 @@ where $U^*$ is the complete graph on~$U$. Similarly for $G.F$ and $G.U$. %-------------------------------------------------------------------------------- -\section{Ackermann function and its inverse}\id{ackersec}% +\section{Ackermann's function and its inverse}\id{ackersec}% + +The Ackermann's function is an~extremely quickly growing function that has been +originally introduced by Ackermann \cite{ackermann:function} in the context of +computability theory. Its original purpose was to demonstrate that a~function +can be recursive, but not primitive recursive. At the first sight, it does not +seem related to efficient algorithms at all. Its inverse however occurs in +analysis of various algorithms and mathematical structures surprisingly often: +We meet it in Section \ref{classalg} in the time complexity of the Disjoint Set Union +data structure and also in the best known upper bound on the decision tree +complexity of minimum spanning trees in Section \ref{optalgsect}. Another +important application is the complexity of Davenport-Schinzel sequences (see +Klazar's survey \cite{klazar:gdss}), but as far as we know, it is not otherwise +related to the topic of our study. + +Various sources tend to differ in the exact definition of both the Ackermann's +function and its inverse, but most of the definitions differ in factors that +are negligible when compared with the asymptotic growth of the function. +We will use the definition by double induction given by Tarjan \cite{tarjan:setunion}, +which are predominant in the literature on graph algorithms: + +\defn +The \df{Ackermann's function} $A(x,y)$ is a~function on non-negative integers defined by: +$$\eqalign{ +A(0,y) &:= 2y, \cr +A(x,0) &:= 0, \cr +A(x,1) &:= 2 \quad \hbox{for $x\ge 1$}, \cr +A(x,y) &:= A(x-1, A(x,y-1)) \quad \hbox{for $x\ge 1$, $y\ge 2$}. \cr +}$$ +Sometimes, a~single-parameter version of this function is also used. It is defined +as the diagonal of the previous function, i.e., $A(n):=A(n,n)$. + +\example +We can try evaluating $A(x,y)$ in some points: +$$\eqalign{ +A(x,2) &= A(x-1, A(x,1)) = A(x-1,2) = A(0,2) = 4, \cr +A(1,y) &= A(0, A(1,y-1)) = 2A(1,y-1) = 2^{y-1}A(1,1) = 2^y, \cr +A(2,y) &= A(1, A(2,y-1)) = 2^{A(2,y-1)} = 2\tower y. \cr +A(3,y) &= \hbox{the tower function iterated $y$~times \dots} \cr +A(4,3) &= A(3,A(4,2)) = A(3,4) = A(2,A(3,3)) = A(2,A(2,A(3,2))) = \cr + &= A(2,A(2,4)) = 2\tower(2\tower 4) = 2\tower 65536. \cr +}$$ + +\defn +The \df{Inverse Ackermann's function} $\alpha(x,y)$ is defined by: +$$ +\alpha(x,n) := \min\{ y \mid A(x,y) > \log n \}. +$$ +Again, a~single-parameter version is occasionally considered: +$$ +\alpha(n) = \min\{ x \mid A(x,x) > \log n \}. +$$ + +\example +$\alpha(1,n) = \O(\log\log n)$, $\alpha(2,n) = \O(\log^* n)$, $\alpha(3,n)$ grows even slower. + +\FIXME{Relationship between single- and double-parameter versions.} \endpart