Partitioning numbers 1 to 16 into four groups each having four numbers such that each tallies the same

42 Views Asked by At

'''The question was to partition 1 to 16 numbers into four groups such that each group consists of four numbers and each group tallies the same. Finding one such solution is easy but what is bothering me now is how many different such solutions are possible for this question.'''

My try : I made following eight pairs: $(1,16),(2,15),(3,14),(4,13),(5,12),(6,11),(7,10),(8,9) $

Now if you pick any two pairs, that will form one group of four numbers summing to 34. So, making four groups, each having any two pairs from above will give us " $ ^8C_2.^6C_2.^4C_2.^2C_2$ " = 2520 different solutions.

But clearly this are not all solutions. Because ($\{4,5,10,15\},\{3,7,11,13\},\{2,6,12,14\},\{1,8,9,16\}$) is also one such solution which will not get covered in above 2520 ways as numbers 3 and 14 are always in one group there , which is not the case with this particular solution.

I am stuck. Any hint to proceed. Thanks.

3

There are 3 best solutions below

5
On

Enumerating all solutions is an exact cover problem where the rows represent possible sets that sum to $34$. We can use Knuth's Algorithm X to find all the solutions; I count $392$ of them by this method, up to permuting sets. With permutations, we multiply this number by $24$ and get $9408$.

0
On

The following code will print all solutions:

quadruples34[list_] := Module[{res, n, i, j, k, l},
   res = {};
   n = Length[list];
   For[i = 1, i <= n - 3, i++,
    For[j = i + 1, j <= n - 2, j++,
      For[k = j + 1, k <= n - 1, k++,
        For[l = k + 1, l <= n, l++,
          If[i + j + k + l == 34, AppendTo[res, {i, j, k, l}]];
          ];
        ];
      ];
    ];
   Return[res];
   ];

findFour34[] := Module[{quads, n, i, res, qi, qj, qk, ql, solution},
   quads = quadruples34[Table[i, {i, 1, 16}]];
   n = Length[quads];
   res = {};
   For[i = 1, i <= n - 3, i++,
    qi = quads[[i]];
    For[j = i + 1, j <= n - 2, j++,
     qj = quads[[j]];
     For[k = j + 1, k <= n - 1, k++,
      qk = quads[[k]];
      For[l = k + 1, l <= n, l++,
       ql = quads[[l]];
       If[Length[Union[qi, qj, qk, ql]] == 16,
        solution = {qi, qj, qk, ql};
        AppendTo[res, solution];
        ];
       ];
      ];
     ];
    ];
   Return[res];
   ];

Print[findFour34[]]

There are exactly 392 solutions if the order of 4 groups is unimportant:

{{1,2,15,16},{3,4,13,14},{5,6,11,12},{7,8,9,10}}

{{1,2,15,16},{3,4,13,14},{5,7,10,12},{6,8,9,11}}

{{1,2,15,16},{3,4,13,14},{5,8,9,12},{6,7,10,11}}

{{1,2,15,16},{3,4,13,14},{5,8,10,11},{6,7,9,12}}

{{1,2,15,16},{3,5,12,14},{4,6,11,13},{7,8,9,10}}

{{1,2,15,16},{3,5,12,14},{4,7,10,13},{6,8,9,11}}

{{1,2,15,16},{3,5,12,14},{4,8,9,13},{6,7,10,11}}

{{1,2,15,16},{3,5,12,14},{4,9,10,11},{6,7,8,13}}

{{1,2,15,16},{3,6,11,14},{4,5,12,13},{7,8,9,10}}

{{1,2,15,16},{3,6,11,14},{4,7,10,13},{5,8,9,12}}

{{1,2,15,16},{3,6,11,14},{4,8,9,13},{5,7,10,12}}

{{1,2,15,16},{3,6,11,14},{4,8,10,12},{5,7,9,13}}

{{1,2,15,16},{3,6,12,13},{4,5,11,14},{7,8,9,10}}

{{1,2,15,16},{3,6,12,13},{4,7,9,14},{5,8,10,11}}

{{1,2,15,16},{3,6,12,13},{4,9,10,11},{5,7,8,14}}

{{1,2,15,16},{3,7,10,14},{4,5,12,13},{6,8,9,11}}

{{1,2,15,16},{3,7,10,14},{4,6,11,13},{5,8,9,12}}

{{1,2,15,16},{3,7,10,14},{4,8,9,13},{5,6,11,12}}

{{1,2,15,16},{3,7,11,13},{4,6,10,14},{5,8,9,12}}

{{1,2,15,16},{3,7,11,13},{4,8,10,12},{5,6,9,14}}

{{1,2,15,16},{3,8,9,14},{4,5,12,13},{6,7,10,11}}

{{1,2,15,16},{3,8,9,14},{4,6,11,13},{5,7,10,12}}

{{1,2,15,16},{3,8,9,14},{4,7,10,13},{5,6,11,12}}

{{1,2,15,16},{3,8,9,14},{4,7,11,12},{5,6,10,13}}

{{1,2,15,16},{3,8,10,13},{4,5,11,14},{6,7,9,12}}

{{1,2,15,16},{3,8,10,13},{4,7,9,14},{5,6,11,12}}

{{1,2,15,16},{3,8,10,13},{4,7,11,12},{5,6,9,14}}

{{1,2,15,16},{3,8,11,12},{4,6,10,14},{5,7,9,13}}

{{1,2,15,16},{3,8,11,12},{4,7,9,14},{5,6,10,13}}

{{1,2,15,16},{3,8,11,12},{4,7,10,13},{5,6,9,14}}

{{1,2,15,16},{3,9,10,12},{4,5,11,14},{6,7,8,13}}

{{1,2,15,16},{3,9,10,12},{4,6,11,13},{5,7,8,14}}

{{1,3,14,16},{2,4,13,15},{5,6,11,12},{7,8,9,10}}

{{1,3,14,16},{2,4,13,15},{5,7,10,12},{6,8,9,11}}

{{1,3,14,16},{2,4,13,15},{5,8,9,12},{6,7,10,11}}

{{1,3,14,16},{2,4,13,15},{5,8,10,11},{6,7,9,12}}

{{1,3,14,16},{2,5,12,15},{4,6,11,13},{7,8,9,10}}

{{1,3,14,16},{2,5,12,15},{4,7,10,13},{6,8,9,11}}

{{1,3,14,16},{2,5,12,15},{4,8,9,13},{6,7,10,11}}

{{1,3,14,16},{2,5,12,15},{4,9,10,11},{6,7,8,13}}

{{1,3,14,16},{2,6,11,15},{4,5,12,13},{7,8,9,10}}

{{1,3,14,16},{2,6,11,15},{4,7,10,13},{5,8,9,12}}

{{1,3,14,16},{2,6,11,15},{4,8,9,13},{5,7,10,12}}

{{1,3,14,16},{2,6,11,15},{4,8,10,12},{5,7,9,13}}

{{1,3,14,16},{2,7,10,15},{4,5,12,13},{6,8,9,11}}

{{1,3,14,16},{2,7,10,15},{4,6,11,13},{5,8,9,12}}

{{1,3,14,16},{2,7,10,15},{4,8,9,13},{5,6,11,12}}

{{1,3,14,16},{2,7,12,13},{4,5,10,15},{6,8,9,11}}

{{1,3,14,16},{2,7,12,13},{4,6,9,15},{5,8,10,11}}

{{1,3,14,16},{2,7,12,13},{4,9,10,11},{5,6,8,15}}

{{1,3,14,16},{2,8,9,15},{4,5,12,13},{6,7,10,11}}

{{1,3,14,16},{2,8,9,15},{4,6,11,13},{5,7,10,12}}

{{1,3,14,16},{2,8,9,15},{4,7,10,13},{5,6,11,12}}

{{1,3,14,16},{2,8,9,15},{4,7,11,12},{5,6,10,13}}

{{1,3,14,16},{2,8,11,13},{4,5,10,15},{6,7,9,12}}

{{1,3,14,16},{2,8,11,13},{4,6,9,15},{5,7,10,12}}

{{1,3,14,16},{2,9,10,13},{4,7,8,15},{5,6,11,12}}

{{1,3,14,16},{2,9,10,13},{4,7,11,12},{5,6,8,15}}

{{1,3,14,16},{2,9,11,12},{4,5,10,15},{6,7,8,13}}

{{1,3,14,16},{2,9,11,12},{4,7,8,15},{5,6,10,13}}

{{1,3,14,16},{2,9,11,12},{4,7,10,13},{5,6,8,15}}

{{1,4,13,16},{2,3,14,15},{5,6,11,12},{7,8,9,10}}

{{1,4,13,16},{2,3,14,15},{5,7,10,12},{6,8,9,11}}

{{1,4,13,16},{2,3,14,15},{5,8,9,12},{6,7,10,11}}

{{1,4,13,16},{2,3,14,15},{5,8,10,11},{6,7,9,12}}

{{1,4,13,16},{2,5,12,15},{3,6,11,14},{7,8,9,10}}

{{1,4,13,16},{2,5,12,15},{3,7,10,14},{6,8,9,11}}

{{1,4,13,16},{2,5,12,15},{3,8,9,14},{6,7,10,11}}

{{1,4,13,16},{2,6,11,15},{3,5,12,14},{7,8,9,10}}

{{1,4,13,16},{2,6,11,15},{3,7,10,14},{5,8,9,12}}

{{1,4,13,16},{2,6,11,15},{3,8,9,14},{5,7,10,12}}

{{1,4,13,16},{2,6,11,15},{3,9,10,12},{5,7,8,14}}

{{1,4,13,16},{2,6,12,14},{3,5,11,15},{7,8,9,10}}

{{1,4,13,16},{2,6,12,14},{3,7,9,15},{5,8,10,11}}

{{1,4,13,16},{2,7,10,15},{3,5,12,14},{6,8,9,11}}

{{1,4,13,16},{2,7,10,15},{3,6,11,14},{5,8,9,12}}

{{1,4,13,16},{2,7,10,15},{3,8,9,14},{5,6,11,12}}

{{1,4,13,16},{2,7,10,15},{3,8,11,12},{5,6,9,14}}

{{1,4,13,16},{2,7,11,14},{3,6,10,15},{5,8,9,12}}

{{1,4,13,16},{2,7,11,14},{3,9,10,12},{5,6,8,15}}

{{1,4,13,16},{2,8,9,15},{3,5,12,14},{6,7,10,11}}

{{1,4,13,16},{2,8,9,15},{3,6,11,14},{5,7,10,12}}

{{1,4,13,16},{2,8,9,15},{3,7,10,14},{5,6,11,12}}

{{1,4,13,16},{2,8,10,14},{3,5,11,15},{6,7,9,12}}

{{1,4,13,16},{2,8,10,14},{3,7,9,15},{5,6,11,12}}

{{1,4,13,16},{2,9,11,12},{3,6,10,15},{5,7,8,14}}

{{1,4,13,16},{2,9,11,12},{3,7,10,14},{5,6,8,15}}

{{1,4,14,15},{2,3,13,16},{5,6,11,12},{7,8,9,10}}

{{1,4,14,15},{2,3,13,16},{5,7,10,12},{6,8,9,11}}

{{1,4,14,15},{2,3,13,16},{5,8,9,12},{6,7,10,11}}

{{1,4,14,15},{2,3,13,16},{5,8,10,11},{6,7,9,12}}

{{1,4,14,15},{2,5,11,16},{3,6,12,13},{7,8,9,10}}

{{1,4,14,15},{2,5,11,16},{3,8,10,13},{6,7,9,12}}

{{1,4,14,15},{2,5,11,16},{3,9,10,12},{6,7,8,13}}

{{1,4,14,15},{2,6,10,16},{3,7,11,13},{5,8,9,12}}

{{1,4,14,15},{2,6,10,16},{3,8,11,12},{5,7,9,13}}

{{1,4,14,15},{2,7,9,16},{3,6,12,13},{5,8,10,11}}

{{1,4,14,15},{2,7,9,16},{3,8,10,13},{5,6,11,12}}

{{1,4,14,15},{2,7,9,16},{3,8,11,12},{5,6,10,13}}

{{1,4,14,15},{2,7,12,13},{3,5,10,16},{6,8,9,11}}

{{1,4,14,15},{2,7,12,13},{3,6,9,16},{5,8,10,11}}

{{1,4,14,15},{2,8,11,13},{3,5,10,16},{6,7,9,12}}

{{1,4,14,15},{2,8,11,13},{3,6,9,16},{5,7,10,12}}

{{1,4,14,15},{2,8,11,13},{3,9,10,12},{5,6,7,16}}

{{1,4,14,15},{2,9,10,13},{3,7,8,16},{5,6,11,12}}

{{1,4,14,15},{2,9,10,13},{3,8,11,12},{5,6,7,16}}

{{1,4,14,15},{2,9,11,12},{3,5,10,16},{6,7,8,13}}

{{1,4,14,15},{2,9,11,12},{3,7,8,16},{5,6,10,13}}

{{1,4,14,15},{2,9,11,12},{3,8,10,13},{5,6,7,16}}

{{1,5,12,16},{2,3,14,15},{4,6,11,13},{7,8,9,10}}

{{1,5,12,16},{2,3,14,15},{4,7,10,13},{6,8,9,11}}

{{1,5,12,16},{2,3,14,15},{4,8,9,13},{6,7,10,11}}

{{1,5,12,16},{2,3,14,15},{4,9,10,11},{6,7,8,13}}

{{1,5,12,16},{2,4,13,15},{3,6,11,14},{7,8,9,10}}

{{1,5,12,16},{2,4,13,15},{3,7,10,14},{6,8,9,11}}

{{1,5,12,16},{2,4,13,15},{3,8,9,14},{6,7,10,11}}

{{1,5,12,16},{2,6,11,15},{3,4,13,14},{7,8,9,10}}

{{1,5,12,16},{2,6,11,15},{3,7,10,14},{4,8,9,13}}

{{1,5,12,16},{2,6,11,15},{3,8,9,14},{4,7,10,13}}

{{1,5,12,16},{2,6,11,15},{3,8,10,13},{4,7,9,14}}

{{1,5,12,16},{2,7,10,15},{3,4,13,14},{6,8,9,11}}

{{1,5,12,16},{2,7,10,15},{3,6,11,14},{4,8,9,13}}

{{1,5,12,16},{2,7,10,15},{3,8,9,14},{4,6,11,13}}

{{1,5,12,16},{2,7,11,14},{3,6,10,15},{4,8,9,13}}

{{1,5,12,16},{2,7,11,14},{3,8,10,13},{4,6,9,15}}

{{1,5,12,16},{2,8,9,15},{3,4,13,14},{6,7,10,11}}

{{1,5,12,16},{2,8,9,15},{3,6,11,14},{4,7,10,13}}

{{1,5,12,16},{2,8,9,15},{3,7,10,14},{4,6,11,13}}

{{1,5,12,16},{2,8,9,15},{3,7,11,13},{4,6,10,14}}

{{1,5,12,16},{2,8,10,14},{3,7,9,15},{4,6,11,13}}

{{1,5,12,16},{2,8,10,14},{3,7,11,13},{4,6,9,15}}

{{1,5,12,16},{2,8,11,13},{3,6,10,15},{4,7,9,14}}

{{1,5,12,16},{2,8,11,13},{3,7,9,15},{4,6,10,14}}

{{1,5,12,16},{2,8,11,13},{3,7,10,14},{4,6,9,15}}

{{1,5,12,16},{2,9,10,13},{3,6,11,14},{4,7,8,15}}

{{1,5,13,15},{2,4,12,16},{3,6,11,14},{7,8,9,10}}

{{1,5,13,15},{2,4,12,16},{3,7,10,14},{6,8,9,11}}

{{1,5,13,15},{2,4,12,16},{3,8,9,14},{6,7,10,11}}

{{1,5,13,15},{2,6,10,16},{3,8,9,14},{4,7,11,12}}

{{1,5,13,15},{2,6,10,16},{3,8,11,12},{4,7,9,14}}

{{1,5,13,15},{2,6,12,14},{3,4,11,16},{7,8,9,10}}

{{1,5,13,15},{2,6,12,14},{3,7,8,16},{4,9,10,11}}

{{1,5,13,15},{2,7,9,16},{3,6,11,14},{4,8,10,12}}

{{1,5,13,15},{2,7,9,16},{3,8,11,12},{4,6,10,14}}

{{1,5,13,15},{2,7,11,14},{3,6,9,16},{4,8,10,12}}

{{1,5,13,15},{2,7,11,14},{3,9,10,12},{4,6,8,16}}

{{1,5,13,15},{2,8,10,14},{3,4,11,16},{6,7,9,12}}

{{1,5,13,15},{2,8,10,14},{3,6,9,16},{4,7,11,12}}

{{1,5,13,15},{2,9,11,12},{3,7,8,16},{4,6,10,14}}

{{1,5,13,15},{2,9,11,12},{3,7,10,14},{4,6,8,16}}

{{1,6,11,16},{2,3,14,15},{4,5,12,13},{7,8,9,10}}

{{1,6,11,16},{2,3,14,15},{4,7,10,13},{5,8,9,12}}

{{1,6,11,16},{2,3,14,15},{4,8,9,13},{5,7,10,12}}

{{1,6,11,16},{2,3,14,15},{4,8,10,12},{5,7,9,13}}

{{1,6,11,16},{2,4,13,15},{3,5,12,14},{7,8,9,10}}

{{1,6,11,16},{2,4,13,15},{3,7,10,14},{5,8,9,12}}

{{1,6,11,16},{2,4,13,15},{3,8,9,14},{5,7,10,12}}

{{1,6,11,16},{2,4,13,15},{3,9,10,12},{5,7,8,14}}

{{1,6,11,16},{2,5,12,15},{3,4,13,14},{7,8,9,10}}

{{1,6,11,16},{2,5,12,15},{3,7,10,14},{4,8,9,13}}

{{1,6,11,16},{2,5,12,15},{3,8,9,14},{4,7,10,13}}

{{1,6,11,16},{2,5,12,15},{3,8,10,13},{4,7,9,14}}

{{1,6,11,16},{2,5,13,14},{3,4,12,15},{7,8,9,10}}

{{1,6,11,16},{2,5,13,14},{3,7,9,15},{4,8,10,12}}

{{1,6,11,16},{2,5,13,14},{3,9,10,12},{4,7,8,15}}

{{1,6,11,16},{2,7,10,15},{3,4,13,14},{5,8,9,12}}

{{1,6,11,16},{2,7,10,15},{3,5,12,14},{4,8,9,13}}

{{1,6,11,16},{2,7,10,15},{3,8,9,14},{4,5,12,13}}

{{1,6,11,16},{2,7,12,13},{3,8,9,14},{4,5,10,15}}

{{1,6,11,16},{2,8,9,15},{3,4,13,14},{5,7,10,12}}

{{1,6,11,16},{2,8,9,15},{3,5,12,14},{4,7,10,13}}

{{1,6,11,16},{2,8,9,15},{3,7,10,14},{4,5,12,13}}

{{1,6,11,16},{2,8,10,14},{3,4,12,15},{5,7,9,13}}

{{1,6,11,16},{2,8,10,14},{3,7,9,15},{4,5,12,13}}

{{1,6,11,16},{2,9,10,13},{3,4,12,15},{5,7,8,14}}

{{1,6,11,16},{2,9,10,13},{3,5,12,14},{4,7,8,15}}

{{1,6,12,15},{2,3,13,16},{4,5,11,14},{7,8,9,10}}

{{1,6,12,15},{2,3,13,16},{4,7,9,14},{5,8,10,11}}

{{1,6,12,15},{2,3,13,16},{4,9,10,11},{5,7,8,14}}

{{1,6,12,15},{2,5,11,16},{3,4,13,14},{7,8,9,10}}

{{1,6,12,15},{2,5,11,16},{3,7,10,14},{4,8,9,13}}

{{1,6,12,15},{2,5,11,16},{3,8,9,14},{4,7,10,13}}

{{1,6,12,15},{2,5,11,16},{3,8,10,13},{4,7,9,14}}

{{1,6,12,15},{2,5,13,14},{3,4,11,16},{7,8,9,10}}

{{1,6,12,15},{2,5,13,14},{3,7,8,16},{4,9,10,11}}

{{1,6,12,15},{2,7,9,16},{3,4,13,14},{5,8,10,11}}

{{1,6,12,15},{2,7,9,16},{3,8,10,13},{4,5,11,14}}

{{1,6,12,15},{2,7,11,14},{3,5,10,16},{4,8,9,13}}

{{1,6,12,15},{2,7,11,14},{3,8,10,13},{4,5,9,16}}

{{1,6,12,15},{2,8,10,14},{3,4,11,16},{5,7,9,13}}

{{1,6,12,15},{2,8,10,14},{3,7,11,13},{4,5,9,16}}

{{1,6,12,15},{2,8,11,13},{3,5,10,16},{4,7,9,14}}

{{1,6,12,15},{2,8,11,13},{3,7,10,14},{4,5,9,16}}

{{1,6,12,15},{2,9,10,13},{3,4,11,16},{5,7,8,14}}

{{1,6,12,15},{2,9,10,13},{3,7,8,16},{4,5,11,14}}

{{1,6,13,14},{2,4,12,16},{3,5,11,15},{7,8,9,10}}

{{1,6,13,14},{2,4,12,16},{3,7,9,15},{5,8,10,11}}

{{1,6,13,14},{2,5,11,16},{3,4,12,15},{7,8,9,10}}

{{1,6,13,14},{2,5,11,16},{3,7,9,15},{4,8,10,12}}

{{1,6,13,14},{2,5,11,16},{3,9,10,12},{4,7,8,15}}

{{1,6,13,14},{2,5,12,15},{3,4,11,16},{7,8,9,10}}

{{1,6,13,14},{2,5,12,15},{3,7,8,16},{4,9,10,11}}

{{1,6,13,14},{2,7,9,16},{3,4,12,15},{5,8,10,11}}

{{1,6,13,14},{2,7,9,16},{3,5,11,15},{4,8,10,12}}

{{1,6,13,14},{2,7,9,16},{3,8,11,12},{4,5,10,15}}

{{1,6,13,14},{2,7,10,15},{3,4,11,16},{5,8,9,12}}

{{1,6,13,14},{2,7,10,15},{3,8,11,12},{4,5,9,16}}

{{1,6,13,14},{2,8,9,15},{3,4,11,16},{5,7,10,12}}

{{1,6,13,14},{2,8,9,15},{3,5,10,16},{4,7,11,12}}

{{1,6,13,14},{2,9,11,12},{3,5,10,16},{4,7,8,15}}

{{1,6,13,14},{2,9,11,12},{3,7,8,16},{4,5,10,15}}

{{1,7,10,16},{2,3,14,15},{4,5,12,13},{6,8,9,11}}

{{1,7,10,16},{2,3,14,15},{4,6,11,13},{5,8,9,12}}

{{1,7,10,16},{2,3,14,15},{4,8,9,13},{5,6,11,12}}

{{1,7,10,16},{2,4,13,15},{3,5,12,14},{6,8,9,11}}

{{1,7,10,16},{2,4,13,15},{3,6,11,14},{5,8,9,12}}

{{1,7,10,16},{2,4,13,15},{3,8,9,14},{5,6,11,12}}

{{1,7,10,16},{2,4,13,15},{3,8,11,12},{5,6,9,14}}

{{1,7,10,16},{2,5,12,15},{3,4,13,14},{6,8,9,11}}

{{1,7,10,16},{2,5,12,15},{3,6,11,14},{4,8,9,13}}

{{1,7,10,16},{2,5,12,15},{3,8,9,14},{4,6,11,13}}

{{1,7,10,16},{2,5,13,14},{3,4,12,15},{6,8,9,11}}

{{1,7,10,16},{2,5,13,14},{3,8,11,12},{4,6,9,15}}

{{1,7,10,16},{2,6,11,15},{3,4,13,14},{5,8,9,12}}

{{1,7,10,16},{2,6,11,15},{3,5,12,14},{4,8,9,13}}

{{1,7,10,16},{2,6,11,15},{3,8,9,14},{4,5,12,13}}

{{1,7,10,16},{2,6,12,14},{3,5,11,15},{4,8,9,13}}

{{1,7,10,16},{2,8,9,15},{3,4,13,14},{5,6,11,12}}

{{1,7,10,16},{2,8,9,15},{3,5,12,14},{4,6,11,13}}

{{1,7,10,16},{2,8,9,15},{3,6,11,14},{4,5,12,13}}

{{1,7,10,16},{2,8,9,15},{3,6,12,13},{4,5,11,14}}

{{1,7,10,16},{2,8,11,13},{3,4,12,15},{5,6,9,14}}

{{1,7,10,16},{2,8,11,13},{3,5,12,14},{4,6,9,15}}

{{1,7,10,16},{2,9,11,12},{3,4,13,14},{5,6,8,15}}

{{1,7,11,15},{2,3,13,16},{4,6,10,14},{5,8,9,12}}

{{1,7,11,15},{2,3,13,16},{4,8,10,12},{5,6,9,14}}

{{1,7,11,15},{2,4,12,16},{3,8,9,14},{5,6,10,13}}

{{1,7,11,15},{2,4,12,16},{3,8,10,13},{5,6,9,14}}

{{1,7,11,15},{2,5,13,14},{3,6,9,16},{4,8,10,12}}

{{1,7,11,15},{2,5,13,14},{3,9,10,12},{4,6,8,16}}

{{1,7,11,15},{2,6,10,16},{3,4,13,14},{5,8,9,12}}

{{1,7,11,15},{2,6,10,16},{3,5,12,14},{4,8,9,13}}

{{1,7,11,15},{2,6,10,16},{3,8,9,14},{4,5,12,13}}

{{1,7,11,15},{2,6,12,14},{3,5,10,16},{4,8,9,13}}

{{1,7,11,15},{2,6,12,14},{3,8,10,13},{4,5,9,16}}

{{1,7,11,15},{2,8,10,14},{3,6,9,16},{4,5,12,13}}

{{1,7,11,15},{2,8,10,14},{3,6,12,13},{4,5,9,16}}

{{1,7,11,15},{2,9,10,13},{3,5,12,14},{4,6,8,16}}

{{1,7,12,14},{2,3,13,16},{4,5,10,15},{6,8,9,11}}

{{1,7,12,14},{2,3,13,16},{4,6,9,15},{5,8,10,11}}

{{1,7,12,14},{2,3,13,16},{4,9,10,11},{5,6,8,15}}

{{1,7,12,14},{2,4,13,15},{3,5,10,16},{6,8,9,11}}

{{1,7,12,14},{2,4,13,15},{3,6,9,16},{5,8,10,11}}

{{1,7,12,14},{2,5,11,16},{3,6,10,15},{4,8,9,13}}

{{1,7,12,14},{2,5,11,16},{3,8,10,13},{4,6,9,15}}

{{1,7,12,14},{2,6,10,16},{3,5,11,15},{4,8,9,13}}

{{1,7,12,14},{2,6,11,15},{3,5,10,16},{4,8,9,13}}

{{1,7,12,14},{2,6,11,15},{3,8,10,13},{4,5,9,16}}

{{1,7,12,14},{2,8,9,15},{3,4,11,16},{5,6,10,13}}

{{1,7,12,14},{2,8,9,15},{3,5,10,16},{4,6,11,13}}

{{1,7,12,14},{2,8,11,13},{3,5,10,16},{4,6,9,15}}

{{1,7,12,14},{2,8,11,13},{3,6,9,16},{4,5,10,15}}

{{1,7,12,14},{2,8,11,13},{3,6,10,15},{4,5,9,16}}

{{1,7,12,14},{2,9,10,13},{3,4,11,16},{5,6,8,15}}

{{1,7,12,14},{2,9,10,13},{3,5,11,15},{4,6,8,16}}

{{1,8,9,16},{2,3,14,15},{4,5,12,13},{6,7,10,11}}

{{1,8,9,16},{2,3,14,15},{4,6,11,13},{5,7,10,12}}

{{1,8,9,16},{2,3,14,15},{4,7,10,13},{5,6,11,12}}

{{1,8,9,16},{2,3,14,15},{4,7,11,12},{5,6,10,13}}

{{1,8,9,16},{2,4,13,15},{3,5,12,14},{6,7,10,11}}

{{1,8,9,16},{2,4,13,15},{3,6,11,14},{5,7,10,12}}

{{1,8,9,16},{2,4,13,15},{3,7,10,14},{5,6,11,12}}

{{1,8,9,16},{2,5,12,15},{3,4,13,14},{6,7,10,11}}

{{1,8,9,16},{2,5,12,15},{3,6,11,14},{4,7,10,13}}

{{1,8,9,16},{2,5,12,15},{3,7,10,14},{4,6,11,13}}

{{1,8,9,16},{2,5,12,15},{3,7,11,13},{4,6,10,14}}

{{1,8,9,16},{2,5,13,14},{3,4,12,15},{6,7,10,11}}

{{1,8,9,16},{2,5,13,14},{3,6,10,15},{4,7,11,12}}

{{1,8,9,16},{2,6,11,15},{3,4,13,14},{5,7,10,12}}

{{1,8,9,16},{2,6,11,15},{3,5,12,14},{4,7,10,13}}

{{1,8,9,16},{2,6,11,15},{3,7,10,14},{4,5,12,13}}

{{1,8,9,16},{2,6,12,14},{3,5,11,15},{4,7,10,13}}

{{1,8,9,16},{2,6,12,14},{3,7,11,13},{4,5,10,15}}

{{1,8,9,16},{2,7,10,15},{3,4,13,14},{5,6,11,12}}

{{1,8,9,16},{2,7,10,15},{3,5,12,14},{4,6,11,13}}

{{1,8,9,16},{2,7,10,15},{3,6,11,14},{4,5,12,13}}

{{1,8,9,16},{2,7,10,15},{3,6,12,13},{4,5,11,14}}

{{1,8,9,16},{2,7,11,14},{3,4,12,15},{5,6,10,13}}

{{1,8,9,16},{2,7,11,14},{3,6,10,15},{4,5,12,13}}

{{1,8,9,16},{2,7,11,14},{3,6,12,13},{4,5,10,15}}

{{1,8,9,16},{2,7,12,13},{3,5,11,15},{4,6,10,14}}

{{1,8,9,16},{2,7,12,13},{3,6,10,15},{4,5,11,14}}

{{1,8,9,16},{2,7,12,13},{3,6,11,14},{4,5,10,15}}

{{1,8,10,15},{2,3,13,16},{4,5,11,14},{6,7,9,12}}

{{1,8,10,15},{2,3,13,16},{4,7,9,14},{5,6,11,12}}

{{1,8,10,15},{2,3,13,16},{4,7,11,12},{5,6,9,14}}

{{1,8,10,15},{2,4,12,16},{3,6,11,14},{5,7,9,13}}

{{1,8,10,15},{2,4,12,16},{3,7,11,13},{5,6,9,14}}

{{1,8,10,15},{2,5,11,16},{3,4,13,14},{6,7,9,12}}

{{1,8,10,15},{2,5,11,16},{3,6,12,13},{4,7,9,14}}

{{1,8,10,15},{2,5,13,14},{3,4,11,16},{6,7,9,12}}

{{1,8,10,15},{2,5,13,14},{3,6,9,16},{4,7,11,12}}

{{1,8,10,15},{2,6,12,14},{3,4,11,16},{5,7,9,13}}

{{1,8,10,15},{2,6,12,14},{3,7,11,13},{4,5,9,16}}

{{1,8,10,15},{2,7,9,16},{3,4,13,14},{5,6,11,12}}

{{1,8,10,15},{2,7,9,16},{3,5,12,14},{4,6,11,13}}

{{1,8,10,15},{2,7,9,16},{3,6,11,14},{4,5,12,13}}

{{1,8,10,15},{2,7,9,16},{3,6,12,13},{4,5,11,14}}

{{1,8,10,15},{2,7,11,14},{3,6,9,16},{4,5,12,13}}

{{1,8,10,15},{2,7,11,14},{3,6,12,13},{4,5,9,16}}

{{1,8,10,15},{2,7,12,13},{3,4,11,16},{5,6,9,14}}

{{1,8,10,15},{2,7,12,13},{3,6,9,16},{4,5,11,14}}

{{1,8,10,15},{2,7,12,13},{3,6,11,14},{4,5,9,16}}

{{1,8,10,15},{2,9,11,12},{3,4,13,14},{5,6,7,16}}

{{1,8,11,14},{2,3,13,16},{4,5,10,15},{6,7,9,12}}

{{1,8,11,14},{2,3,13,16},{4,6,9,15},{5,7,10,12}}

{{1,8,11,14},{2,4,12,16},{3,6,10,15},{5,7,9,13}}

{{1,8,11,14},{2,4,12,16},{3,7,9,15},{5,6,10,13}}

{{1,8,11,14},{2,4,13,15},{3,5,10,16},{6,7,9,12}}

{{1,8,11,14},{2,4,13,15},{3,6,9,16},{5,7,10,12}}

{{1,8,11,14},{2,4,13,15},{3,9,10,12},{5,6,7,16}}

{{1,8,11,14},{2,5,12,15},{3,6,9,16},{4,7,10,13}}

{{1,8,11,14},{2,6,10,16},{3,4,12,15},{5,7,9,13}}

{{1,8,11,14},{2,6,10,16},{3,7,9,15},{4,5,12,13}}

{{1,8,11,14},{2,7,9,16},{3,4,12,15},{5,6,10,13}}

{{1,8,11,14},{2,7,9,16},{3,6,10,15},{4,5,12,13}}

{{1,8,11,14},{2,7,9,16},{3,6,12,13},{4,5,10,15}}

{{1,8,11,14},{2,7,10,15},{3,6,9,16},{4,5,12,13}}

{{1,8,11,14},{2,7,10,15},{3,6,12,13},{4,5,9,16}}

{{1,8,11,14},{2,7,12,13},{3,5,10,16},{4,6,9,15}}

{{1,8,11,14},{2,7,12,13},{3,6,9,16},{4,5,10,15}}

{{1,8,11,14},{2,7,12,13},{3,6,10,15},{4,5,9,16}}

{{1,8,11,14},{2,9,10,13},{3,4,12,15},{5,6,7,16}}

{{1,8,12,13},{2,3,14,15},{4,5,9,16},{6,7,10,11}}

{{1,8,12,13},{2,3,14,15},{4,9,10,11},{5,6,7,16}}

{{1,8,12,13},{2,5,11,16},{3,6,10,15},{4,7,9,14}}

{{1,8,12,13},{2,5,11,16},{3,7,9,15},{4,6,10,14}}

{{1,8,12,13},{2,5,11,16},{3,7,10,14},{4,6,9,15}}

{{1,8,12,13},{2,6,10,16},{3,5,11,15},{4,7,9,14}}

{{1,8,12,13},{2,6,10,16},{3,7,9,15},{4,5,11,14}}

{{1,8,12,13},{2,6,11,15},{3,5,10,16},{4,7,9,14}}

{{1,8,12,13},{2,6,11,15},{3,7,10,14},{4,5,9,16}}

{{1,8,12,13},{2,7,9,16},{3,5,11,15},{4,6,10,14}}

{{1,8,12,13},{2,7,9,16},{3,6,10,15},{4,5,11,14}}

{{1,8,12,13},{2,7,9,16},{3,6,11,14},{4,5,10,15}}

{{1,8,12,13},{2,7,10,15},{3,4,11,16},{5,6,9,14}}

{{1,8,12,13},{2,7,10,15},{3,6,9,16},{4,5,11,14}}

{{1,8,12,13},{2,7,10,15},{3,6,11,14},{4,5,9,16}}

{{1,8,12,13},{2,7,11,14},{3,5,10,16},{4,6,9,15}}

{{1,8,12,13},{2,7,11,14},{3,6,9,16},{4,5,10,15}}

{{1,8,12,13},{2,7,11,14},{3,6,10,15},{4,5,9,16}}

{{1,9,10,14},{2,3,13,16},{4,7,8,15},{5,6,11,12}}

{{1,9,10,14},{2,3,13,16},{4,7,11,12},{5,6,8,15}}

{{1,9,10,14},{2,4,12,16},{3,5,11,15},{6,7,8,13}}

{{1,9,10,14},{2,4,12,16},{3,7,11,13},{5,6,8,15}}

{{1,9,10,14},{2,4,13,15},{3,7,8,16},{5,6,11,12}}

{{1,9,10,14},{2,4,13,15},{3,8,11,12},{5,6,7,16}}

{{1,9,10,14},{2,5,11,16},{3,4,12,15},{6,7,8,13}}

{{1,9,10,14},{2,5,11,16},{3,6,12,13},{4,7,8,15}}

{{1,9,10,14},{2,5,12,15},{3,4,11,16},{6,7,8,13}}

{{1,9,10,14},{2,5,12,15},{3,7,8,16},{4,6,11,13}}

{{1,9,10,14},{2,5,12,15},{3,7,11,13},{4,6,8,16}}

{{1,9,10,14},{2,6,11,15},{3,7,8,16},{4,5,12,13}}

{{1,9,10,14},{2,7,12,13},{3,4,11,16},{5,6,8,15}}

{{1,9,10,14},{2,7,12,13},{3,5,11,15},{4,6,8,16}}

{{1,9,10,14},{2,8,11,13},{3,4,12,15},{5,6,7,16}}

{{1,9,11,13},{2,3,14,15},{4,6,8,16},{5,7,10,12}}

{{1,9,11,13},{2,3,14,15},{4,8,10,12},{5,6,7,16}}

{{1,9,11,13},{2,4,12,16},{3,6,10,15},{5,7,8,14}}

{{1,9,11,13},{2,4,12,16},{3,7,10,14},{5,6,8,15}}

{{1,9,11,13},{2,5,12,15},{3,7,8,16},{4,6,10,14}}

{{1,9,11,13},{2,5,12,15},{3,7,10,14},{4,6,8,16}}

{{1,9,11,13},{2,6,10,16},{3,4,12,15},{5,7,8,14}}

{{1,9,11,13},{2,6,10,16},{3,5,12,14},{4,7,8,15}}

{{1,9,11,13},{2,6,12,14},{3,5,10,16},{4,7,8,15}}

{{1,9,11,13},{2,6,12,14},{3,7,8,16},{4,5,10,15}}

{{1,9,11,13},{2,7,10,15},{3,5,12,14},{4,6,8,16}}

{{1,9,11,13},{2,8,10,14},{3,4,12,15},{5,6,7,16}}

{{1,10,11,12},{2,3,13,16},{4,6,9,15},{5,7,8,14}}

{{1,10,11,12},{2,3,13,16},{4,7,8,15},{5,6,9,14}}

{{1,10,11,12},{2,3,13,16},{4,7,9,14},{5,6,8,15}}

{{1,10,11,12},{2,3,14,15},{4,5,9,16},{6,7,8,13}}

{{1,10,11,12},{2,3,14,15},{4,6,8,16},{5,7,9,13}}

{{1,10,11,12},{2,3,14,15},{4,8,9,13},{5,6,7,16}}

{{1,10,11,12},{2,4,13,15},{3,6,9,16},{5,7,8,14}}

{{1,10,11,12},{2,4,13,15},{3,7,8,16},{5,6,9,14}}

{{1,10,11,12},{2,4,13,15},{3,8,9,14},{5,6,7,16}}

{{1,10,11,12},{2,5,13,14},{3,6,9,16},{4,7,8,15}}

{{1,10,11,12},{2,5,13,14},{3,7,8,16},{4,6,9,15}}

{{1,10,11,12},{2,5,13,14},{3,7,9,15},{4,6,8,16}}

{{1,10,11,12},{2,7,9,16},{3,4,13,14},{5,6,8,15}}

{{1,10,11,12},{2,8,9,15},{3,4,13,14},{5,6,7,16}}
0
On

I tried it this way. I don't know if there will still be more cases.

Let the numbers be $ a\pm d, a\pm 2d,..a\pm 8d $

Adding them we get $a=\frac{17}{4}$

we need to make sets of four from {$ \pm d,\pm 2d,.....,\pm 8d$} such that sum of each part is zero.

for brevity, I will take the set as {$ \pm 1,\pm 2,.....,\pm 8$}

Case I: ( basically your first case) {$ \pm1$} ,{$ \pm2$},....{$ \pm8$}

$$C(8,2).C(6,2).C(4,2).C(2,2)$$

Case Ii: ( when sum of two sums to $ \pm 9$) , so we have

{1,8},{2,7},{3,6},{4,5} & {-1,-8},{-2,-7},{-3,-6},{-4,-5}

we need to select one from each group and that way it still sums to 0. Also, if we select say {1,8} we cannot select {-1,-8} as we have already considered that case in case I. So, we will have to consider the derangement of the two sets.