2

I worked out a solution but don't know if its the right one. Is this the right way to approach the problem? Any help would be appreciated.

First, the number of non-negative integer solutions for $W+X+Y+Z = 15$ can be calculated using stars and bars:

$$\binom{n+k-1}{n} = \binom{15+4-1}{15}$$

Now, when value of W exceeds 6; i.e., for value of 7 violets the rule of the upper limit for W. That means the number of violations W can have is among 15-7 = 8 identical items in 4 distinct bins.

Equation for violations becomes W+X+Y+Z = 15-7 = 8

As a result, total number of violations for W = C (n+k-1, k-1) = C (8+4-1, 4-1) = C (11, 3)

⸫ Total number of violations for all 4 bins when 1 bin cross upper limit = C (11, 3) × 4

Since, number of violations 8 is >n/2=15/2=7.5; we need to add in the subtracted repetitions.

When 2 bins cross above upper limit; W+X+Y+Z = 15-7-7 = 1

⸫ Total number of repetitions for all 4 bins when 2 bin cross upper limit = C (1+4-1, 4-1) × 4 = C (4, 3) × 4

When 3 bins cross above upper limit; W+X+Y+Z = 15-7-7-7 = -6 i.e., not possible.

Therefore, the number of integer solutions for $W+X+Y+Z = 15$ where $W, X, Y, Z \leq 6$ is $$\binom{18}{3} – \binom{11}{3} \times 4 + \binom43\times 4$$

  • I don't really understand what you did. Perhaps rewrite with clearer language and typesetting, and I'll have a look again. – Benjamin Wang Feb 17 '21 at 20:07

2 Answers2

2

There is a mistake in your last term. The answer should be $180$ and not $172$. Also you can simplify the working.

There are multiple ways to tackle the problem -

  • Solve as is using P.I.E what you did
  • Simplify using change of variable and solve
  • Solve using generating function

a) Using first method (how you did; I have used boxes and balls analogy in my working),

the answer should be $\displaystyle {18 \choose 3} - {4 \choose 1} {11 \choose 3} + {4 \choose 2} {4 \choose 1} = 180$

The second term is where we choose one of the boxes to have $7$ balls and then distribute rest $8$ balls in any of the boxes.

The third term is where we choose two of the boxes to have $7$ balls each and then put one remaining ball in any of the boxes. This term is wrong in your working.

b) Using second method,

We substitute $a = 6 - w, b = 6 - x, c = 6- y, d = 6 - z$.

So we have, $a + b + c + d = 9 \ $ where $0 \leq a, b, c, d \leq 6$.

Only one of them can have more than $6$ balls. So the answer is

${12 \choose 3} - {4 \choose 1} {5 \choose 3} = 180$

c) Using generating function

Find coefficient of $x^{15}$ in $(1+x+x^2+x^3+x^4+x^5+x^6)^4$ which is indeed $180$. I will leave it to work through it if this is a method which is of interest to you.

Math Lover
  • 51,819
  • 1
    I feel that we have answered different problems. Your problem has the additional constraint that $W,\ldots, Z$ are non-negative, leading to my $A,\ldots ,D\le 6$. – Benjamin Wang Feb 17 '21 at 20:35
  • @BenjaminWang yes that is correct. I just picked up the constraint from the question which says the number of non-negative integer solutions – Math Lover Feb 17 '21 at 20:37
  • @BenjaminWang Also the title said whole number solutions. So I went by that. – Math Lover Feb 17 '21 at 20:41
  • Okay. By the way, if you read the link in my answer's comments, you get the same answer if you drop the nonnegativity constraint. That's weird. – Benjamin Wang Feb 17 '21 at 20:43
  • @BenjaminWang no that link only addresses non-negative solutions. If we include negative numbers, the solution should be more than $220$. – Math Lover Feb 17 '21 at 20:49
1

The “$\le6”$ constraints are annoying to work with. To fix it,we can substitute $$A=6-W, \quad B=6-X, \quad C=6-Y, \quad D = 6 - Z.$$

Now, the constraints become $A+B+C+D\le 4\times 6 - 15=9$, and $A,B,C,D\ge 0$. Now, you can solve it by standard stars and bars method.

So the answer is $$\binom{9+4-1}{4-1}=220.$$

Whereas the answer I get from your last line is $172$.

  • Thanks for your answer; However according to the link (https://cat100percentile.com/2013/05/20/distribution-with-upper-limits-on-group-size/) in Q3 applying your solution results quite different value from theirs. – Atikul I. Bhuiyan Moon Feb 17 '21 at 20:08
  • I saw the Q3 in the link. I get the same solution as the link. I get $\binom{5+3-1}{3-1}=10$ (where the $5$ comes from $3\times 5 - 12$), and they get $10$ as well. You should also check that for Q4 in the link, my answer is $\binom{20+3+1}{3-1}$. This method is in general faster and requires less case-work. Once you have more than $3$ variables (like you did), the method illustrated in the link becomes very hard to work with. – Benjamin Wang Feb 17 '21 at 20:14
  • I cannot understand how did you get A+B+C=5. – Atikul I. Bhuiyan Moon Feb 17 '21 at 20:21
  • My apologies I made a typo. Q3's answer should be $\binom{3+3-1}{3-1}=10$. The linked Q3 asks for $x+y=z=12$ while $x,y,z\le 5$. Now substitute $a=5-x,b=5-y,c=5-z$, so you get $a+b+c=3$. – Benjamin Wang Feb 17 '21 at 20:25
  • Thanks, This works beautifully, does this method have any limitation? I mean is there any special case where I shouldn't use this method? – Atikul I. Bhuiyan Moon Feb 17 '21 at 20:31
  • You still have constraint of $6$. It is just that only one of the numbers can be $7$ or more. – Math Lover Feb 17 '21 at 20:34
  • Yes, the limitation is that I've missed some constraints. You'd still have to do some inclusion-exclusion. For better illustration, see Math Lover's answer. – Benjamin Wang Feb 17 '21 at 20:40