Finding the number of combinations under group restrictions

27 Views Asked by At

Suppose I have 4 instruments, which ranges from 0-100 with steps of 25.

For example, Instrument 1 can have 5 scenarios, 0, 25, 50, 75, 100 Similarly, instruments 2-4 can also have same scenarios. Now, to find out the combined scenarios of 4 instruments, there can be 5^4=625 scenarios.

However, is there any formula to find out the combined number of scenarios under a constraint that the total of all scenarios will not exceed 100?

That is if instrument 1 has 100, other instruments have to be 0, and likewise.

For example, I manually calculated the total number of scenarios to be 70 for 4 instruments.

Is there any method to calculated these restricted scenarios for n number of instruments?

1

There are 1 best solutions below

1
On BEST ANSWER

You are looking for a number of solutions of equation:

$a+b+c+d=4$

...with each variable being an integer between 0 and 4 (inclusive). Multiply each solution with 25 and you get your instruments readings.

This is a well known ”Stars and Bars” problem. Your problem is described under “Theorem Two”.

The solution is $\binom{n+k-1}{k}$ for $n=k=4$ which is $\binom74=\binom73=35$.