# In how many ways can 2 balls be arranged in 5 boxes so that one box does not contain more than one ball?

What is the number of ways 2 balls can be arranged in 5 boxes? The boxes may not contain more than 1 ball. The balls are of different colors.

I forgot to mention the order of the boxes are important. In the sense I the 5 boxes which I have are not identical.. they are of different sizes.

• Are the two balls identical, or can they be distinguished form each other (eg different colour, size or weight)? – Mark Bennet Aug 29 '12 at 23:07

For the first ball there are $5$ places we can put it. After putting the first ball in a box, we have $4$ places where we could put the second ball. Thus there are $5\cdot4=20$ ways.
With your comment, I believe you mean to say that both the boxes and the balls are labelled i.e. distinct. I will use the notation $\{a,b\}$ to mean that ball $1$ is placed in box $a$ and ball $2$ is placed in box $b$. Under this scheme, you can see that the calculation I made above takes into account the fact that $\{a,b\}\neq\{b,a\}$, where $a\neq b$. Thus $20$ should be the answer you are looking for.
• @VIJAYAKULA I'm not sure I know what you mean. This technique takes order into account, meaning that choosing box $5$ and then box $4$ is different than choosing box $4$ and then box $5$. If the order of the boxes doesn't matter, then you just need to divide $20$ by the number of ways of ordering two objects. – Holdsworth88 Aug 30 '12 at 7:19