The Stirling numbers of the second kind $S(n,k)$ count the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets.

Here subsets(children) are labelled and objects(Balls) are unlabelled.

Here subsets(children) are labelled and objects(Balls) are unlabelled.