'''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.
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$.