<s>[INST] In how many ways can $6$ prizes be distributed among $4$ persons such that each one gets at least one prize? My understanding:
First select $4$ prizes and distribute it among the $4$ people in $^6C_4\times4!$ ways and then distribute the remaining $2$ prizes in two cases: when $2$ people have $2$ prizes: $\frac{4!}{2!}$ways or when one person has $3$ prizes: $4$ ways. So totally: $^6C_4\times4!\times( \frac{4!}{2!}+4)$ ways $= 5760$ ways.
However the answer is $1560$ ways.
How?
 [/INST] We can also count this using a generating function approach.
Since the prizes are not identical, we compute the exponential generating function. To remove the possibility of anyone getting no prizes we use $e^x-1$ in each factor. The number of ways to distribute $6$ prizes among $4$ people is
$$
\begin{align}
6!\left[x^6\right]\left(e^x-1\right)^4
&=6!\left[x^6\right]\left(\binom44e^{4x}-\binom43e^{3x}+\binom42e^{2x}-\binom41e^{x}+\binom{4}{0}\right)\\
&=6!\left(\binom44\frac{4^6}{6!}-\binom43\frac{3^6}{6!}+\binom42\frac{2^6}{6!}-\binom41\frac{1^6}{6!}+\binom40\frac{0^6}{6!}\right)\\
&=\binom444^6-\binom433^6+\binom422^6-\binom411^6+\binom400^6\\[6pt]
&=1560
\end{align}
$$
</s>