Number of combinations with given outcomes for a set number of dice rolls

combinatoricsdicediscrete mathematics

How to find the number of combinations for n rolls of a pair of 6-sided dice with all of the specified sums rolled at least once?

Example. A pair of 6-sided dice is rolled 5 times. What is the number of combinations containing each of: 3, 4, 8 at least once? So that (3, 7, 8, 5, 4) is counted and (3, 4, 2, 2, 12) is not.

Thoughts on the example. It's possible to roll 3 in 2 ways, 4 in 3 and 8 in 5 and the total number of outcomes is 36. So I think the number of combinations containing 3, 4, 8 is:
$$ C = 36^2 \times {}_5 \mathrm{ P }_3 \times 2 \times 3 \times 5 – D $$
Where D is duplicates. But if this is correct, not sure what pattern the duplicates follow.

Best Answer

One way to address your problem is to use the Inclusion-Exclusion Principle, which will allow us to avoid doing case work. Let's look at your example.

Since there are $36$ possible outcomes for each roll of a pair of six-sided dice, there are $36^5$ possible outcomes for five rolls of a pair of dice. From these, we must exclude those outcomes in which a sum of $3$, a sum of $4$, or a sum of $8$ is missing. We want to find $$|A \cap B \cap C| = 36^5 - |A' \cup B' \cup C'|$$ By the Inclusion-Exclusion Principle, $$|A' \cup B' \cup C'| = |A'| + |B'| + |C'| - |A' \cap B'| - |A' \cap C'| - |B' \cap C'| + |A' \cap B' \cap C'|$$ You observed that there are two ways to obtain a sum of $3$, three ways to obtain a sum of $4$, and five ways to obtain a sum of $8$.

$|A'|$: Since there are two ways to obtain a sum of $3$, there are $36 - 2 = 34$ ways to not obtain a sum of $3$ on each of the five rolls. Hence, $|A'| = 34^5$.

$|B'|$: Since there are three ways to obtain a sum of $4$, there are $36 - 3 = 33$ ways to not obtain a sum of $4$ on each of the five rolls. Hence, $|B'| = 33^5$.

$|C'|$: Since there are five ways to obtain a sum of $8$, there are $36 - 5 = 31$ ways to not obtain a sum of $8$ on each of the five rolls. Hence, $|B'| = 31^5$.

$|A' \cap B'|$: Excluding sums of $3$ and $4$ eliminates $2 + 3 = 5$ possible outcomes for each of the five rolls. Hence, $|A' \cap B'| = (36 - 5)^5 = 31^5$.

$|A' \cap C'|$: Excluding sums of $3$ and $8$ eliminates $2 + 5 = 7$ possible outcomes for each of the five rolls. Hence, $|A' \cap C'| = (36 - 7)^5 = 29^5$.

$|B' \cap C'|$: Excluding sums of $4$ and $8$ eliminates $3 + 5 = 8$ possible outcomes for each of the five rolls. Hence, $|A' \cap B'| = (36 - 8)^5 = 28^5$.

$|A' \cap B' \cap C'|$: Excluding sums of $3$, $4$, and $8$ eliminates $2 + 3 + 5 = 10$ possible outcomes for each of the five rolls. Hence, $|A' \cap B' \cap C'| = (36 - 10)^5 = 26^5$.

By the Inclusion-Exclusion Principle, the number of outcomes in which sums of $3$, $4$, and $8$ all appear when five dice are rolled is $$36^5 - 34^5 - 33^5 - 31^5 + 31^5 + 29^5 + 28^5 - 26^5$$