Stirling Number of the Second Kind (intuition for formula)

1k Views Asked by At

The Stirling number of the second kind is the way of putting $n$ objects into $k$ nonempty boxes. I would like to understand the right hand side of this equation by a counting argument $$S(n,k) = \frac{1}{k!} \sum_{i=0}^k(-1)^{i}\binom{k}{i}(k-i)^n$$

1

There are 1 best solutions below

0
On BEST ANSWER

\begin{align*} S(n,k) &= \frac{1}{k!} \sum_{i=0}^k(-1)^{i}\binom{k}{i}(k-i)^n \\ &= \frac{1}{k!}\left(k^n -\binom{k}{1}(k-1)^n \ldots (-1)^i\binom{k}{i}(k-i)^n \ldots \right) \end{align*} The first term, $k^n$, counts the number of ways of putting $n$ items into $k$ boxes when some of the boxes can be empty. We've double counted these boxes so subtract the number of ways of placing $n$ objects into $k-1$ boxes (this is the second term), now we've double counted the number of ways of placing $n$ objects into $k-2$ boxes and so forth using inclusion-exclusion as mentioned in comments.