in Algorithms
619 views
3 votes
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);
}

Compute $A(2, 2, 3)$ and $A(2, 3, 3)$.

in Algorithms
619 views

2 Answers

0 votes
0 votes
0 votes
0 votes

Answer:

Related questions