In how many ways 5 different balls be distributed to 3 different boxes, when each box can hold any number of balls?

9.7k Views Asked by At

In how many ways $5$ different balls be distributed to $3$ different boxes, when each box can hold any number of balls?

According to me: every ball can go to any of the $3$ boxes So ways of going in the first box $= 3$ In the second box $= 2$ In the third box $=1$ Same for every ball. So answer should be $3!$ ways. Similarly for every ball. So ways must be $3!^5$

According to solution Every ball can go to any of the 3 boxes. So no. of ways will be=$3^5$ way

2

There are 2 best solutions below

0
On

Imagine this as a tree where each node has 3 children and the height of the tree is the number of balls you have.

The choices for the first ball are the children of the first node(the root of the tree). There are 3 options to go from the start (root), so the first node will have 3 children (directions in which it can go). Now imagine each of those 3 children (nodes) as the different situations you could have potentially gotten yourself into. For each of those three cases we will have 3 more cases for the second ball, i.e. $3\times3=9$. Now, having 9 cases for each of those cases you can go on three different paths for the third ball, so the overall number of times becomes $9\times3=27$.

Continuing like that till the $5^{th}$ ball you get $3\times3\times3\times3\times3=3^5$ different scenarios for the positions of the balls.

This is a classic example of permutations with repetitions where the formula is $\tilde V_n^k=k^n$ for $n$ elements (balls) with $k$ choices (boxes).

1
On

What if we phrase it this way...

We have a multiple choice questionnaire. There are five questions Which box does ball X go into? and for each question you can select one answer box A, box B, or box C.

                                    box A   box B   box C
Which box does ball 1 go into?        x
Which box does ball 2 go into?                x
Which box does ball 3 go into?                        x
Which box does ball 4 go into?                        x
Which box does ball 5 go into?                x

There's three possible answers to the first question. Regardless of the answer the answer to the first question, there's three possible answers to the second question. And so on. So we count $3^5$ possibilities.


It would involve factorials (or a falling factorial) if we instead were not allowed to use a box more than once. (It wouldn't work in this case: we have more balls than boxes.)

For example, suppose we changed the problem to: In how many ways can 3 different balls be distributed to 5 different boxes, when each box can hold at most one ball?

Then there will be $5$ ways to place the first ball, $4$ to place the second ball, $3$ to place the third, giving $5 \times 4 \times 3$ ways in total.