Number of ways to distribute balls in three out of five boxes

164 Views Asked by At

Given 10 distinguishable balls and 5 distinguishable boxes (such that the boxes can be numbered 1 through 5):

  1. How many ways are there to distribute the balls so that all the balls are strictly in the boxes in the set {1,2,3}?

  2. Likewise, how many ways can the balls be distributed to boxes 1 through 3 such that no single box in this set remains empty.

What is very confusing here is that there are 5 distinguishable boxes in total, and the question strictly asks about three. Given 10 balls, I have no clue how to approach this.

3

There are 3 best solutions below

1
On

The first question is the same as distributing 10 different balls in 3 different boxes, which is $3^{10}$.

For the second question, if no single box in this set is empty, then by the principle of inclusion and exclusion, we have $$N = 3^{10} - \binom{3}{1}2^{10} + \binom{3}{2}$$ Where the first term is the number of ways of distributing balls subject to no constraints, the second term is the number of ways of distributing such that atleast one box is empty and third term is number of ways of distributing such that two boxes are empty.

1
On

HINT: In the first question you simply have a $3$-way choice for each of the $10$ balls: it’s like asking how many $10$-digit numbers there are that use only the digits $1,2$, and $3$ but don’t have to use all of them.

For the second question I would start with the answer to the first question and subtract the number of arrangements that have all $10$ balls in just one or two of the boxes: it’s an inclusion exclusion problem.

0
On

In the first question, each such placement corresponds to a string of length $10$ over the alphabet $\{1,2,3\}$. The $i$th letter is the label of the box where the $i$th ball is put. So there are 3 choices for each of $10$ letter, for the total of $3^{10}$.

The restriction in the second question, but with indistinguishable boxes, is just the definition of the Stirling numbers of the second kind. Let $S(n,k)$ be the number of ways to putting $n$ distinguishable balls into $k$ nonempty indistinguishable boxes. Making boxes distinguishable is just labeling them with numbers $1,2,\dots,k$, so there are $k!$ ways to do that. So the answer with distinguishable boxes is $k!S(n,k)$. In this case, we have $n=10$ and $k=3$.

Also check out the Twelvefold Way and look at formulas in row $1$, columns $1$ and $3$.