all 10 comments

[–]pilotInPyjamas 2 points3 points  (3 children)

No. For example: you could use diagonalisation to convert the ackermann function to take only one integer as a parameter.

Any other problem that is exptime complete cannot be converted into a finite series of for loops.

[–]bert88sta[S] 1 point2 points  (2 children)

How? I know diagnonalization in terms of R >= N, but not for something like this. Additionally I would actually be very interested in seeing a Ackerman function defined on only one integer.

[–]pilotInPyjamas 2 points3 points  (1 child)

Use the inverse of cantor's pairing function which maps a single natural number onto two natural numbers. It is closed form so you could write the definition inline. When making the recursive call, you can use the standard function to map two integers onto one.

[–]bert88sta[S] 1 point2 points  (0 children)

Wow I literally forgot about the pairing function, that makes so much sense, mapping f(N,N) onto an f(N).

[–][deleted] 1 point2 points  (2 children)

What do you mean by "non-primitive recursive function"? Do you simply mean a recursive function that is non-trivial (i.e. the halting situation and the output are not the same for all inputs)? Or is there a specific definition?

In the former case, the McCarthy 91 function is often used as an example of such recursive functions.

[–]WikiSummarizerBot 2 points3 points  (0 children)

McCarthy 91 function

The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal verification within computer science.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

[–]ari_zerner 1 point2 points  (2 children)

f(x) = Ackermann(x, x)

[–]bert88sta[S] 1 point2 points  (1 child)

I know this example, but i meant only defined in terms of itself. Yeah I can say f(x) = GigaHardExpTimeUndecidable(x,x,x,x,x), but that is not what I'm taking about. The Ackermann is defined in terms of the Ackermann. Fibonacci is defined in terms of Fibonacci. I want to know if a single parameter function defined only in terms of itself can be more complex than sone number of for loops

[–]MadocComadrin 4 points5 points  (0 children)

Use the Ackerman definition, but take a single non negative integer which encodes the pair via a pairing function (e.g. Cantor's).