24
$\begingroup$

I wanted to put this originally on math.stackexchange, since I considered it to be a straightforward question and probably a fairly known fact. After I failed to solve the problem, I browsed through literature and what a surprise - two books claim it is primitive recursive, one resource claims it isn't, and neither one gives proof or reference. One paper also claims that inverse Ackermann function is slower than any primitive recursive function. If it were primitive recursive, I don't see why would that hold.

Now, my questions would be: which one is right - $Ack^{-1}$ is/isn't primitive recursive, and is/isn't slower than any primitive recursive function.

If it's a bad MO question, I'll migrate it to M.SE, no problem.

$\endgroup$
1
  • 5
    $\begingroup$ Seems like a very nice question... $\endgroup$
    – Igor Rivin
    Sep 21, 2011 at 9:08

4 Answers 4

32
$\begingroup$

The inverse Ackermann function is primitive recursive.

One way to see this is to use the fact that a function $f$ is primitive recursive when and only when

  1. the graph of $f$ is primitive recursive, and
  2. $f$ is bounded above by some primitive recursive function.

The graph of the Ackermann function is primitive recursive, i.e. the characteristic function of the set $\lbrace \langle x, y, z \rangle : z = A(x,y)\rbrace$ is primitive recursive. This is because checking that $A(x,y) = z$ is easy once $x, y, z$ are given. One can always construct a table of all previous values of $A$ used to justify that $A(x,y) = z$. If $z$ is indeed the correct answer, then the code for this table is not much bigger than $\langle x, y, z\rangle$ (smaller than $17^{17^{x+y+z}}$, for example). So, given a proposed triple $\langle x, y, z \rangle$, we can search for the relevant table and determine whether or not $A(x,y) = z$ is true in a primitive recursive fashion. Of course, the Ackermann function is not bounded above by a primitive recursive function, but that is the only thing that goes wrong.

Since the graph of the Ackermann function is primitive recursive, then so is the graph of the inverse Ackermann function $Ack^{-1}(z) = \max\lbrace x : A(x,x) \leq z\rbrace$. Moreover, the growth rate of $Ack^{-1}$ is bounded by some primitive recursive function (e.g. the identity function). It follows that $Ack^{-1}$ is indeed primitive recursive.

$\endgroup$
5
  • 3
    $\begingroup$ The inverse of Ackermann function is not only primitive recursive, but also computationally easy (polynomial time), by the same argument. $\endgroup$ Sep 21, 2011 at 12:43
  • 2
    $\begingroup$ Year and a half ago I asked for a proof that graph of Ackermann function is primitive recursive (mathoverflow.net/questions/19732/ackermann-related-function), but I failed to notice that this fact leads to answer I needed in this case. Thank you! $\endgroup$ Sep 21, 2011 at 13:28
  • 1
    $\begingroup$ Just to add a little question there: $f$ is PR iff graph is PR and $f$ is bounded above by a PR. Ackermann function itself would be a nice example that condition 1. is not enough, but what would be a good example that 2. is not enough either, if we consider recursive functions (i.e. what would be a nice simple example of recursive, but not primitive recursive function bounded by a PR?). I like to remember counterexamples with theorems, that's why I'm asking this. $\endgroup$ Sep 21, 2011 at 14:50
  • 6
    $\begingroup$ The characteristic function of any recursive but not primitive recursive predicate will do, as it is bounded by constant 1. $\endgroup$ Sep 21, 2011 at 15:30
  • $\begingroup$ Exactly the same example I thought of later (it was just a problem I couldn't remember an example of such a predicate), thank you! $\endgroup$ Sep 21, 2011 at 16:41
5
$\begingroup$

Maybe the following is of interest.

There is a pointer in the literature provided by Soare's book on r.e. degrees. In an exercise one should show that the bijective primitive recursive functions do not form a group. In rough terms the hint suggests that the inverse of the Ackermann function has no prim rec inverse.

$\endgroup$
1
  • 1
    $\begingroup$ Hi Andreas! Welcome to MO! $\endgroup$ Sep 23, 2011 at 21:45
0
$\begingroup$

In this discussion

https://math.stackexchange.com/questions/31294/growth-rate-of-primitive-and-mu-recursive-functions

The last comment states that inverse Ackermann is NOT primitive recursive, but I have no idea why that's true, but maybe you can follow-up...

EDIT And these guys (a lot more trustworthy), claim the opposite:

http://ropas.snu.ac.kr/~gslee/Publi/ackermann_ramsey.pdf

$\endgroup$
5
  • $\begingroup$ Actually that answer was the resource I had in mind while writing 'one resource claims it isn't'. I wanted to bump that topic, but decided to open a new one instead. $\endgroup$ Sep 21, 2011 at 9:16
  • 1
    $\begingroup$ Why don't you just write to the guy and ask? $\endgroup$
    – Igor Rivin
    Sep 21, 2011 at 9:29
  • 1
    $\begingroup$ Good idea! typing the email right now $\endgroup$ Sep 21, 2011 at 9:32
  • 1
    $\begingroup$ Let us know what he says, it's an interesting question... $\endgroup$
    – Igor Rivin
    Sep 21, 2011 at 9:33
  • $\begingroup$ Did you ever get a response? $\endgroup$
    – LSpice
    May 22, 2020 at 17:35
0
$\begingroup$

A more intuitive answer is, primitive recursiveness is a kind of time complexity, you can compute a primitive recursive funtion in Ack(k,n) steps for some constant k, and can not compute so fast for a non-pr function.

And for inverse Ackermann function, even brute force enumeration will cost just exponential time.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.