# All possibile combinations for certain number of boxes and numbers

I need to find out the formula to calculate the number of all possible combinations for the following scenario:

There are 5 boxes. And there are numbers from 0 to 9. For each combination, 3 boxes will be empty, while the other 2 boxes will contain a number.

This will generate a lot of combination. But Im not really sure how you would do this. Im not sure if this is about permutations or combinatorics. And Im not sure if the formula could be:

Number of boxes elevated to Number of numbers.

• Just to be sure, you're counting the number of ways in which $3$ of the $5$ boxes are empty, and the other $2$ each contain a number from $0$ to $9$? Mar 9, 2016 at 20:17
• Exactly. Each combination will contain 3 empty boxes and 2 "integers". Mar 9, 2016 at 20:21

You pick the occupied boxes in $5 \choose 2$ ways, the first number in $10$ ways and the second in $9$ ways (assuming you can't repeat numbers) . Multiply them all together and you are done.
The number of ways that we can choose 2 boxes to contain numbers in 5 is $\binom {5}{2}=10$. (Note that this is the same as the number of ways to choose 3 boxes to not contain numbers. That is $\binom {5}{3}= \binom {5}{2}= 10$). We then have $10 \cdot 10$ ways to choose the numbers for the two boxes that have them. This gives us a total of $$10 \cdot 10 \cdot 10 = 10^3 = 1000$$ combinations.