2

What is the number of positive unequal integral solution of the equation $x+y+z+w=20$, if $\,x<y<z<w\,$ and $\,x,y,z,w\ge1\;?$

How to solve this question?

Mayank Deora
  • 1,466
  • 1
  • 13
  • 26
  • Meaning of "unequal" is not clear. Each integer has to be different? – Curious Droid Nov 02 '14 at 10:49
  • If by 'unequal' you mean distinct integers, then you should refer to this:http://math.stackexchange.com/questions/999319/how-many-sets-of-non-negative-solutions-are-there-to-k-1-cdotsk-n-k – najayaz Nov 02 '14 at 14:43

5 Answers5

1

There are following posible solution:

1,2,3,14 $\,\,\,\,\,\, $ 1,3,4,12, $\,\,\,\,\,\, $ 1,4,5,10 $\,\,\,\,\,\, $ 1,5,6,8

1, 2,4,13 $\,\,\,\,\,\, $ 1,3,5,11 $\,\,\,\,\,\, $ 1,4,6,9

1,2,5,12 $\,\,\,\,\,\, $ 1,3,6,10 $\,\,\,\,\,\, $ 1,4,7,8

1,2,6,11 $\,\,\,\,\,\, $ 1,3,7,9

1,2,7,10

1,2,8,9

So there is 14 $\times $ 3 = 42 if $x=1$

Paul
  • 21,141
  • I know the solution when the condition is only that x=1, but here the condition is different as shown in the title of my question.I am stuck on this question for a long time, please help me in solving it... – Mayank Deora Nov 02 '14 at 10:50
  • If $x$ cannot be $1$, then it is $14 \times 4=56$ – Paul Nov 02 '14 at 10:55
  • x ,y,z and w must be greater than or equal to 1 and x<y<z<w this is the condition. – Mayank Deora Nov 02 '14 at 12:42
  • I have tried doing it by putting y as x+a, z as x+a+b and w as x+a+b+c such that 1>=a>=19 ,1>=b>=18, 1>=c>=17. So,now the equation becomes 4x+3a+2b+c=20 i.e. c=20-3a-2b ,and then i used the formula (20-3a-2b)-1C0 but this method is looking awkward and doesn't match the options of this question...So which method i should use. – Mayank Deora Nov 02 '14 at 12:57
1

You are looking for the number of partitions of $20$ into $4$ distinct parts.

Putting $x'=x-1$, $y'=y-2$, $z'=z-3$, $w'=w-4$, this is equivalent to looking for the number of integer solutions $0\leq x'\leq y'\leq z'\leq w'$ to $x'+y'+z'+w'=20-10=10$, the number of partitions of $10$ into at most $4$ parts. By transposition of the Young diagram associated to the partition, this is also the number of partitions of $10$ into any number of parts that are at most$~4$. By a direct combinatorial interpretation the latter is the coefficient of $X^{10}$ in the formal power series $$ \frac1{1-X}\times\frac1{1-X^2}\times\frac1{1-X^3}\times\frac1{1-X^4} $$ which if my hand calculation is correct equals $23$.

It looks like a complete list is doable, here it is

 w'z'y'x'   x,y,z,w
 3,3,2,2    3,4,6,7
 4,2,2,2    3,4,5,8
 3,3,3,1    2,5,6,7
 4,3,2,1    2,4,6,8
 5,2,2,1    2,4,5,9
 4,4,1,1    2,3,7,8
 5,3,1,1    2,3,6,9
 6,2,1,1    2,3,5,10
 7,1,1,1    2,3,4,11
 4,3,3,0    1,5,6,8
 4,4,2,0    1,4,7,8
 5,3,2,0    1,4,6,9
 6,2,2,0    1,4,5,10
 5,4,1,0    1,3,7,9
 6,3,1,0    1,3,6,10
 7,2,1,0    1,3,5,11
 8,1,1,0    1,3,4,12
 5,5,0,0    1,2,8,9
 6,4,0,0    1,2,7,10
 7,3,0,0    1,2,6,11
 8,2,0,0    1,2,5,12
 9,1,0,0    1,2,4,13
10,0,0,0    1,2,3,14
  • Is there a faster method to find the coefficient of $x^{10}$ in the generating function $$\dfrac{1-x^{20}}{1-x^4}\cdot\dfrac{1-x^{18}}{1-x^3}\cdot\dfrac{1-x^{20}}{1-x^2}\cdot\dfrac{1-x^{20}}{1-x}$$ Cause counting all the possible products of $x^r$ which equal to $x^{10}$ is proving to be a very lengthy process. I asked because you wrote that you did that by hand, and I dont think that I know any method that would give me the answer this fast, hence curious. – user350331 Dec 27 '16 at 01:20
  • (Note that unlike your formula my numerators are $1$.) If I said hand calculation at the time, it must have been really easy. I no doubt used some form of this method. Up to $10$ the coefficients in the product of factors with $X^4$ and $X^2$ are $1,0,1,0,2,0,2,0,3,0,3$, multiplication by the factor with $X^3$ then gives $1,0,1,1,2,1,3,2,4,3,5$ and a final multiplication by $1/(1-X)$ cumulates this sequence (each coefficient is replaced by the sum-so-far) making the final term (at position $10$) the full sum $1+0+1+1+2+1+3+2+4+3+5=23$. – Marc van Leeuwen Dec 27 '16 at 07:49
1

For a count of the solutions without restriction on the order by inclusion-exclusion, see this answer. The result is $552$; then the number of ordered solutions is obtained as $\frac{552}{4!}=23$.

joriki
  • 242,601
0

It's equivalent to solving $y+z+w=19$ which in turn is equivalent to selecting $19$ elements out of a set of $3$ elements where repetition is allowed. The answer is thus ${n+k-1 \choose k}={21 \choose 3} = 1330$

Curious Droid
  • 1,051
  • 9
  • 13
0

There is a recursion formula (dynamic programming approach) for this problem. The formula and its derivation are given below. This is easily and efficiently solved on a computer after translating the formula to a programming language of your choice. I used Julia below to get the answer of 37.

We begin the derivation with a simple change of variables. Define integers $x_1 = x - 1$, $x_2 = y - 2$, $x_3 = z - 3$, and $x_4 = w-4$. We are given $1\leq x < y < z < w$. This is equivalent to $0\leq x_1 \leq x_2 \leq x_3 \leq x_4$. When the sum of $x,y,z,w$ is 20, then we see the sum of $x_1, x_2, x_3, x_4$ is 10. So, the question is equivalent to asking the number of ways to sum $x_1,x_2,x_3,x_4$ equal to 10.

For positive integers $m,n,k$, define the function $f(m,n,k)$ to be the number of ways to sum $m$ integers $x_1,x_2,\ldots,x_m$ equal to $n$ with $x_m = k$ and $0 \leq x_1 \leq x_2 \leq \ldots\leq x_m$.

In general if $f$ doesn't make sense for particular values of its arguments, we just set it equal to zero. If every integer is equal to the largest value $k$, then the sum of the integers is $mk$. So, $mk$ must be at least as large as $n$ if there is any hope for the integers to sum to $n$. In situations where $mk$ is less than $n$, we define $f(m,n,k) = 0$. Similarly, we set $f(1,n,k)=0$ when $n\neq k$.

Notice $f(m,n,k)=1$ if $n=k$, since there is only one way to sum integers when the value of the largest integer is equal to the total.

For all other cases we have the following recursive formula: $$ f(m,n,k) = \sum_{j=1}^{\min\{n-k,k\}} f(m-1,n-k,j). $$

This formula follows from the fact that $m>1$ integers, with the largest equal to $k$, will sum to $n$ in the same number of ways $m-1$ integers will sum to $n-k$.

The answer to the original question is equal to the following: $$ \sum_{k=1}^{10} f(4,10,k). $$

Here's how to calculate this in the Julia programming language:

# represents f(m,n,k) for m=2
function f2(n,k)
  if k &lt = n
    1
  else
    0
  end
end

# represents f(m,n,k) when m>1
function f(m,n,k)
  if m==2
    f2(n,k)
  else
    if k==n
      1
    elseif k>n
      0
    else
      sum=0
      for j=1:min(n-k,k)
        sum += f(m-1,n-k,j)
      end
      sum
    end
  end
end

# prints the solution
answer = 0
for j=1:10
  answer+=f(4,10,j)
end
answer
guest
  • 1