Example 3-4 Find the number of permutations of the 6 characters $a, b, c, d, e, f$ that do not contain the patterns $a c e$ and $d f$.

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
$S$ is the set of all permutations composed of these 6 characters, $|S|=6!$. The question is to use the pattern of equation (3-3), where $A_{1}$ is the permutation where the ace image appears, i.e., ace as a unit participates in the full permutation, $\left|A_{1}\right|=4!, A_{2}$ is the permutation where $d f$ as a unit participates, $\left|A_{2}\right|=5!$. The permutations that do not allow the ace and $d f$ images are $\bar{A}_{1} \cap \bar{A}_{2}$, according to equation (3-3)
$$
\left|\bar{A}_{1} \cap \bar{A}_{2}\right|=6!-(5!+4!)+3!=720-(120+24)+6=582
$$