The following program computes a well-known function called Ackermann’s function. Note: If you try out this function, don’t let x and y get too large.
f (x, y) = if x = 0 then y + 1
else if y = 0 then f (x − 1, 1)
else f (x − 1, f (x, y − 1)) .
Prove that f is defined for all pairs (x, y) in
Hint: Use the lexicographic ordering on
This gives the single basis element (0, 0). For the induction assumption, assume that
such that
Then show that f (x, y) is defined.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.