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?
This is an instance of the “social golfer problem.” Warwick Harvey used to have a page (http://www.cs.st-andrews.ac.uk/~wh/golf/) with a bunch of solutions for different problem sizes, but it seems to be down. The answer in your case turns out to be 10 rotations, but I don’t know what the actual configurations are. Here is a 9-rotation solution, though: http://www.cs.st-andrews.ac.uk/~ianm/CSPLib//prob/prob010/solution
It is an unsolved problem for general n and k.