Page 1 of 1

Question 1 (25 pts): Ackermann's Function is a recursive mathematical algorithm that can be used to test how well a syst

Posted: Fri Jun 10, 2022 11:56 am
by correctanswer
Question 1 25 Pts Ackermann S Function Is A Recursive Mathematical Algorithm That Can Be Used To Test How Well A Syst 1
Question 1 25 Pts Ackermann S Function Is A Recursive Mathematical Algorithm That Can Be Used To Test How Well A Syst 1 (132.73 KiB) Viewed 71 times
language python
Question 1 (25 pts): Ackermann's Function is a recursive mathematical algorithm that can be used to test how well a system optimizes its performance of recursion. Design a function ackermann(m,n) which solves Ackermann's Function. Use the following logic in your function: If m=0 then return n+1 If n = 0 then return ackermann(m - 1, 1) Otherwise, return ackermann(m - 1, ackermann(m, n-1)) Once you've designed your function, test it by calling it with small values for m and n. (For instance: ackermann (0, 3), ackermann (2, 0), ackermann(2, 3)) Then, your program should display these values as follows, with respect to the input values of the function above: 4 3 9