# 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$?

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?

• The second factor in your answer should be based on the number of solutions of $x_4+x_5+x_6=13$. – paw88789 Oct 4 '14 at 23:38
• my bad. Is it correct now? – Lil Oct 4 '14 at 23:42
• I think it's ok now. – paw88789 Oct 4 '14 at 23:43
• so is it always arranged where the first number is what the equation equals and then you add one less then the number of terms? – Lil Oct 4 '14 at 23:44
• Saying 'always' is a dangerous thing in math. Subtle differences in wording can change answers quite a bit. But in your case you can use a 'stars and bars' argument. See for instance en.wikipedia.org/wiki/Stars_and_bars_(combinatorics) – paw88789 Oct 4 '14 at 23:47

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.
• Yup. Nine $1$'s and one $+$ are $10$ things in total. You have to $\textbf{choose}$ one spot out of ten for the $+$, which is just $C(10,1)$. Of course this also $C(10,9)$. So yes you are correct! – Andrey Kaipov Oct 5 '14 at 0:09