1

I'm currently stuck on the following problem: Given $c,n,k\in \mathbb{N}_0$, what is the amount of tupels $(a_1, \dots, a_n) \in \{0, \dots, c\}^n$ such that $\sum_{i=1}^{n} a_i = k$? More precisely, what is $$ z(n,c,k) := \left|\left\{(a_1, \dots, a_n) \in \{0, \dots, c\}^n \mid \sum_{i=1}^{n} a_i = k\right\}\right| $$

Now, the case $c\leq 1$ is easy: $$ z(n,0,k) = \begin{cases} 1 & \text{ if $n=0$ or k=0}\\ 0 & \text{ else}\end{cases} $$ and $$ z(n,1,k) = \binom{n}{k} $$ Also, if $c\geq k$ there is a rather easy solution: $$ \begin{eqnarray} &z(n,c,k) &\\ & = & \left|\left\{(a_1, \dots, a_n) \in \{0, \dots, c\}^n \mid \sum_{i=1}^{n} a_i = k\right\}\right|\\ & = & \left|\left\{(a_1, \dots, a_n) \in \mathbb{N}_0^n \mid \sum_{i=1}^{n} a_i = k\right\}\right|\\ & = & \binom{n+k-1}{k} \end{eqnarray} $$ since for every $(a_1, \dots, a_n) \in \mathbb{N}_0^n$ with $\sum_{i=1}^{n} a_i = k$ we must also have $a_i \leq k \leq c$ for all $i$.

But I'm having difficulties finding a nice formula for the remainig case $1<c<k$. Here are some ideas:

  • By the above, we know that $$\binom{n}{k} \leq z(n,c,k) \leq \binom{n+k-1}{k}$$
  • We also know that $$ z(n,c,k) = \sum_{a=0}^c z(n-1,c,k-a) $$ by partitioning the set by possible values of $a_1$.
Jakob W.
  • 860

0 Answers0