# How many Positive integer solutions does the equation $x + y + z + w = 15$ have?

How many Positive integer solutions does the equation $x + y + z + w = 15$ have?

Attempt:

Let $x = m + 1, y = n + 1, z = o + 1, w = p + 1$

Then, $m + 1 + n + 1 + o + 1 + p + 1 = 15$

$m + n + o + p = 11$

-
Do you see is there any point in changing variables from $x,y,z,w$ to $m,n,o,p$... that may not be considered as an attempt... –  Praphulla Koushik Dec 11 '13 at 9:19
You are correct that the number of positive solutions to $x+y+z+w=15$ is the same as the number of nonnegative solutions to $m+n+o+p=11.$ To count solutions to the latter, imagine dividing the sequence $$***********$$ into four (possibly empty) groups by placing three separator marks somewhere in the sequence. So for example, $$***\mid **\mid\mid ******$$ would correspond to the solution $3+2+0+6.$ Now you just have to enumerate such sequences. –  Will Orrick Dec 11 '13 at 10:08

Here is my try.

Your equation is $x+y+z+w=(x+y)+(z+w)=15$. First we see $x+y$ and $z+w$ as two unknowns, that is $a+b=15$ and $a,b$ satisfy $2\leq a,b\leq13$. Easily, we can say that there are $12$ positive integer solutions for $a$ and $b$. Then we will see there are how many postive integer solutions for $x+y=a$ and $w+z=b$. We note the number of such solutions as $N(\cdot)$.

If $a=2$, then $b=13$. We see that $a=2=x+y$ has unique $1$ solutions for $x$ and $y$, that is $x=1$ and $y=1$. $b=13=z+w$ has $12$ solutions for $z$ and $w$, that is $z=1,2,\dots,12$ and $w=12,11,\dots,1$. Then there are $N(a=2)*N(b=13)=1*12=12$ solutions for $a=2$ and $b=13$.

Then we do like this, we can make a list of the 12 solutions for $a$ and $b$: $$N(a=2)=1\Leftrightarrow N(b=13)=12\Leftrightarrow N(a=2,b=13)=1*12$$ $$N(a=3)=2\Leftrightarrow N(b=12)=11\Leftrightarrow N(a=3,b=12)=2*11$$ $$\vdots$$ $$N(a=13)=12\Leftrightarrow N(b=2)=1\Leftrightarrow N(a=3,b=12)=12*1$$ So the number of all the solutions is $$N(x+y+z+w=15)=\sum_{n=1}^{12}n*(13-n)=364.$$

-
This sounds very intuitive.. I could not check all $N(a)$ of what you have written but I feel if this question is to be solved then this should be the best way.. well done :) –  Praphulla Koushik Dec 11 '13 at 9:55
I tested this problem with Matlab and the result is just like what I got with pen. –  Martial Dec 11 '13 at 9:58
The total number of partitions of $15$ is $176$. Not all of them slice the number into four distinct positive parts. So the answer should be less than that. You probably made the mistake of counting different permutations as different solutions. Then again, the OP did not specify whether order is important or not. –  Lucian Dec 11 '13 at 10:20
@Lucian: I don't see where it says that $x,$ $y,$ $z,$ and $w$ have to be distinct. Also, it's evident that order does matter. Asking for positive integer solutions to $x+y+z+w=15$ is an unambiguous question. –  Will Orrick Dec 11 '13 at 10:26
They're not distinct. Otherwise the number would further decrease to only $27$. –  Lucian Dec 11 '13 at 10:36

From your attempt we know that this problem is equivalent to the number of non-negative integer solutions to $m + n + o + p = 11$, which is far simpler. This type of problem is sometimes known as "Stars and Bars" http://en.wikipedia.org/wiki/Stars_and_bars_%28combinatorics%29. The idea is that you have 11 "stars", how many different ways can you put 3 bars in between them to separate them into 4 groups? In total, you have $11 + 4 - 1 = 14$ spaces for either a star or a bar, from that you need to choose $4 - 1 = 3$ spaces to place a bar. This equates to $\binom{14}{3} = 364$.

-

Hint:

Find the coefficient of $x^{15}$ of the following function:

$$f(x)=(x+x^2+x^3+\cdots+x^{15})^4$$

Why this gives you the number of integer solution of your equation?

-
Down-voter, is it wrong? –  Salech Alhasov Dec 11 '13 at 9:32
I have down voted this.. I see no point in making the answer so complicated... i do not think this would be a good idea.. –  Praphulla Koushik Dec 11 '13 at 9:34
I do not prefer to be rude but then i see no point... One more thing is i can not take back my down vote unless it is edited... :O –  Praphulla Koushik Dec 11 '13 at 9:37
Did I asked you to take back your down vote? –  Salech Alhasov Dec 11 '13 at 9:39
I said i can not take back my down vote unless it is edited.. If you have decided to be rude It is up to you... –  Praphulla Koushik Dec 11 '13 at 9:41

There is a formula for the number of solutions in $N^p$ of the equation $x_1+ ... +x_p=n$, notably $C_{n+p-1}^{p-1}$.

-