# Thread: Ways to roll 6 dice such that there are exactly 4 unique numbers?

1. ## Ways to roll 6 dice such that there are exactly 4 unique numbers?

This one has me stumped. I've written a monte-carlo simulator, and probability of rolling such a combination is something like 50.1%

My thinking is that there are C(6, 4)=15 ways to have 4 unique numbers, and for each of these there are C(6+4-1, 6)=84 ways to have 6 dice land on these numbers. but this gives 1260 ways, which is completely unreasonable when there are C(6+6-1,6)=462 ways to roll 6 dice.

I just can't wrap my brain around this one. Any ideas?

2. Im not sure what you mean by "4 unique numbers"

either
"a total of 4 different numbers appear in the set of 6" (eg 112234)

or
"a total of 4 numbers appear 1 time, and one other number occurs twice" (eg 123455)

3. Here is a different approach..

I interpreted the question as: you roll 6 dice, and there are exactly four of {1,2,3,4,5,6} represented among what is rolled.

So it's either in the form {a,b,c,d,a,a} or {a,b,c,d,a,b}.

Like you said we have C(6,4) ways to get {a,b,c,d}

For {a,b,c,d,a,a}, there are 4 ways to choose "a" and then $\displaystyle \binom{6}{3,1,1,1}=\frac{6!}{3!}$ ways to permute.

For {a,b,c,d,a,b} we have C(4,2) ways to choose {a,b} and $\displaystyle \binom{6}{2,2,1,1}=\frac{6!}{2!2!}$ ways to permute.

So it's C(6,4) * ( C(4,1) * 6!/3! + C(4,2) * 6!/2!/2! ) ways, and divide that by 6^6. This comes to 325/648.