The Gateway to Computer Science Excellence

+3 votes

Consider the code below, defining the function $A$:

A(m, n, p) { if (p == 0) return m+n; else if (n == 0 && p == 1) return 0; else if (n == 0 && p == 2) return 1; else if (n == 0) return m; else return A(m, A(m,n-1,p), p-1); }

Express $A(m, n, 1)$ as a function of $m$ and $n$.

52,315 questions

60,426 answers

201,749 comments

95,226 users