1) In how many ways can indistinguishable balls be distributed among distinguishable boxes labeled with the numbers and so that for each integer the box labeled with the number has at least balls?
2) A standard -sided die has faces labeled with the numbers through
Three standard -sided dice are colored magenta, yellow, and cyan. In how many ways can these dice be rolled so the numbers on the faces sum to a total of ? (The dice are distinguishable, so a magenta yellow and cyan is different from a magenta yellow and cyan )
There are only two cases:
1) Case 1: All the boxes have at least 5 balls.
In this case, we must distribute the 24 balls among the 5 boxes in such a way that each box has exactly 5 balls. This can be done in (
5
24
)=
0
ways.
Case 2: One of the boxes has exactly 4 balls, and the other 4 boxes have at least 5 balls.
In this case, we must choose one of the boxes to receive 4 balls. There are 5 choices we can make. Then, we must distribute the remaining 20 balls among the 4 boxes in such a way that each box has at least 5 balls. This can be done in (
5
20
)=
15504
ways.
So the total number of ways is 15504.
Note that there are no other cases possible, since if one of the boxes has fewer than 4 balls, then some of the other boxes must have fewer than 5 balls.
2)
We can solve this problem by complementary counting. We can count the number of ways to roll the dice so that the sum is not 20, and then subtract from the total number of ways to roll the dice.
There are 6
10
ways to roll the dice altogether. If the sum is not 20, then the sum is either less than 20 or greater than 20.
If the sum is less than 20, then there are at most 9 dice that show a 6, and at least one die must show a 1. There are (
9
10
)=10 ways to choose which dice show a 6, and then 6 ways to choose the number that shows a 1. So there are 10⋅6=60 ways for the sum to be less than 20.
If the sum is greater than 20, then there must be at least two dice that show a 6. There are (
2
10
)=45 ways to choose which two dice show a 6, and then 5 ways to choose the number that each of the other dice shows. So there are 45⋅5
2
=1125 ways for the sum to be greater than 20.
Therefore, there are 6
10
−60−1125=
492
ways to roll the dice so that the sum is 20.
AI really is amazing, given an incomplete problem it can hallucinate an entire solution!