I have n elements that need to be partitioned into x sets, each set has to hold exactly k=4 elements.
I need to find all possible partitions with the constraint that each pair of elements only shares the same set once.
So if I start with [1 2 3 4] [5 6 7 8] [...], all consecutive partitions cannot hold e.g. [1 2 X X] or [X X 1 3]. sets are unordered.
Close to this problem are the stirling numbers of the second kind. However, they only solve the problem for arbitrarily sized sets.
Example: I have 32 mice that can be put in 8 cages, 4 per cage. The mice should be rotated between the cages in a fashion that they never meet another mouse twice. How often can you do this and what are the configurations?