Ackermann-related function - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-24T08:44:23Z http://mathoverflow.net/feeds/question/19732 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/19732/ackermann-related-function Ackermann-related function Harun Šiljak 2010-03-29T15:11:58Z 2010-03-29T22:19:14Z <p>While doing some research, I came up with a problem of proving that </p> <p>$f(a,b,c)=\begin{cases}1 &amp;\text{ if }A(a,b)=c\ \\ 0 &amp;\text{ otherwise }\end{cases}$</p> <p>is primitively recursive ($A$ is the Ackermann's function).</p> <p>Any references, ideas or proofs?</p> <p>(This may not be a good MO question, but since the participants in problem-solving sites listed in MO posting FAQ failed to solve it - I posted it there before - I was hoping for a solution here.)</p> http://mathoverflow.net/questions/19732/ackermann-related-function/19736#19736 Answer by Ulrik Buchholtz for Ackermann-related function Ulrik Buchholtz 2010-03-29T15:38:28Z 2010-03-29T15:38:28Z <p>Googling for "graph of the Ackermann function" gives <a href="http://www.cse.yorku.ca/~gt/papers/Ackermann-function.pdf" rel="nofollow">this note</a> by George Tourlakis, which proves both that the Ackermann function is not primitive recursive, and, at the end, that the graph is.</p> http://mathoverflow.net/questions/19732/ackermann-related-function/19742#19742 Answer by Reid Barton for Ackermann-related function Reid Barton 2010-03-29T17:26:59Z 2010-03-29T17:26:59Z <p>Here's a sketch of an argument which I expect could be made into a proof.</p> <p>The key fact is that the Ackermann function fails to be primitive recursive only because it grows so quickly. More formally:</p> <p><strong>Claim</strong>. There exists a Turing machine T and a primitive recursive function f(a, b, c) (which is an increasing function of c) such that on input (a, b), T computes A(a, b) in at most f(a, b, A(a, b)) steps.</p> <p>"Proof". Starting with the expression "A(a, b)", repeatedly expand terms of the form A(x, y) with the recursive definition, but do not simplify any of the resulting additions. The length of the string increases at every step, if we agree that the symbol "+" is "longer" than "A". The resulting string is a formal sum of positive integers, so its length is bounded by (a multiple of) A(a, b); hence the number of steps is also bounded above in terms of A(a, b), and we may perform each step in time polynomial in A(a, b).</p> <p>Now, we can simulate a given Turing machine for a fixed number of steps using a primitive recursive function. We may therefore compute the graph of the Ackermann function with a primitive recursive function as follows: Given a, b, c,</p> <ul> <li>Compute f(a, b, c).</li> <li>Simulate the Turing machine T on input (a, b) for f(a, b, c) steps.</li> <li>If T has halted, then return whether c is equal to the output of T. If T has not halted, then c &lt; A(a, b) so return false.</li> </ul> http://mathoverflow.net/questions/19732/ackermann-related-function/19743#19743 Answer by François G. Dorais for Ackermann-related function François G. Dorais 2010-03-29T17:33:23Z 2010-03-29T22:19:14Z <p>The key to do this is to realize the difference between <em>computation</em> and <em>verification</em>. Although computing value A(a,b) of the Ackermann function cannot be done primitive recursively, verifying whether a proposed number c is the correct value of A(a,b) can be done primitive recursively. (Note that computation and verification is also what distinguishes P and NP.)</p> <p>In this case, the fact that this can be done hinges on the strong monotonicity properties of Ackermann's function. Indeed, if A(a,b) = c then all the previous values of A needed to compute A(a,b) are bounded by c. Therefore, the search for a valid computation verifying that A(a,b) = c can be bounded by a primitive recursive function B(a,b,c). Knowing this function B we can take a proposed value c for A(a,b), compute the bound B(a,b,c) and search up to this bound for a valid computation verifying that c is indeed equal to A(a,b). If no such computation is found we return 1, otherwise we return 0.</p> <p>To make this a little more specific, let's say that computation for A(a,b) = c is a (coded) finite sequence of triples (a<sub>i</sub>,b<sub>i</sub>,c<sub>i</sub>) which ends with the triple (a,b,c). Each such triple codes the fact that A(a<sub>i</sub>,b<sub>i</sub>) = c<sub>i</sub>. The computation is <em>valid</em> when each such triple follows from previous triples and the rules for computing the Ackermann function. (Checking this is obviously primitive recursive.) For example a valid computation for A(1,1) = 3 is the sequence (0,1,2), (0,2,3), (1,0,2), (1,1,3). </p> <p>Using the rules for computing Ackermann function and our specific method for coding finite sequences, we can compute an explicit bound B(a,b,c) on a valid computation verifying A(a,b) = c. The verification that B is primitive recursive should be straightforward if our coding of finite sequences is reasonable. Therefore, verifying A(a,b) = c can be done by a primitive recursive computation.</p> <p>(The details of the last paragraph are best carried out in the privacy of one's office.)</p>