Professional Documents
Culture Documents
mi mid 22
mi mid 22
mi mid 22
1 Ackerman’s number, used in mathematical logic, can be calculated using the formula 10
shown below. Write a recursive algorithm that calculates Ackerman’s number. Verify Marks
your algorithm by using it to manually calculate the following test cases:
a. Ackerman(2, 4),
b. Ackerman(3, 7),
c. Ackerman(0, 4), and
d. Ackerman(5, 0).
2 What would be the value of queues Q1 and Q2, and stack S after the following algorithm 10
segment: Marks
Page 1 of 2
Page 2 of 2