Permutations and number of permitted combinations three percentages which must add up to 100%

1k Views Asked by At

is there a simple way to find the number of combinations of three percentage values with discrete step sizes which add up to 100%?

Example:

Variable 1: Min: 10%, Max: 60%, Stepsize: 5% Variable 2: Min: 20%, Max: 70%, Stepsize: 5% Variable 3: Min: 10%, Max: 50%, Stepsize: 10%

Possible values:

Variable 1: 10%,15%,20%,...,55%,60% Variable 2: 20%,25%,30%,...,65%,70% Variable 3: 10%,20%,30%,40%,50%

I want to find the number of possible combinations of these values which add up to 100%, e.g.

10% Variable 1 + 20% Variable 2 + 10%Variable 3 -> not possible, sum not 100%

10% Variable 1 + 20% Variable 2 + 70%Variable 3 -> not possible, Variable 3 out of Range

10% Variable 1 + 40% Variable 2 + 50%Variable 3 -> possible

1

There are 1 best solutions below

6
On BEST ANSWER

I believe you can use a generating function to solve this problem.

In your example, the answer you are looking for is the coefficient of $x^{100}$ in the expansion of

$(x^{10}+x^{15}+x^{20}+…+x^{60})(x^{20}+x^{25}+x^{30}+…+x^{70})(x^{10}+x^{20}+…+x^{50})$

You can divide this expression by $x^{40}$ to give

$(1+x^{5}+x^{10}+…+x^{50})^2(1+x^{10}+x^{20}+…+x^{40})$

Since we divided by, $x^{40}$, finding the coefficient of $x^{100}$ in the former expression is equivalent to finding the coefficient of $x^{60}$ in the latter.

Substituting $y=x^5$ yields $(1+y+y^{2}+…+y^{10})^2(1+y^{2}+y^{4}+…+y^{8})$ and we are now looking for the coefficient of $y^{12}$.

We can write the expression in closed form, then expand:

$(1+y+y^{2}+…+y^{10})^2(1+y^{2}+y^{4}+…+y^{8})\\={\left(\frac{1-y^{11}}{1-y}\right)}^2\left(\frac{1-y^{10}}{1-y^2}\right)\\=(1-y^{11})^2(1-y^{10})(1-y)^{-2}(1-y^2)^{-1}\\=(1-y^{10}-2y^{11}+2y^{21}+y^{22}-y^{32})(1+2y+3y^2+4y^3+…)(1+y^2+y^4+y^8+…)$

It suffices to compute the coefficient of $y^{12}$ in this expansion, which, if my calculations are correct, is $49 - 4 - 4 = 41$.