Recursive function with two variables

624 Views Asked by At

How should I find an explicit solution for the following function: $$f(n,m)=a \, f(n-1,m+1)+b \, f(n-1,m)+c \, f(n-1,m-1)$$ where $f(1,0)=a+b$ and $f(1,1)=c$ for $n\geq 1$, $m\geq 0$. Also $f(n,-1)=0$ for all $n$ and $f(n,m)=0$ for $m\geq n$.

It looks like Pascal triangle with three terms. This recursive function is cumulative number of customers who are waiting in an appointment system with probability of no-show.