[Math] How many ways are there to distribute 30 green balls to 4 persons

combinatoricsdiscrete mathematicsnumber theoryprobability

How many ways are there to distribute 30 green balls to 4 persons if Alice and Eve together get no more than 20 and Lucky gets at least 7?

The answer is: 2464 but I'm not sure how to get it?

Best Answer

Lets say that this represents some distribution of balls to 4 people.

****|**|*****|****

I only have 15 balls in this picture, but you hopefully get the point

Now think of this not as balls and people but as stars and bars.

there are 18 objects in my picture (or 33 in your problem) 3 of which are bars.

The total number of ways to put $n$ objects in $m$ bins, then is ${n-1\choose m-1}$

Now we have some addional criteria. Alice and eve get no more than 20. And lucky gets at least 7.

Lets fist give 7 to Lucky. And then we can remove them from consideration... that leaves 23 balls to distribute.

${26\choose 3}=2600$

And then we need to remove the cases when where Alice and Eve get more than 20.

Suppose we give Alice and Eve 20. Lucky gets at least 7, that is 27 of 30 balls accounted for. There are cases. 21 balls to A+E, 22 balls to A+E, 23 balls to A+E.

${22\choose 1}\cdot{3\choose 1} + {23\choose 1}\cdot{2\choose 1} + {24\choose 1}\cdot{1\choose 1} = 136$

$2600-136=2464$

Related Question