5

I was wondering what algorithm would compute

S(n, k {occurences of each element})  

Where

S(6, 3, {1, 2, 3} )

would give the total number of ways a set with 6 elements in which 3 are the same element and a different 2 are another element (and 1 is its unique element) could be split into 3 non-empty sets, ignoring permutations.

This is basically the extension of Stirling numbers of the second kind to deal with multisets.

robertkin
  • 223
  • 1
  • 6

0 Answers0