Wikipedia:Reference desk/Archives/Mathematics/2021 June 29

= June 29 =

Number of ways to split N people into k groups of at least m
(Inspired by the random number game above.)

The number of ways to partition N elements among exactly k sets is the Stirling number of the second kind. What if I impose that each set must be at least of size m? (For bonus points: what if it must be at least of size m, and at most of size M?)

I thought of the following recursion: denoting that number by $$P_m(N, k)$$, look over all possible sizes j of the group in which the first element is, then we must group j-1 other elements among the rest with it, and we have $$P_m(N-j, k-1)$$ ways to arrange the rest. You need to fix the first element in the group you split off, otherwise different sequences of splits might lead to the same final partition and you would have multiple counting. Hence $$P(N, k, m) = \sum_{j=m}^{N-m} C(j-1, N-1) P_m(N-j, k-1)$$. The initialisation is fairly trivial: $$P_m(N, 1)$$ is 0 if NClick here for my talk page ("private" contact) 12:48, 29 June 2021 (UTC)
 * See associated Stirling numbers for your first question.--2406:E003:855:9A01:B15B:27D4:E79:599E (talk) 14:54, 29 June 2021 (UTC)