[Math] Number of possible outcomes in which at least one die shows $5$

combinatoricspermutations

Three dice are rolled. Find the number of possible outcomes in which at least one die shows $5$.

Now total outcomes are $6^3$. Now I have to add three cases such as one die shows $5$ out of $3$ dice + $2$ dice show $5$ out of $3$ + all dice shows $5$. How do I proceed for individual case?

Thanks

Best Answer

Here is another approach that seems to work. Represent each die by a generating function (i.e. polynomial)

Since on each die there is only 1 outcome you want, a 5, there are five other outcomes you don't want. Call the outcomes you want y, and those you don't want x. The generating function for each die would then be $f(die)=5x+y$

Now multiply these functions to get the various outcomes:

$f(die1)*f(die2)*f(die3) = 125x^2 + 75x^2y + 15xy^2 + 1y^3$

You can read off the coefficients to see there are 125 permutations with no 5's rolled; 75 with just one 5 rolled (the coefficient to the y containing term), 15 with just two 5's rolled (the coefficient to the $y^2$ containing term) and only one roll with three 5's.

caveat my background in this area of math is very limited, so could be wrong that this approach can be generalized. I've no source for this approach except just noodling on it and tested it on simple cases.