Example 3-12 In the permutations of 4 $x$s, 3 $y$s, and 2 $z$s, find the number of permutations that do not contain the patterns $x x x x$, $y y y$, and $z z$. Let $A_{1}$ be the class of permutations of 9 characters where the pattern $x x x x$ appears, $A_{2}$ be the class where the pattern $y y y$ appears; and $A_{3}$ be the class where the pattern $z z$ appears.
4 $x$'s appearing simultaneously in a permutation, actually treating $x x x x$ as a single unit participating in the permutation, considering $y$ appears 3 times and 2 times, hence
$$
\left|A_{1}\right|=\frac{6!}{3!2!}=60
$$

Similarly,
$$
\begin{array}{l}
\left|A_{2}\right|=\frac{7!}{4!2!}=105, \quad\left|A_{3}\right|=\frac{8!}{4!3!}=280 \\
\left|A_{1} \cap A_{2}\right|=\frac{4!}{2!}=12, \quad\left|A_{1} \cap A_{3}\right|=\frac{5!}{3!}=20 \\
\left|A_{2} \cap A_{3}\right|=\frac{6!}{4!}=30, \quad\left|A_{1} \cap A_{2} \cap A_{3}\right|=3!=6
\end{array}
$$
The number of different permutations of 4 $x$'s, 3 $y$'s, and 2 $z$'s is $\frac{9!}{4!3!2!}=1260$, the solution to the problem is
$$
\begin{aligned}
\left|\bar{A}_{1} \cap \bar{A}_{2} \cap \bar{A}_{3}\right|= & \frac{9!}{4!3!2!}-\left(\left|A_{1}\right|+\left|A_{2}\right|+\left|A_{3}\right|\right) \\
& +\left(\left|A_{1} \cap A_{2}\right|+\left|A_{1} \cap A_{3}\right|+\left|A_{2} \cap A_{3}\right|\right)-\left|A_{1} \cap A_{2} \cap A_{3}\right| \\
= & 1260-(60+105+280)+(12+20+30)-6 \\
= & 1260-445+62-6=871
\end{aligned}
$$