Example 3-5 Find the number of n-bit strings formed by the 4 characters $a, b, c, d$, where $a, b, c$ appear at least once.
$a, b, c$ at least appear once, the opposite event is that $a, b, c$ do not appear. Let $A_{1}, A_{2}, A_{3}$ be the events that $a, b, c$ do not appear in an $n$-digit string, respectively. $S$ is the set of all $n$-digit strings composed of $a, b, c, d$.
$$
\begin{array}{c}
\left|A_{1}\right|=\left|A_{2}\right|=\left|A_{3}\right|=3^{n} \\
|S|=4^{n} \quad\left|A_{i} \cap A_{j}\right|=2^{n}, \quad i \neq j, i, j=1,2,3 \\
\left|A_{i} \cap A_{j} \cap A_{k}\right|=1 \\
\left|\bar{A}_{1} \cap \bar{A}_{2} \cap \bar{A}_{3}\right|=4^{n}-3 \cdot 3^{n}+3 \cdot 2^{n}-1
\end{array}
$$