Define a function A: N x N -> N as follows: A(m, n) ={2n, if m= 0; 0, if m≥1 and n= 0; 2, if m≥1 and n= 1; A(m-1, A(m, n-1)), if m≥1 and n≥2
(a) Calculate the following:
(i)A(1,0)
(ii)A(0,1)
(iii)A(1,1)
(iv)A(2,2).
1
Expert's answer
2020-12-15T19:44:29-0500
Consider the function A:N×N→N,
A(m,n)=⎩⎨⎧2n,m=00,m≥1 and n=02,m≥1 and n=1A(m−1,A(m,n−1)),m≥1 and n≥2
(i) Since m=1 and n=0 we use the formula A(m,n)=0, and have that A(1,0)=0
(ii) Since m=0 we use the formula A(m,n)=2n, and have that A(0,1)=2
(iii) Since m=1 and n=1 we use the formula A(m,n)=2, and have that A(1,1)=2
(iv) We use the formula A(m,n)=2 for m=2 and n=1 to conclude that A(2,1)=2.
In the following we use the formula A(m,n)=A(m−1,A(m,n−1)) to calculate A(2,2) and A(1,2), and the formula A(m,n)=2n to calculate A(0,2):
Comments