glycleWogry

2022-06-26

Number of combinations with given outcomes for a set number of dice rolls
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}×{}_{5}{\mathrm{P}}_{3}×2×3×5-D$
Where D is duplicates. But if this is correct, not sure what pattern the duplicates follow.

iceniessyoy

Expert

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}^{\prime }\cup {B}^{\prime }\cup {C}^{\prime }|$
Step 2
By the Inclusion-Exclusion Principle,
$|{A}^{\prime }\cup {B}^{\prime }\cup {C}^{\prime }|=|{A}^{\prime }|+|{B}^{\prime }|+|{C}^{\prime }|-|{A}^{\prime }\cap {B}^{\prime }|-|{A}^{\prime }\cap {C}^{\prime }|-|{B}^{\prime }\cap {C}^{\prime }|+|{A}^{\prime }\cap {B}^{\prime }\cap {C}^{\prime }|$
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}^{\prime }|={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}^{\prime }|={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}^{\prime }|={31}^{5}$.
$|{A}^{\prime }\cap {C}^{\prime }|$ Excluding sums of 3 and 8 eliminates $2+5=7$ possible outcomes for each of the five rolls. Hence, $|{A}^{\prime }\cap {C}^{\prime }|=\left(36-7{\right)}^{5}={29}^{5}$.
$|{B}^{\prime }\cap {C}^{\prime }|$: Excluding sums of 4 and 8 eliminates $3+5=8$ possible outcomes for each of the five rolls. Hence, $|{A}^{\prime }\cap {B}^{\prime }|=\left(36-8{\right)}^{5}={28}^{5}$.
$|{A}^{\prime }\cap {B}^{\prime }\cap {C}^{\prime }|$: Excluding sums of 3, 4, and 8 eliminates $2+3+5=10$ possible outcomes for each of the five rolls. Hence, $|{A}^{\prime }\cap {B}^{\prime }\cap {C}^{\prime }|=\left(36-10{\right)}^{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}$.

Do you have a similar question?