[Math] How many nonnegative integer solutions are there to the pair of equations $x_1+x_2+…+x_6=20$ and $x_1+x_2+x_3=7$

combinatoricsdiscrete mathematics

How many nonnegative integer solutions are there to the pair of equations
\begin{align}x_1+x_2+\dots +x_6&=20 \\ x_1+x_2+x_3&=7\end{align}

How do you find non-negative integer solutions?

Best Answer

You are correct. You can also think of it in terms of permutations.

The number of non-negative integer solutions of $x_1+x_2+x_3=7$ is the number of permutations of a multiset with seven $1$'s, and two $+$'s. This is $$\frac{9!}{7!\ 2!}.$$ Similarly, the number of non-negative integer solutions of $x_4+x_5+x_6=13$ is the number of permutations of thirteen $1$'s, and two $+$'s. This is $$\frac{15!}{13!\ 2!}.$$

This is why the first number in your combination is what the variables equal, and the second is "one less" the amount of variables, since you're permuting the $+$'s.

Related Question