2

I am dealing with the famous problem of finding the how many integer non negative solutions there are for the equation: $ x_1+\cdots +x_l=n$ with the restrictions $ \forall i: 1\leq x_i \leq k.$
The lower bound can be easly treated by defining $ x_i=y_i +1.$ and solving $ y_1+\cdots +y_l=n-l$ with the restrictions $ \forall i: 0\leq y_i \leq k-1.$
But the upper bound yields (by the conventional methods, inclusion-exclusion or generating functions, with generating functions it is possible to solve without defining the $ y_i-$s) an alternating series sum, which is very inconvenient expression.
I tried to look up for some other solution or a simplification of the expression but couldn't find any.
All that I've got is te following source https://www.mathpages.com/home/kmath337/kmath337.htm which gives an approximation. but first, without any explanation or references, and second, it requires to solve an equation of the form $ ze^{-\frac{z^2}{2}}=\tau$ (where $ \tau $ is an expression defined in the article, you won't find $ \tau$ there, it is a name I gave to the expression) which I am not exactly sure how to solve.
I've tried to use stirling's approximation by I'm still stuck with a very unpleasent expression. There are few approximations for the binomial coefficients depending on the parametrs of the binomial coefficients but I'm still left with an inconvenient expression.
Does anybody knows a good approximation for the above problem, or can direct me to information about that problem? it can be ssumed that both $ l$ and $ n$ are going to infinity so assymptotic approximation is fine.
Thank you all!

matan
  • 41

1 Answers1

1

Let me change you symbols so as to be congruent with the answer provided in other post

You are looking for $$ N_b (s,r,m) = {\rm No}{\rm .}\,{\rm of}\,{\rm solutions}\,{\rm to}\;\left\{ \begin{array}{l} {\rm 0} \le {\rm integer}\;y_{\,j} \le r \\ y_{\,1} + y_{\,2} + \; \cdots \; + y_{\,m} = s \\ \end{array} \right. $$ where each $y$ m-tuple is known as a (weak) composition of $s$ into $m$ parts restricted to the set $\{0,1, \ldots, r\}$:.

The solution is given by $$ 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)}\ } $$ as throughfully explained in this post and other related.

Now, if you are looking for an asymptotic (for large $m,s$ values) , the key is to approximate the sum of the $m$ discrete random variables $y_k$ in the starting equation as the sum of $m$ continuous variables, uniformly distributed onto $[-1/2, r+1/2]$, apply to that the Irwin-Hall distribution and if necessary further proceed by applying the CLT to reach to $$ \eqalign{ & p_{\,b} (s;r,m) = {{N_{\,b} (s,r,m)} \over {\left( {r + 1} \right)^{\,m} }} \approx {1 \over {\sqrt {2\pi m\sigma ^{\,2} } }} e^{\, - \,{{\left( {s - m\mu } \right)^{\,2} } \over {2m\sigma ^{\,2} }}} \cr & = {{\sqrt {6/\pi } } \over {\sqrt {m\left( {\left( {r + 1} \right)^{\,2} } \right)} }} e^{\, - \,6{{\left( {s - mr/2} \right)^{\,2} } \over {m\left( {\left( {r + 1} \right)^{\,2} } \right)}}} \cr} $$ See also this relevant post.

G Cab
  • 35,272