Example 7.16 Use red and blue colors to paint the 6 faces of a cube, with each face painted one color. Find the number of distinct patterns of the painted cube where the number of red faces is 3.
Let $A$ denote the set of the 6 faces of a cube, and let $a$ and $b$ represent red and blue, respectively. Let $B=\{a, b\}$. Assign the weight $w(a)=x$ and $w(b)=1$. Then, a face coloring of the cube is a mapping from $A$ to $B$, and the weight of any face-colored cube can be expressed as $x^{k}(0 \leqslant k \leqslant 6)$, where $k$ is the number of red faces in the face-colored cube. Let $(G, \circ)$ denote the face permutation group induced by the rotation group of the cube. Since the cycle index of $(G, \circ)$ is
$$
P_{G}\left(x_{1}, x_{2}, \cdots, x_{6}\right)=\frac{1}{24}\left(x_{1}^{6}+8 x_{3}^{2}+6 x_{2}^{3}+3 x_{1}^{2} x_{2}^{2}+6 x_{1}^{2} x_{4}\right),
$$

and
$$
\sum_{b \in B}[w(b)]^{k}=1+x^{k} \quad(k=1,2, \cdots, 6),
$$

by Polya's Theorem, the sum of the weights of the $G$-orbits of $B^{A}$ is
$$
\begin{array}{l}
P_{G}\left(1+x, 1+x^{2}, \cdots, 1+x^{6}\right) \\
= \frac{1}{24}\left[(1+x)^{6}+8\left(1+x^{3}\right)^{2}+6\left(1+x^{2}\right)^{3}+\right. \\
\left.3(1+x)^{2}\left(1+x^{2}\right)^{2}+6(1+x)^{2}\left(1+x^{4}\right)\right] \\
= 1+x+2 x^{2}+3 x^{3}+2 x^{4}+x^{5}+x^{6},
\end{array}
$$

Therefore, the number of distinct face-colored cubes with 3 red faces is 3.