Stirling Number of the Second Kind

Stirling Number of the Second Kind counts the number of way a set of $$N$$ elements can be partitioned into $$K$$ nonempty sets.

Stirling Number of the Second Kind can be computed by:

$$S(n,k) = \frac{1}{k!} \Sigma_{i=0}^{k-1} (-1)^i (_i^k)(k-i)^n$$

or the recurrences:

$$S(n,k) = S( n - 1, k - 1 ) + k S( n - 1, k )$$

$$S(n,k) = \Sigma_{m=k}^n k^{n-m} S( m - 1, k - 1 )$$