Example 4.4.3 Color the six faces of a cube with three colors: red, blue, and green. How many different coloring schemes are there? How many coloring schemes are there if each color appears exactly twice?
Solution: At this point, $D=\{1,2,3,4,5,6\}, R=\{r, b, g\}$.
The following discusses the permutation group $G$ of $D$, which has 24 elements:
(1) The identity permutation type is $1^{6}$, with 1 element;
(2) The permutation type for a $90^{\circ}, 270^{\circ}$ rotation around the axis through the centers of opposite faces is $1^{2} 4^{1}$, with 6 elements; the permutation type for a $180^{\circ}$ rotation is $1^{2} 2^{2}$, with 3 elements;
(3) The permutation type for a $120^{\circ}, 240^{\circ}$ rotation around the axis through opposite vertices is $3^{2}$, with 8 elements;
(4) The permutation type for a $180^{\circ}$ rotation around the axis through the midpoints of opposite edges is $2^{3}$, with 6 elements; thus, 
$$
P_{G}\left(x_{1}, x_{2}, x_{3}, x_{4}, x_{5}, x_{6}\right)=\frac{1}{24}\left(x_{1}^{6}+6 x_{1}^{2} x_{4}+3 x_{1}^{2} x_{2}^{2}+8 x_{3}^{2}+6 x_{2}^{3}\right).
$$
The number of equivalence classes is
$$
\begin{array}{l}
N(G, C)=P_{G}(3,3,3,3,3,3) \\
=\frac{1}{24}\left(3^{6}+6 \times 3^{3}+3 \times 3^{4}+8 \times 3^{2}+6 \times 3^{3}\right)=57, \\
F_{G}\left(\sum_{i=1}^{3} w_{i}, \sum_{i=1}^{3} w_{i}^{2}, \cdots, \sum_{i=1}^{3} w_{i}^{6}\right) \\
=\frac{1}{24}\left[(r+b+g)^{6}+6(r+b+g)^{2}\left(r^{4}+b^{4}+g^{4}\right)+3(r+b+g)^{2}\right. \\
\left.\quad\left(r^{2}+b^{2}+g^{2}\right)^{2}+8\left(r^{3}+b^{3}+g^{3}\right)^{2}+6\left(r^{2}+b^{2}+g^{2}\right)^{3}\right] .
\end{array}
$$

The coefficient of $r^{2} b^{2} g^{2}$ in the above expansion is
$$
\frac{1}{24}\left(\frac{6!}{2!2!2!}+3 \cdot 6+6 \cdot \frac{3!}{1!1!1!}\right)=6 .
$$