How many ways to write sum as $k$ restricted integers

158 Views Asked by At

If we have $3$ positive integers given as \begin{align*} 0 & \leq a \leq 3\\ 0 & \leq b \leq 3\\ 0 & \leq c \leq 2 \end{align*} and given the sum $$ a+b+c = 5$$

how many ways we can distribute these integers ?

Note: I asked a relatively close question to this but I was unsuccessful at applying that solution. Please do enlighten me.

Is this page a good exploration point ?

3

There are 3 best solutions below

0
On
  • Given the minimal number $2$, for each value of $c$ and $b$, thee exists immidiatly a value of $a$ satisying the sum. so

$S=3*4$

EDIT: there is cases where no element $a$ exists which follows:

(0,0) and (0,1) considering permutations those are 3 cases so

$S=3*4-3$

4
On

A particular solution of the equation $$a + b + c = 5 \tag{1}$$ in the non-negative integers corresponds to the placement of two addition signs in a row of five ones. For instance, $$1 1 1 + 1 1 +$$ corresponds to the solution $a = 3$, $b = 2$, and $c = 0$. Thus, the number of solutions of equation 1 in the non-negative integers is $$\binom{5 + 2}{2} = \binom{7}{2}$$ since we must select which two of the seven symbols (five ones and two addition signs) will be addition signs.

From these, we must exclude those solutions in which $a > 3$, $b > 3$, or $c > 2$. Since $a, b, c$ are integers, this means we must exclude those solutions in which $a \geq 4$, $b \geq 4$, and $c \geq 3$. Since $4 + 3 = 7 > 5$, no two of these restrictions can hold simultaneously.

Suppose $a \geq 4$. Let $a' = a - 4$. Then $a'$ is a non-negative integer. Substituting $a' + 4$ for $a$ in equation 1 yields \begin{align*} a' + 4 + b + c & = 5\\ a' + b + c & = 1 \tag{2} \end{align*} Equation 2 is an equation in the non-negative integers with $$\binom{1 + 2}{2} = \binom{3}{2}$$ solutions.

By similar argument, there are $\binom{3}{2}$ solutions if $b \geq 4$.

Suppose $c \geq 3$. Let $c' = c - 3$. Then $c'$ is a non-negative integer. Substituting $c' + 3$ for $c$ in equation 1 yields \begin{align*} a + b + c' + 3 & = 5\\ a + b + c' & = 2 \tag{3} \end{align*} Equation 3 is an equation in the non-negative integers with $$\binom{2 + 2}{2} = \binom{4}{2}$$ solutions.

Hence, the number of solutions of equation 1 in the non-negative integers subject to the restrictions $a \leq 3$, $b \leq 3$, and $c \leq 2$ is $$\binom{7}{2} - 2\binom{3}{2} - \binom{4}{2}$$

1
On

A generatingfunctionologist would say that the generating function for the number of solutions in non-negative integers of $$x_1 + x_2 + x_3 = r$$ subject to $x_1 \le 2$, $x_2 \le 3$, $x_3 \le 3$ is $$\begin{align}f(x) &= (1+x+x^2) \cdot (1+x+x^2+x^3)^2\\ &= x^8+3 x^7+6 x^6+9 x^5+10 x^4+9 x^3+6 x^2+3 x+1 \end{align}$$ The answer to the problem is the coefficient of $x^5$ when $f(x)$ is expanded, i.e. $9$.

Reference: Wilf, generatingfunctionology

https://www.math.upenn.edu/~wilf/DownldGF.html