# Thread: w + x + y + z = 9

1. ## w + x + y + z = 9

How many solutions in non-negative integers are there to the equation w + x + y + z = 9?

How many solutions in positive integers?

Think i figured out the first part which i got to be ${12 \choose 3} = 220$

But how do i calculate the second part? So far im at 220 - (number of solutions with three 0's in it) - (number of solutions with two 0's in it) - (number of solutions with one 0 in it) = 220 - (4) - (6 x 8) - ?

Is there a formula or is it just a counting exercise for the second part?

2. Non-negative and positive. Isn't that pretty much the same thing?. Or do you just mean using 1 thrugh 9 instead of 0 through 9?.

Then you would have: $\left(\sum_{k=1}^{9}x^{k}\right)^{4}$

The coefficient of x^9 is 56, so there are 56 arrangements of the digits 1-9 that sum to 9.

You could use the generating function, $\left(\sum_{k=0}^{9}x^{k}\right)^{4}$

Then look at the coefficient of the x^9 term. Which is indeed 220.

Suppose you wanted to do w+x+y+z=9, but only use the numbers 1 through 5

Then $\left(\sum_{k=1}^{5}x^{k}\right)^{4}$

The coefficient of x^9 is 52, so there are 52 ways to sum to 9 using the digits 1 through 5.

How many solutions in non-negative integers are there to the equation w + x + y + z = 9?

How many solutions in positive integers?
which question includes 0 in the set of integers?

does your count include each of these?
9+0+0+0=9
0+9+0+0=9
0+0+9+0=9
0+0+0+9=9

from the wording of the question, i would guess that the first question includes 0, and that your counts do allow the above. also, i would assume that each {w,x,y,z} can only be in {solutions} once. if these assumptions are correct, consider this:

for each of these (you will see that this list has a spill-over pattern)
9+0+0+0=9
8+1+0+0=9
7+2+0+0=9
7+1+1+0=9
6+3+0+0=9
6+2+1+0=9
6+1+1+1=9
5+4+0+0=9
5+3+1+0=9
5+2+2+0=9
5+2+1+1=9
4+4+1+0=9
4+3+2+0=9
4+3+1+1=9
3+3+3+0=9
3+3+2+1=9

you must find all the w, x, y, z permutations of the 4 numbers.
i.e.
6+3+0+0=9
6+0+3+0=9
6+0+0+3=9

0+6+3+0=9
0+6+0+3=9
3+6+0+0=9

0+0+6+3=9
3+0+6+0=9
0+3+6+0=9

3+0+0+6=9
0+3+0+6=9
0+0+3+6=9

as to finding some simple logic/equation to arrive at your answer, i don't know it off the top of my head, but i imagine that if there is an elegant solution, you will find it by studying the patterns in the permutations.

i believe this question should have you look at and understand said patterns rather than have you function as a calculator, so if you're looking for a quick answer, i probably have not helped you here, but if you're looking to understand what it is you're doing, have at it!

How many solutions in non-negative integers are there to the equation w + x + y + z = 9?

How many solutions in positive integers?
We can think of this as,
$(w-1)+(x-1)+(y-1)+(z-1) = 9$.
Where $w,x,y,z$ are positive integers.
This is equivalent to,
$w+x+y+z = 13$.

There are, ${{13}\choose 3}$ ways to solve this.

5. There is a conceptual mistake in the previous post.
It should be $\left( {w + 1} \right) + \left( {x + 1} \right) + \left( {y + 1} \right) + \left( {z + 1} \right) = 9$ giving $w+x+y+z=5$ which has ${ 8 \choose 3}$ many positive integer solutions. I have often told classes to think of it as putting a one into each variable and then solving as usual.

TPH’s answer gives the number of integer solutions in which the solutions are $\ge -1$.

6. not quite sure i understand your post plato... ${8 \choose 3}$ only gives 56 possible values. Is that for the second part? not including any 0's. I thought the formula ${{n + k -1} \choose {n - 1}}$ solved these for (in this case) $w,x,y,z \ge 0$ which i thought would be ${{4 + 9 - 1} \choose {4 - 1}} = {12 \choose 3}$...

not quite sure i understand your post plato... ${8 \choose 3}$ only gives 56 possible values. Is that for the second part?