0
$\begingroup$

Let $f: \mathbb N \times \mathbb N \to \mathbb N$ be defined by

$$f (0,y) = y\quad \& \quad f(x+1,y) = 1+f(x,y)$$

Question: The value of $f (4,4)$ is:

A. $0$

B. $4$

C. $8$

D. $12$

My guess is answer $C = 8$, but I am so confused, is there anyone could explain please? Thanks

3 Answers 3

0

$f(4,4)=1+f(3,4)=2+f(2,4)=3+f(1,4)=4+f(0,4)=4+4=8$

Note that in your definition $y$ is a 'muted' variable. So define $g(x)=f(x,0)$

You get $g(0)=0$ and $g(x+1)=1+g(x)$ so by a simple reccurence $g(x)=x$.

And $f(x,y)=f(x,0)+f(0,y)=g(x)+y=x+y$.

4

To justify your answer we write $$f(4,4)=1+f(3,4)=2+f(2,4)=3+f(1,4)=4+f(0,4)=4+4=8$$

1

$$ f(0,y)=y\implies f(0,4)=4 $$ given this $$ f(x+1,y)=f(x,y)+1\\ \implies f(1,4)=1+4=5\\ \implies f(2,4)=1+5=6\\ \implies f(3,4)=1+6=7\\ \implies f(4,4)=1+7=8\\ $$

  • 0
    f(2,4) = 1+5 = 6, where did you actually get the number 5 from?2017-02-07