0

Let $\ell$ and $m$ be positive integers and denote $\mathbb S\equiv\{0,1,\ldots,m\}$. Fix an integer $s\in\{0,1,\ldots,\ell m\}$. My question is:

What is the number of ways in which $s$ can be expressed as a sum of $\ell$ (not necessarily distinct) elements of $\mathbb S$?

That is, I am interested in computing the cardinality of the set $$\left\{(s_1,\ldots,s_{\ell})\in\mathbb S^{\ell}\,\middle|\,s_1+\cdots+s_{\ell}=s\right\},$$ where the order matters. (For example, if $\ell=2$, $m\geq 2$, and $s=2$, then $0+2$, $2+0$, and $1+1$ all count as different representations of $2$.)

Let $C_{\ell}$ denote the number of ways in question (while treating $m$ and $s$ fixed). It is easy to see that $C_1=1$, and I managed to compute that \begin{align*} C_2= \begin{cases} s+1&\text{if $0\leq s\leq m$,}\\ 2m-s+1&\text{if $m+1\leq s\leq 2m$.} \end{cases} \end{align*} Based on this preliminary exploration, I expect values of $C_{\ell}$ to get complicated for $\ell\geq 3$, for which reason I am diffident about experimenting with conjectures for induction.

The problem looks somewhat similar to this one and there is a neat formula that can be obtained for that problem that is easy to prove by induction, but there are no upper bounds imposed on the summands there. With that being said, the present problem, too, might be a standard one in combinatorics, so even a good reference would be appreciated.


UPDATE: As Mike Earnest kindly pointed out in a comment that was deleted later, this problem has been conclusively solved in this other thread. The formula reported in Mike’s answer in that thread works with the following substitutions: \begin{align*} n&=\ell,\\ t&=s+\ell,\\ d&=m+1. \end{align*}

Bill Dubuque
  • 282,220
triple_sec
  • 23,935

0 Answers0