[Math] Roll a fair dice 8 times, how many outcomes are there such that every side occurred at least once

combinatoricsprobability

I tried inclusion-exclusion.

There are $6^{8}$ possible outcomes, subtract off those with only 5 outcomes, add those with 4 outcomes… There are $\binom{6}{5}$ ways to choose those with 5 outcomes, $\binom{6}{4}$ to choose those with 4 outcomes…

so the answer is
$\binom{6}{1}^8 – \binom{6}{5}\binom{5}{1}^8+\binom{6}{4}\binom{4}{1}^8-…$

Can someone tell me why this is wrong?

Best Answer

Use inclusion/exclusion principle:

  • Include the number of outcomes with at most $6$ values, which is $\binom66\cdot6^8$
  • Exclude the number of outcomes with at most $5$ values, which is $\binom65\cdot5^8$
  • Include the number of outcomes with at most $4$ values, which is $\binom64\cdot4^8$
  • Exclude the number of outcomes with at most $3$ values, which is $\binom63\cdot3^8$
  • Include the number of outcomes with at most $2$ values, which is $\binom62\cdot2^8$
  • Exclude the number of outcomes with at most $1$ values, which is $\binom61\cdot1^8$

So the total number of desired outcomes is:

$$\binom66\cdot6^8-\binom65\cdot5^8+\binom64\cdot4^8-\binom63\cdot3^8+\binom62\cdot2^8-\binom61\cdot1^8=191520$$