Ways to place 7 balls in 14 boxes.

555 Views Asked by At

How many ways are there to place 7 balls in 14 boxes. Balls are numbered from 1 to 7. One box can contain only one ball. And out of 14 boxes atleast 6 boxes must contain first 6 balls. 7th ball is optional either you may put it in boxes or not.

Please explain how to solve these types of question and what approach should I use. Also if the number of boxes was 1 or 2 or 100 what approach should I use?

2

There are 2 best solutions below

5
On

Assuming the order in which the balls are placed in their respective boxes doesn't matter, you can just use the combinations formula $C_{(n,k)}$,

$$C_{(n,k)}={n! \over k!(n-k)!}$$

In your case $k$ would be the number of balls being placed in the boxes, and $n$ would be the number of boxes.

The restriction that only one ball can be placed in each box simplifies the problem considerably. As for the option of keeping the $k^{th}$ ball and not placing it in any box, the formula could be modified as follows:

$${(n+1)! \over k!((n+1)-k)!}$$

$n$ becomes $n+1$ because the effect of the option of withholding the $k^{th}$ ball is essentially that of adding another box.

This will work for any number of boxes $n \geq 1$ and any number of balls $0 \leq k \leq n+1$.

0
On

We can select the boxes for the first 6 balls in $\binom{14}{6}$ ways,

and then there are $6!$ ways to place the balls in these 6 boxes.

Then for the 7th ball there are 9 options, either keep it or place it in any of the remaining 8 boxes; so

there are $\displaystyle\binom{14}{6}\cdot6!\cdot9=9\left(\frac{14!}{8!}\right)$ ways to do this.


More generally, if we have $k$ numbered balls to be placed in $n$ boxes with the same restrictions,

there are $\binom{n}{k-1}$ ways to choose the places for the first $k-1$ balls,

$(k-1)!$ ways to place the balls in these boxes, and then

$(n-(k-1))+1=n-k+2$ options for the last ball

(since it can either be kept or placed in any of the remaining $n-(k-1)$ boxes);

so there are $\displaystyle\binom{n}{k-1}\cdot(k-1)!\cdot(n-k+2)$ possibilities.