0

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?

1 Answer 1

0

Here is a meta algorithm:

  • Calculate the values of a6 for n = 0, 1, 2, 3, ...
  • Look up the resulting sequence on https://oeis.org/
  • Check whether the search results match your expectations and if there is a closed-form solution
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the reply, but n only makes sense for 4, 8, 12, 16... and only for 4 and 8 can I calculate the matrix a6, from 12 onwards a4 isn't computable, it would have dimension Binomial[1485,3].
Okay, then you could look up the sequence a6[0], a6[4], a6[8].