Consider the following function.
Function F(n, m:integer):integer;
begin
if (n<=0) or (m<=0) then F:=1
else
F:F(n-1, m) + F(n, m-1);
end;
Use the recurrence relation $\begin{pmatrix} n \\ k \end{pmatrix} = \begin{pmatrix} n-1 \\ k \end{pmatrix} + \begin{pmatrix} n \\ k-1 \end{pmatrix}$ to answer the following questions. Assume that $n, m$ are positive integers. Write only the answers without any explanation.
-
What is the value of $F(n, 2)$?
-
What is the value of $F(n, m)$?
-
How many recursive calls are made to the function $F$, including the original call, when evaluating $F(n, m)$.