0

So I have this definition: $T(n,k) = \sum_{i=0}^{k} T(n-1, k-i) $. Is there any way to get its closed form? I have tried looking for a pattern but I get really complicated sums.

Edit: Initial condition is $T(2,k)= k+1.$ For any positive integer $k$.

eipim1
  • 123

1 Answers1

2

Notice that $T(n,k)=\sum_{i=0}^k T(n-1,k-i)$ is the same as $T(n,k)=\sum_{i=0}^k T(n-1,i)$

Using the recursive definition:

$$T(3,k)=T(2,0)+T(2,1)+\dots+T(2,k)=1+2+\dots+(k+1)=\frac{(k+1)(k+2)}2\\ T(4,k)=T(3,0)+T(3,1)+\dots+T(3,k)=\sum_{i=0}^k\frac{(i+1)(i+2)}2=\frac{(k+1)(k+2)(k+3)}6\\\vdots$$


By induction on $n$, you can show that $$T(n,k)=\dfrac{(k+1)(k+2)\cdots (k+(n-1))}{(n-1)!}=\dbinom{k+n-1}{n-1}$$


Proof sketch:

Show that the base case holds ($n=2$ by the given initial condition)

Assume the inductive hypothesis, ie, $T(n,k)=\dbinom{k+n-1}{n-1}$

Now, for the inductive step, note that,

$$\begin{align}T(n+1,k)\overset{(\#)}{=}\sum_{i=0}^k T(n,i)=\sum_{i=0}^k\binom{n-1+i}{n-1}&\overset{(\ast)}{=}\binom{(n-1)+(k+1)}n \\&=\binom{n+k}n\\&=\binom{k+(n+1)-1}{(n+1)-1}\end{align}$$

where the step $(\#)$ is using the given recurrence relation and the step $(\ast)$ follows by the hockey-stick identity.