2

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 $

  • 1
    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... –  Dec 11 '13 at 09:19
  • 2
    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

5 Answers5

5

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$.

Will Orrick
  • 19,218
Christopher Liu
  • 1,329
  • 7
  • 14
3

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?

Salech Alhasov
  • 6,946
  • 2
  • 30
  • 47
  • Down-voter, is it wrong? – Salech Alhasov Dec 11 '13 at 09: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.. –  Dec 11 '13 at 09: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 –  Dec 11 '13 at 09:37
  • 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... –  Dec 11 '13 at 09:41
  • To get positive integer solutions, I think you need to omit the constant term (the $1$). – Will Orrick Dec 11 '13 at 10:13
  • @WillOrrick: You're absolutely right! – Salech Alhasov Dec 11 '13 at 10:20
  • One more comment: I'm not sure where you were going with this hint, but it seems like a chore to extract the needed coefficient. There's no reason to cut the sum off at $x^{15}.$ If instead, you write $$\left(x+x^2+x^3+\ldots\right)^4=\left(\frac{x}{1-x}\right)^4,$$ you can compute the coefficient using the generalized binomial theorem. – Will Orrick Dec 11 '13 at 14:45
  • I should have observed, of course, that even if you do use the finite sum, you can use the generalized binomial theorem. In this version, the formula for geometric sum gives $$\left(x+x^2+\ldots+x^{15}\right)^4=\left(\frac{x-x^{16}}{1-x}\right)^4.$$ The denominator is the same as above. In the numerator, expanded using the binomial theorem, the next term after $x^4$ is $O\left(x^{19}\right),$ and therefore doesn't contribute. You can even cut the sum off at $x^{12}.$ – Will Orrick Dec 12 '13 at 03:09
  • Your comments are the the 'flesh and bones' of post. – Salech Alhasov Dec 12 '13 at 07:29
  • Can you explain why you have done like this – Koolman Nov 27 '16 at 17:52
3

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}$.

  • How can we derive the formula – Koolman Nov 27 '16 at 17:50
  • @Koolman You can look at it as having n spaces that can be either 1 or 0. We will add 3 0s in any of the spots where the spaces before the first 0 is $x_1$ and the space after the first 0 is the next digit, and so forth. So we have n spaces with (p -1) zeros anywhere in it. Since we took (p-1) spaces off the n total, we will add (p-1) to n. So we have (n+p-1). Now you can say, how many ways can we arrange the 1s and 0s in the (n+p-1) spaces where there are (p-1) zeros? So you get (n+p-1) choose (p-1). – Jozey Dec 11 '17 at 07:32
  • The above is derived for non-negative values. – Jozey Dec 11 '17 at 07:43
  • @JozemiteApps Yes , I got confused if it is derived for positive numbers or non-negative numbers . – Koolman Dec 11 '17 at 14:03
2

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.$$

Martial
  • 1,724
  • 1
  • 14
  • 19
  • 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 :) –  Dec 11 '13 at 09:55
  • I tested this problem with Matlab and the result is just like what I got with pen. – Martial Dec 11 '13 at 09:58
  • 1
    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
  • @Lucian: You said "Not all of them slice the number into four distinct positive parts. So the answer should be less than [176]." I guess you just meant that not all of them slice the number into four positive parts? By the way, if the question were asking for the number of partitions of $15$ into exactly four parts, the answer would also be $27.$ (https://oeis.org/A026810) – Will Orrick Dec 11 '13 at 13:33
  • @WillOrrick: Yeah, sorry. I meant distinct as in separate. – Lucian Dec 11 '13 at 13:58
0

A visual solution I learned from my teacher was using spaces (to make it easier to understand the math). Since the total is $15$, we have $15$ spaces. BUT, because we are using positive numbers (not non-negative), then we have to add $1$ more to each variable (to make it positive if it were to be $0$), which means we subtract how much we added from the total. So we have $11$ spaces.

_ _ _ _ _ _ _ _ _ _ _

Since we have $4$ variables, we add ($4-1$) zeros to separate the spaces into $4$ sections.

_ _ 0 _ _ 0 _ _ 0 _ _

Since the zeros took $3$ spaces, we add $3$ spaces wherever you want.

_ _ _ 0 _ _ 0 _ _ _ 0 _ _ _

Notice that for the above spaces, we have $3 + 2 + 3 + 3 = 11$. That is $1$ solution, but we can't keep doing that. It's not efficient. So here we can use the total number of spaces, $14$, and partition it into $4$ sections, so we have:

$$\binom{p + n - 1}{n - 1}$$ $$=\binom{11 + 4 - 1}{4 - 1}$$ $$=\binom{14}{3}$$ $$=364$$

Where $p$ is the total of the equation and $n$ is the number of variables. Notice that the above equation is the visual I used. Same thing.

Jozey
  • 560