Solution

Splitting One to Twelve

Show the problem again

In how many ways can the set {1, 2, ..., 12} be split into two subsets with equal sums? The split is unordered: {A, B} and {B, A} are the same split. Give an integer.

Worked solution

The answer is 62. The total is 78, so each part must sum to 39. The number of subsets with sum 39 is the coefficient of $x^{39}$ in $\prod_{k=1}^{12}(1 + x^k)$, which works out to 124 (a short dynamic program over the elements, adding one number at a time and tracking achievable sums, computes it in moments). Each split corresponds to exactly two such subsets (a subset and its complement, never equal since they are disjoint and nonempty), so there are 124/2 = 62 splits. Note that 12 cannot sit in both halves, so one could also count subsets of sum 39 containing 12, i.e. subsets of {1, ..., 11} summing to 27; there are 62 of those, confirming the halving.

Source: Original problem written for AxiomIQ.