Let's assume that A = {1,2,3,4,5,6}.
3 numbers are selected from A in a repeated manner. Therefore, there are 6x6x6=216 possibilities which are;
111,112,113,...,166,
211,212,213,...,266,
311,312,313,...,366,
411,412,413,...,466,
511,512,513,...,566,
611,612,613,...,666.
How many of them contain 2 AND 5 ?
When calculated manually, the result is 30. However, how to get 30 by calculating with permutation and combination?
For this type of questions, I want to extract a general formula with permutation and combination.
Thanks in advance.
Note that there are 6 ways to choose the placement of the roll of 2 and 5 among the three rolls, and there are 6 choices for the remaining rolls. Hence, there are a total of 36 possibilities.
However, we have overcounted the case when the third roll is either 2 or 5. Note that if the third roll is 2, there are 3 possibilities of how to arrange the three rolls, as is the case when the third roll is 5.
Hence, our answer is $36-3-3=30$.