Using inclusion-exclusion to determine how many solutions $x_1 + x_2 + x_3 + x_4 = 20$.

75 Views Asked by At

I've got a question regarding this assignment I've been looking at. The task itself is to use inclusion-exclusion principle to solve the equation: $$ a + b + c + d = 20, \qquad \text{ where } 2 \le a, b, c, d \le 7. $$

My attempt at solving goes as:

  1. The total amount of solutions where $2 \le a, b, c, d$ is ${15 \choose 3}$.
  2. The total number of solutions where at least one of $a, b, c$ or $d \ge 8$ is $4{9 \choose 3}$.
  3. Since there are 4 possible variables and all of them can be above 7. With one variable bigger than 7 the equation looks like $S_1 + S_2 + S_3 + S_4 = 6$, and thus we can not check for two variables bigger than 7 since the equation will then move into the negatives.

I then simply subtract the total amount of solutions where either $a, b, c$ or $d \ge 8$ from the overall total: $$ {15 \choose 3} - 4{9 \choose 3} $$ which is then my answer. However, in the answer sheet, for some reason which I do not understand, they add ${4 \choose 2} \times 1$ back and I can not figure out why.

This is also my question; why is 6 added back to the sum? Since we only remove one set from the total, how can there then be a need to re-add to the solution since nothing was ever removed twice?

The full answer sheet solution: $$ {15 \choose 3} - 4{9 \choose 3} + {4 \choose 2} \times 1 $$ And my solution is: $$ {15 \choose 3} - 4{9 \choose 3} $$

1

There are 1 best solutions below

1
On BEST ANSWER

I think your mistake lies in not counting solutions, where 2 variables can be bigger than 7. You can have, for example, $a = b = 2$ and $c = d = 8$ which is a valid solution. There is a total of 6 of those...