In the theory of computation, the Sudan function is an example of a function that is recursive, but not primitive recursive. This is also true of the better-known Ackermann function. In 1926, David Hilbert conjectured that every computable function was primitive recursive. This was refuted by Gabriel Sudan and Wilhelm Ackermann — both his students — using different functions that were published in quick succession: Sudan in 1927, Ackermann in 1928. The Sudan function is the earliest published example of a recursive function that is not primitive recursive.
Definition F0(x,y)=x+yFn+1(x,0)=xif n≥0Fn+1(x,y+1)=Fn(Fn+1(x,y),Fn+1(x,y)+y+1)if n≥0 The last equation can be equivalently written as Fn+1(x,y+1)=Fn(Fn+1(x,y),F0(Fn+1(x,y),y+1)).
Computation These equations can be used as rules of a term rewriting system (TRS). The generalized function F(x,y,n)=defFn(x,y) leads to the rewrite rules
(r1)F(x,y,0)→x+y(r2)F(x,0,n+1)→x(r3)F(x,y+1,n+1)→F(F(x,y,n+1),F(F(x,y,n+1),y+1,0),n) At each reduction step the rightmost innermost occurrence of F is rewritten, by application of one of the rules (r1) - (r3). Calude (1988) gives an example: compute F(2,2,1)→∗12. The reduction sequence is
Value tables
Values of F0 F0(x, y) = x + y
Values of F1 F1(x, y) = 2y · (x + 2) − y − 2
Values of F2
Values of F3
Notes and references
Bibliography
External links Rosetta Code (23 July 2024). "Sudan function". OEIS: A260003, A260004