issue in figuring out how to calculate probability A fair, 6-sided die is rolled 6 times independently. Assume that the results of the different rolls are independent. Let $(a_1,\ldots,a_6)$ denote a typical outcome, where each $a_i$ belongs to $\{1,\ldots,6\}$.
For any outcome $\omega=(a_1,\ldots,a_6)$, let $R(\omega)$ be the set $\{a_1,\ldots,a_6\}$; this is the set of numbers that showed up at least once in the different rolls. For example, if $\omega=(2,2,5,2,3,5)$, then $R(\omega)=\{2,3,5\}$.
Find the probability that $R(\omega)$ has exactly two elements. (Answer with at least 3 decimal digits.)
Find the probability that $R(\omega)$ has exactly three elements.
can anyone clarify or make hints for answer
 A: Part 1.
We can do this by counting the number of sequences $(a_1,\ldots, a_6)$ which have $\#R = 2$. There are $\binom{6}{2} =15$ different ways to choose $R$ so that it contains two elements.
Lets fix the elements of $R = \{1,2\}$. We want to count the number of sequences $(a_1,\ldots, a_6)$ with all entries either $1$ or $2$, and at least one of each. We do this by fixing the number of $1$s. Let $j \in \{1,\ldots, 5\}$ be the number of $1$s, and $6-j \in \{1,\ldots, 5\}$ the number of 2s. Given $j$, there are $\binom{6}{j}$ possible orderings. Hence the total number of admissible sequences is $$ \sum_{j=1}^5 \binom{6}{j} = 2^6-2 = 62.$$
Now taking into account all the possible choices of labels, which we calculated as being $30$, we have that there are $15 \times 62 =930$ possible sequences with $R=2$. Since there are $6^6$ sequences in total, the probability is
$$ 930/6^6 = 0.0199$$
The case for your second question can be solved in a similar way, which should now be clear.
A: If $R(\omega)$ has exactly two elements, then it belongs to $\omega$ which are permutations of either $(a, a, a, a, a, b), (a, a, a, a, b, b),$ or $(a, a, a, b, b, b)$ where $a, b \in \{1, 2, 3, 4, 5, 6\},$ and $a\neq b$.
How many permutations of these patterns are there, and how many ways are there to select different numbers, $a, b$?  (Warning: be careful of over counting in the case of having three of each number.)

An alternative way to count these permutations is to: count ways select two digits, multiply by the count ways each dice can be one or other but not including ways they are all the same. $$\binom{6}{2} (2^6-2)$$
