How many solutions are there to the equation in the title with the following constraints: $0 ≤ x_i, x_1 ≤ 6, x_2 ≤ 10, x_3 ≤ 15, x_4 ≤ 21?$
So, to do this I tried the following:
(A) Total number is ${31 \choose 28}$ ways.
(B) $x_1$ having $7$+ is ${24 \choose 21}$ ways.
(C) $x_1$ having $7$+ and $x_2$ having $11$+ is ${13 \choose 10}$ ways.
There is no way that $x_3$ can have 15+ since $7 + 11 + 15 > 28$.
Answer is $A - B + C = 2,757$ ways.
Is this correct?
This is how I would calculate it.
$T_1 = \binom{31}{3}$
ignores all upper constraints.
$T_2 = \binom{24}{3}$
$x_1 \geq 7.$
$T_3 = \binom{20}{3}$
$x_2 \geq 11.$
$T_4 = \binom{15}{3}$
$x_3 \geq 16.$
$T_5 = \binom{9}{3}$
$x_4 \geq 22.$
$L_1 = T_2 + T_3 + T_4 + T_5.$
$L_1$ represents # of ways that at at least one constraint violated.
Running total so far is $T_1 - L_1$.
$T_6 = \binom{13}{3}$
$x_1 \geq 7, x_2 \geq 11.$
$T_7 = \binom{8}{3}$
$x_1 \geq 7, x_3 \geq 16.$
$T_8 = 0$
$x_1 \geq 7, x_4 \geq 22.$ : impossible
$T_9 = \binom{4}{3}$
$x_2 \geq 11, x_3 \geq 16.$
$T_{10} = 0$
$x_2 \geq 11, x_4 \geq 22.$ : impossible
$T_{11} = 0$
$x_3 \geq 16, x_4 \geq 22.$ : impossible
$L_2 = T_6 + T_7 + T_8 + T_9 + T_{10} + T_{11}.$
$L_2$ represents # of ways that at at least two constraints violated.
Running total so far is $T_1 - L_1 + L_2$.
The above is the final total, because you can not have more than two constraints violated and still have the sum $\leq 28.$