Reputation:
In Mathematica I implemented this simple code:
n = 8;
a0 = Range[0, n - 1];
a1 = Subsets[a0, {2}];
a2 = Subsets[a1, {2}];
a3 = Select[a2, Length[Union[Flatten[#]]] == 4 &];
a4 = Subsets[a3, {n/4}];
a5 = Select[a4, Length[Union[Flatten[#]]] == n &];
a6 = Map[Flatten, a5, 1];
where n
can take values such as 4, 8, 12, 16, ...
The problem is that already with n = 12
, you don't get anywhere, because the size of a4
becomes huge. What algorithm could be used to obtain a6
directly from a0
or n
?
Upvotes: 0
Views: 32
Reputation: 23250
Here is a meta algorithm:
a6
for n
= 0, 1, 2, 3, ...Upvotes: 0