Counting number of integer solutions. Transforming restrictions / Grimaldi

63 Views Asked by At

I've tried looking for an answer to this but I've found it related to the equation itself not the restrictions.

On Grimaldi's "Discrete and Combinatorial Mathematics" we are trying to find the compositions of the integer 7. We look for the ones with two summands.

So in order to know how many compositions there are, we have:

$w_1 + w_2 = 7$ where $w_1, w_2 \gt 0$

(And this is where I'm lost at how he arrives to it) This is equal to the number of solutions for

$x_1 + x_2 = 5$ where $x_1, x_2 \ge 0$

The same happens later on when trying to find how many compositions there are for 3 summands, going from 7 to 4. There's something related to the amount of summands but I can't see how it can lower the number of "containers" and also change the inequality.

I would appreciate any help on figuring this out.

1

There are 1 best solutions below

3
On BEST ANSWER

If $w_k>0$ is imposed, then setting $w_k=1+x_k$ the restrictions become $x_k \ge 0.$ And one has to subtract (in this case) the number of summands from the goal number, here goal is $7$ and two summands so new goal $7-2=5.$