(a) The answer is f(3,2005)=22008−3.
We first label the equations as follows:
f(0,y)=y+1,(1)
f(x+1,0)=f(x,1),(2)
f(x+1,y+1)=f(x,f(x+1,y)).(3)
By putting y=1 in (1), we get f(0,1)=2. By putting x=0 in (2), we get f(1,0)=f(0,1)=2.
Using (3) and (1), we find that
f(1,y)=f(0,f(1,y−1))=f(1,y−1)+1.
By induction, one easily obtains
f(1,y)=f(1,0)+y=y+2.
Similarly, we have
f(2,y)=f(1,f(2,y−1))=f(2,y−1)+2.
By induction, we obtain
f(2,y)=f(2,0)+2y=f(1,1)+2y=2y+3.
Next, we have
f(3,y)=f(2,f(3,y−1))=2f(3,y−1)+3.
Adding
f(3,y)2f(3,y−1)22f(3,y−2)2y−1f(3,1)=2f(3,y−1)+3,=22f(3,y−2)+2⋅3,=23f(3,y−3)+22⋅3,⋮,=2yf(3,0)+2y−1⋅3,
we obtain
f(3,y)=2yf(3,0)+3(1+2+22+⋯+2y−1)=2yf(2,1)+3(2y−1)=2y+3−3.
In particular, we have f(3,2005)=22008−3.
(b) The answer is f(4,2005)=g(2008)−3, where g(n) is defined by g(1)=2 and g(n+1)=2g(n) for any n∈Z+.
We prove by induction that f(4,y)=g(y+3)−3. Firstly, by (2), we have
f(4,0)=f(3,1)=24−3=222−3=g(3)−3.
This proves the base case.
Assume f(4,y)=g(y+3)−3 for some y∈Z+. Using (3), we find that
f(4,y+1)=f(3,f(4,y))=2f(4,y)+3−3=2g(y+3)−3=g(y+4)−3.
This proves the inductive step.
Therefore, we have f(4,2005)=g(2008)−3.