Example 2-33 Put $n$ labeled balls into $m$ distinct boxes, with no box empty. How many different ways are there to do this?
Equivalent to taking $n$ elements from $m$ labeled characters for a permutation with repetition allowed, the number of such permutations is $a_{n}$, and the exponential generating function of the sequence $\left\{a_{n}\right\}$ is
$$
\begin{aligned}
G_{\mathrm{e}}(x)=\left(x+\frac{x^{2}}{2!}+\frac{x^{3}}{3!}+\cdots\right)^{n} & =\left(\mathrm{e}^{x}-1\right)^{n}=\sum_{k=0}^{n}\binom{n}{k}\left(\mathrm{e}^{x}\right)^{n-k}(-1)^{k} \\
& =\sum_{k=0}^{n}\left[\binom{n}{k} \sum_{m=0}^{\infty} \frac{(n-k)^{m}}{x} \frac{x^{m}}{m!}\right](-1)^{k} \\
& =\sum_{m=0}^{\infty}\left[\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}(n-k)^{m}\right] \frac{x^{m}}{m!}
\end{aligned}
$$

Therefore,
$$
a_{m}=\sum_{k=0}^{n}(-1)^{k}\binom{n}{k}(n-k)^{m}
$$