TITLE: distinguishable balls distinguishable boxes where each box contains at least 2 balls
QUESTION [5 upvotes]: Consider $m$ distinguishable balls and $n$ distinguishable boxes where $m > n$ (the boxes and balls are already distinguishable, say they come with preassigned distinct labels).
How many ways are there to distribute the balls into boxes such that each box contains at least $2$ balls?

REPLY [2 votes]: We solve the case of indistinguishable boxes and distinguishable
boxes.  The combinatorial species in the first case is
$$\mathfrak{P}_{=n}(\mathfrak{P}_{\ge 2}(\mathcal{Z}))$$
which gives the EGF
$$G(z) = \frac{(\exp(z)-z-1)^n}{n!}.$$
Extracting coefficients we get
$$m! [z^m] G(z)
= m! [z^m] \frac{(\exp(z)-z-1)^n}{n!}
\\ = \frac{m!}{n!} [z^m] 
\sum_{k=0}^n {n\choose k} (\exp(z)-1)^k (-1)^{n-k} z^{n-k}
\\ = \frac{m!}{n!} 
\sum_{k=0}^n {n\choose k} [z^{m+k-n}] (\exp(z)-1)^k (-1)^{n-k}
\\ = \frac{m!}{n!} \sum_{k=0}^n {n\choose k} (-1)^{n-k} 
\times \frac{k!}{(m+k-n)!} {m+k-n\brace k}
\\ = {m\choose n} \sum_{k=0}^n {n\choose k} (-1)^{n-k} 
\times \frac{k! (m-n)!}{(m+k-n)!} {m+k-n\brace k}
\\ = {m\choose n} \sum_{k=0}^n {n\choose k} (-1)^{n-k} 
\times {m+k-n\brace k} {m+k-n\choose k}^{-1}.$$
We can verify this for some special values like $m=2n$ where we obtain
$$(2n)! [z^{2n}] \frac{(\exp(z)-z-1)^n}{n!}
\\ = (2n)! \frac{1}{n!} \frac{1}{2^n} 
= \frac{1}{n!} {2n\choose 2,2,2,\ldots,2}$$
which is the correct value. We also get
$$(2n+1)! [z^{2n+1}] \frac{(\exp(z)-z-1)^n}{n!}
= (2n+1)! \frac{1}{n!} {n\choose 1} \frac{1}{6} \frac{1}{2^{n-1}}
\\ = \frac{1}{(n-1)!} {2n+1\choose 2,2,2,\ldots,2,3}$$
which is correct as well. One more example is
$$(2n+2)! [z^{2n+2}] \frac{(\exp(z)-z-1)^n}{n!}
\\ = (2n+2)! \frac{1}{n!}
\left({n\choose 1} \frac{1}{24} \frac{1}{2^{n-1}}
+ {n\choose 2} \frac{1}{6^2} \frac{1}{2^{n-2}}\right)
\\= \frac{1}{(n-1)!} {2n+2\choose 2,2,2,\ldots,2,4}
+ \frac{1}{2} \frac{1}{(n-2)!} {2n+2\choose 2,2,2,\ldots 2,3,3}.$$
Finally observe that we get the values for distinguishable boxes by
multiplying by $n!$ because the species now becomes
$$\mathfrak{S}_{=n}(\mathfrak{P}_{\ge 2}(\mathcal{Z})).$$