# (probably easy) Combinatorics problem

1. Jan 18, 2014

### Nikitin

1. The problem statement, all variables and given/known data
n dices are thrown. In how many ways can you get an m (<=n) amount of fives?
3. The attempt at a solution

Well, I thought since you can organize the 5s in m! ways, and for each such permutation you can organize the remaining dice rolls in $5^{n-m}$ ways, the solution must be $m! \cdot 5^{n-m}$, or alternatively $\frac{m! \cdot 5^{n-m}}{n!}$ if the order is irrelevant.

EDIT: It seems I am completely wrong, as I get decimals for answers when I try out my formulas. Can somebody please help me? is the answer perhaps simply $1^m 5^{n-m}$?

Last edited: Jan 18, 2014
2. Jan 18, 2014

### Dick

m out of the n dice must be 5's. So how many ways can you choose m things out of n things? There is no 'ordering' among the 5's. They are all identical. Then you count the number of outcomes for the remaining n-m dice that aren't 5's. I would do it assuming order matters. Otherwise, it's a whole different kind of problem and you don't get the answer by just dividing by n!.

3. Jan 18, 2014

### Nikitin

(n choose m) ways.

Is the answer perhaps $\frac{n!}{(n-m)! \cdot m!}$?

And how can you solve this if order doesn't matter? If the order didn't matter, wouldn't there only be one unsorted permutation (i.e. what kind of numbers (1 to 6) and how many)?

4. Jan 18, 2014

### Dick

Yes, (n choose m) is the ways to select the 5's. You do have to multiply by possible outcomes from the other dice. And, yes, if you don't count order it's just the number ways to split the n-m dice that are not 5 into different sized groups with values in (1,2,3,4,6).