I'm looking for an algorithm that generates all k-combinations of a set, such that each successive combination generated differs as much as possible (or in practice, a lot) from all previous combinations.
For example, given the set {1,2,3,4,5,6}
, I might get something like the following:
{1, 2, 3} {4, 5, 6} {1, 2, 4} {3, 5, 6} {1, 4, 6} {2, 3, 5} {1, 4, 5} {2, 3, 6} {1, 5, 6} {2, 3, 4} {1, 2, 5} {3, 4, 6} {1, 2, 6} {3, 4, 5} {1, 3, 6} {2, 4, 5} {1, 3, 5} {2, 4, 6} {1, 3, 4} {2, 5, 6}
I'm aware that using Gray codes would effectively give me the opposite of what I want... unfortunately, it's not obvious to me how I would be able to reverse the Gray code algorithm to produce something similar to my desired output.
Is there a known algorithm that would suit my needs?