Example 4-24 Use two colors to color the 6 faces and 8 vertices of a cube. How many different schemes are there?
A rotation that makes them consistent is considered a coloring scheme.
For the permutation group $G$ of the 6 faces of a cube, the cycle index polynomial of $G$ is:
$$
P(G)=S_{1}^{6}+6 S_{1}^{2} S_{4}+3 S_{1}^{2} S_{2}^{2}+6 S_{2}^{3}+8 S_{3}^{2}
$$

For the permutation group $H$ of the 8 vertices of the cube, the cycle index polynomial of $H$ is:
$$
P(H)=S_{1}^{8}+6 S_{4}^{2}+9 S_{2}^{4}+8 S_{1}^{2} S_{3}^{2}
$$

This example can be seen as a rotation permutation of 14 elements, which are the 8 vertices and 6 faces of the cube. The number of elements in the group $\bar{G}$ is still 24. However, the format of the group $\bar{G}$, for example, the identity element is $S_{1}^{14}$. A rotation of $\pm 90^{\circ}$ through the center of opposite faces should be $S_{1}^{2} S_{4} \cdot S_{4}^{2}$, and there are six such rotations.
Similarly,
$$
P(\bar{G})=\frac{1}{24}\left\{S_{1}^{6} \cdot S_{1}^{8}+6 S_{1}^{2} S_{4} S_{4}^{2}+3 S_{1}^{2} S_{2}^{2} S_{1}^{4}+6 S_{2}^{3} S_{2}^{4}+8 S_{3}^{2} S_{1}^{2} S_{3}^{2}\right\}
$$

The number of distinct equivalence classes is
$$
\begin{aligned}
& \frac{1}{24}\left\{2^{14}+6 \cdot 2^{5}+3 \cdot 2^{8}+6 \cdot 2^{7}+8 \cdot 2^{6}\right\} \\
= & \frac{1}{24}\{16384+192+768+768+512\}=18624 / 24=776
\end{aligned}
$$
(2) $G \times H$ acts on $X \times Y$, i.e., $(g, h)$ acts on $(x, y)$ such that $(g, h)(x, y)=(g x, h y), \forall x \in X$, $\forall y \in Y$. Similarly, $(g, h)\left(g^{\prime}, h^{\prime}\right)=\left(g g^{\prime}, h h^{\prime}\right)$.
The order of the group $G \times H$ is $|G||H|$.
If there exist $k$ and $l_{1}$ such that $x \in X, y \in Y$, and $g^{k} x=x, h^{l} y=y$. Let $M=l_{c m}\{k, l\}$, then $g^{M} x=x$, $h^{M} y=y$, and $M$ is the smallest value of $\alpha$ such that $g^{a} x=x, h^{a} y=y$ holds. Therefore, the element $(x, y)$ is an $M$-cycle in $X \times Y$. The number of such $M$-cycles is
$$
m=\frac{k \times l}{M}=\operatorname{gcd}\{k \cdot l\}
$$

Let $X=\{1,23\}, Y=\{4,5\}$.
For $G$:
$$
\begin{array}{l}
g_{1}=(1)(2)(3), g_{2}=(123), g_{3}=\left(\begin{array}{ll}
1 & 2
\end{array}\right), \\
g_{4}=(1)(23), g_{5}=(2)(13), g_{6}=(3)(12) . \\
H: \\
h_{1}=(4)(5), h_{2}=(45) . \\
X \times Y=Z: \\
z_{1}=(1,4), z_{2}=(1,5), z_{3}=(2,4), \\
z_{4}=(2,5), z_{5}=(3,4), z_{6}=(3,5) . \\
G \times H=A: \\
a_{1}=\left(g_{1}, h_{1}\right), a_{2}=\left(g_{1}, h_{2}\right), a_{3}=\left(g_{2}, h_{1}\right), a_{4}=\left(g_{2}, h_{2}\right), \\
a_{5}=\left(g_{3}, h_{1}\right), a_{6}=\left(g_{3}, h_{2}\right), a_{7}=\left(g_{4}, h_{1}\right), a_{8}=\left(g_{4}, h_{2}\right), \\
a_{9}=\left(g_{5}, h_{1}\right), a_{10}=\left(g_{5}, h_{2}\right), a_{11}=\left(g_{6}, h_{1}\right), a_{12}=\left(g_{6}, h_{2}\right) .
\end{array}
$$

Under the action of $A$, $Z$ has:
$$
\begin{array}{l}
a_{1}:\left(z_{1}\right)\left(z_{2}\right)\left(z_{3}\right)\left(z_{4}\right)\left(z_{5}\right)\left(z_{6}\right), \\
a_{2}:\left(z_{1} z_{2}\right)\left(z_{3} z_{1}\right)\left(z_{5} z_{6}\right), \\
a_{3}:\left(z_{1} z_{3} z_{5}\right)\left(z_{2} z_{4} z_{6}\right), \\
a_{4}:\left(z_{1} z_{4} z_{5} z_{2} z_{3} z_{6}\right), \\
a_{5}:\left(z_{1} z_{5} z_{3}\right)\left(z_{2} z_{6} z_{4}\right), \\
a_{6}:\left(z_{1} z_{6} z_{3} z_{2} z_{5} z_{4}\right), \\
a_{7}:\left(z_{1}\right)\left(z_{2}\right)\left(z_{3} z_{5}\right)\left(z_{4} z_{6}\right), \\
a_{8}:\left(z_{1} z_{2}\right)\left(z_{3} z_{6}\right)\left(z_{4} z_{5}\right), \\
a_{9}:\left(z_{1} z_{5}\right)\left(z_{2} z_{6}\right)\left(z_{3}\right)\left(z_{4}\right), \\
a_{10}:\left(z_{1} z_{6}\right)\left(z_{2} z_{5}\right)\left(z_{2}\right)\left(z_{4}\right), \\
a_{11}:\left(z_{1} z_{3}\right)\left(z_{2} z_{4}\right)\left(z_{5}\right)\left(z_{6}\right), \\
a_{12}:\left(z_{1} z_{4}\right)\left(z_{2} z_{3}\right)\left(z_{5} z_{6}\right) .
\end{array}
$$
$$
P(G \times H)=\frac{1}{12}\left\{S_{1}^{6}+2 S_{6}+3 S_{1}^{2} S_{3}^{2}+4 S_{2}^{3}+2 S_{3}^{2}\right\}
$$