# Probability that numbers 1…6 show up at least once when rolling 8 dice

Probability that numbers 1...6 show up at least once when rolling 8 dice

How can this be solved using the inclusion-exclusion principle.

-

1. There are $6^8$ outcomes in total.
2. We subtract the $5^8$ outcomes that avoid "1", the $5^8$ outcomes that avoid "2", ..., the $5^8$ outcomes that avoid "6".
3. Then we have to add back the $4^8$ outcomes that avoid both "1" and "2" as they have been subtracted twice; similarly for all $6\choose 2$ combinations of two avoided numbers.
How did we treat outcomes that avoid three numbers so far? Each such outcome was counted once in (1), subtracted three times in (2), added back ${3\choose2}=3$ times in (3), so the net count is one, which is one too many. Therefore we need to subtract $3^8$ for each of $6\choose 3$ choices of three numbers.
Thus the count of successful outcomes is $6^8-6\cdot 5^8+{6\choose 2}\cdot 4^8-{6\choose 3}3^8\pm\ldots$ (where you still have to fill in how to treat the cases that four or more numbers are avoided). Divide this by the total number $6^8$ to obtain the probability.