The Gateway to Computer Science Excellence
+1 vote
19 views

For non-negative integers $m$, $n$ define a function as follows

$$f(m,n) = \begin{cases} n+1 & \text{ if } m=0 \\ f(m-1, 1) & \text{ if } m \neq 0, n=0 \\ f(m-1, f(m,n-1))  & \text{ if }  m \neq 0, n \neq 0 \end{cases}$$ Then the value of $f(1,1)$ is

  1. $4$
  2. $3$
  3. $2$
  4. $1$
in Calculus by Veteran (432k points)
recategorized by | 19 views

1 Answer

0 votes
f(1,1)=f(0,f(1,0))   since m$\neq$0,n$\neq$0

=f(0,f(0,1))           since m$\neq$0,$n=0$

=f(0,2)                 since m$=$0

=3                       since m$=$0
by Active (4.6k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,394 answers
198,594 comments
105,446 users