## Unique order independent combinations from rolling dice

June 25, 2013

I was interested in calculating some probabilities for a dice game. The game has 6 identical dice that are rolled from a cup i.e the order the dice are in does not matter. I pre-calculated probabilities and wanted to make sure I got them all. How many different  combinations result from 6 dice?

If the order the dice fell onto the table mattered or if the dice were all colored distinctly there would be 6^6 combinations which is 46,656. However, since rolling 1,2,3,4,5,6 is equivalent to rolling 6,5,4,3,2,1 there must be less than that. A few lines of ruby code told me that there are only 462 unique combinations. Much less.

I thought there should be a general solution so I searched the internet. I didn’t find anything right away so I got out some paper and came up with: • n: the number of dice
• s: the side count of each die

If there’s an easier way to express this please let me know. Below are some examples to test the formula.

• d( 2, 2 ) = 3 (flipping 2 coins is head/head, tail/head or tail/tail)
• d( 2, 3 ) = 6
• d( 1, 6 ) = 6 (rolling one die)
• d( 2, 6 ) = 21
• d( 3, 6 ) = 56
• d( 4, 6 ) = 126
• d( 5, 6 ) = 252
• d( 6, 6 ) = 462

(The first term in the sum above is always 1. Do not forget that 0! is 1.)