2
$\begingroup$

A previous question asked how we can calculate the number of positive integer solutions to $x_1 + x_2 + \dots + x_k = n$ where $x_i \leq r.$ The aforementioned question thread gave an answer as

$$\sum^{k}_{t = 0}(-1)^t{{k}\choose{t}}{{n - t(r + 1) + k - 1}\choose{k - 1}}$$

but I was wondering if anybody knew how to calculate a closed form of this sum. I had some difficulty using techniques such as Snake Oil because of the $t(r + 1)$ term in the second binomial coefficient so I wanted to see if anybody else has tried to do this.

$\endgroup$
2
  • $\begingroup$ "Snake Oil?" Please elaborate, that terminology is unknown to me. $\endgroup$
    – Math1000
    Commented Feb 15, 2020 at 22:37
  • 1
    $\begingroup$ It's a method of evaluating sums of binomial coefficients that involves expressing partial sums as coefficients of a generating function and then manipulating the resulting double sum carefully. This method is described in detail in Wilf's "Generatingfunctionology." $\endgroup$ Commented Feb 16, 2020 at 2:56

1 Answer 1

3
$\begingroup$

Unfortunately, no, it does not have a simpler form. I have been dealing with it for a long time and didn't find anything better in the specialized literature. However, for large $n$ it converges quickly to a Gaussian.
In any case I suggest (as in the answer to the other post you cited) to write it in this alternative way: $$ N_b (s,r,m)\quad \left| {\;0 \leqslant \text{integers }s,m,r} \right.\quad = \sum\limits_{\left( {0\, \leqslant } \right)\,\,k\,\,\left( { \leqslant \,\frac{s}{r+1}\, \leqslant \,m} \right)} {\left( { - 1} \right)^k \binom{m}{k} \binom { s + m - 1 - k\left( {r + 1} \right) } { s - k\left( {r + 1} \right)}\ } $$ (where $s$ is your $n$ and $m$ your $k$)
because:
- in the way you wrote it, with the upper bound to $m$ you get false results (actually you get $0$ because of taking $\Delta ^m$ of a polynomial of degree $m-1$) ;
- the upper bound shall be $s/(r+1)$, which is less than $m$;
- the form suggested above allows to omit the bounds, being implicit in the binomials, and thereby easing the algebraic manipulation.

-- addendum --

I take the chance of your comment to briefly summarize some features of the formula above.

There are alternative formulations, but in fact not simpler, such as $$ \eqalign{ & N_b (s,r,m) = \cr & = \sum\limits_k {\left( { - 1} \right)^{\;\left\lfloor {{k \over {r + 1}}} \right\rfloor } \; \left( \matrix{ m - 1 \cr \left\lfloor {{k \over {r + 1}}} \right\rfloor \cr} \right) \left( \matrix{ s + m - 2 - k \cr s - k \cr} \right)} = \cr & = \sum\limits_{j,\,k} {\left( { - 1} \right)^{j + k} \left( \matrix{ m \cr j \cr} \right)\left( \matrix{ j(r + 1) \cr k \cr} \right) \left( \matrix{ s - k + m - 1 \cr s \cr} \right)} = \cr & = \left( {1 - E_{\,s} ^{\, - (r + 1)} } \right)^{\,m} \left( \matrix{ s + m - 1 \cr s \cr} \right)\quad \left| {\;E_{\,s} f(s,m) = f(s + 1,m)} \right. \cr} $$

The ogf in $s$ is instead quite simple (re. to this related post) $$ F_b (x,r,m) = \sum\limits_{0\,\, \leqslant \,\,s\,\,\left( { \leqslant \,\,r\,m} \right)} {N_b (s,r,m)\;x^{\,s} } = \left( {1 + x + \cdots + x^{\,r} } \right)^m = \left( {\frac{{1 - x^{\,r + 1} }}{{1 - x}}} \right)^m $$ and the medium terms easily show another way to express $N_b$ as a multinomial expansion.
Multiple o.g.f. in $s,m$ follows easily.

Also $N_b$ satisfies some simple relations and recurrences, such as $$ \eqalign{ & N_b (s,r,m) = N_b (mr - s,r,m) \cr & N_b (s,r,m + n) = \sum\limits_l {N_b (l,r,m)\;N_b (s - l,r,n)} \quad \Leftrightarrow \cr & \Leftrightarrow \quad N_{\,b} (s,r,m) - N_{\,b} (s - 1,r,m) = N_{\,b} (s,r,m - 1) - N_b (s - r - 1,r,m - 1) \cr & N_{\,b} (s,r,m) = \sum\limits_{j,\;k} {\left( \matrix{ m \cr j \cr} \right)\;N_{\,b} (k,t,m - j)\,N_{\,b} (\,s - k - j(t + 1),r - t - 1,j)\,} \quad \left| {\;0 \le t \le r - 1} \right. \cr & N_{\,b} (s_\, ,r,m) = \left[ {0 = r} \right]\left[ {0 = s} \right] + \sum\limits_k { \left( \matrix{ m \cr k \cr} \right)N_{\,b} (s - kr_\, ,r - 1,m - k)} \cr} $$ where $[P]$ denotes the Iverson bracket.

Concerning the asymptotics you may refer to this post where it is explained how we reach to $$ p(s,r,m) = {{N_{\,b} (s,r,m)} \over {\left( {r + 1} \right)^{\,m} }}\;\; \to \;{\cal N}\left( {m{r \over 2},\;m{{\left( {r + 1} \right)^{\,2} - 1} \over {12}}} \right) $$ approximating the sum of $m$ i.i.d discrete uniform variables on $[0,r]$, as the sum of $m$ continuous uniform variables (the Irwin-Hall distribution) and then of $m$ normal variables with same mean and variance.

As for the literature finally, for the $N_b$ itself there is not much more than the Mathpages article.
However $N_b$ is a building block for some related problems arising in a number of applications.
That comes mainly from another interpretation of $N_b(s,r,m+1)$ as the
Number of binary strings, with $s$ "$1$"'s and $m$ "$0$"'s in total, that have up to $r$ consecutive $1$s
as explained in this post.
So there is nowadays quite a vast literature dealing with it from different perspectives in the fields of:
- digital transmission - error bursts (which was the origin of my interest in it some decades ago);
- system reliability, the so called consecutive k-out-of-n:F systems;
- stochastic processes, queue theory;
- the so called k-order extension of some common distributions;
- it is intimately related to n-bonacci numbers;
- quality control, consecutiveness of defects in a sequential batch;
... etc.

Most of my links have become obsolete, but searching on the above subjects starting from the few links I gave you can find various papers on the aspects of best interest to you.

$\endgroup$
6
  • $\begingroup$ Is there a literature source you would recommend consulting for the convergence of this sum to a Gaussian? I may want to cite it for a paper I'm writing $\endgroup$ Commented Feb 16, 2020 at 14:20
  • $\begingroup$ @JoshuaSiktar: I am preparing a concise resume of features and references that might interest you $\endgroup$
    – G Cab
    Commented Feb 16, 2020 at 18:58
  • $\begingroup$ Great! I'd love to see it once it's done $\endgroup$ Commented Feb 17, 2020 at 2:19
  • $\begingroup$ @JoshuaSiktar: did my best, if you need some more information let me know. $\endgroup$
    – G Cab
    Commented Feb 17, 2020 at 22:50
  • 1
    $\begingroup$ it is a pleasure to transfer the knowledge ! $\endgroup$
    – G Cab
    Commented Feb 19, 2020 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .