Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site uiucdcsb.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcsb!grunwald From: grunwald@uiucdcsb.UUCP Newsgroups: net.math Subject: Re: Beyond Exponentiation Message-ID: <9700033@uiucdcsb.UUCP> Date: Mon, 4-Feb-85 18:46:00 EST Article-I.D.: uiucdcsb.9700033 Posted: Mon Feb 4 18:46:00 1985 Date-Received: Wed, 6-Feb-85 04:15:27 EST References: <186@ihnet.UUCP> Lines: 25 Nf-ID: #R:ihnet:-18600:uiucdcsb:9700033:000:377 Nf-From: uiucdcsb!grunwald Feb 4 17:46:00 1985 You can define ackermanns function as: S[1] := m; S[2] := n; i := 2; while (i != 1) do if (S[i-1] == 0) { S[i-1] := S[i] + 1; i := i -1; } else if ( S[i] == 0 ) { S[i-1] := S[i-1] - 1; S[i] := 1; } else { S[i+1] := S[i] - 1; S[i] := S[i+1]; S[i-1] := S[i-1] - 1; i := i + 1; } } z := S[1]; As in "Mathematical Theory of Computation" by Manna, Page 235.