Set packing problem¶
Suppose there is a set $S$ and given subsets $T_0, T_1, \ldots, T_{N-1}$ of $S$. The problem of
selecting
some of $T_0, T_1, \dots, T_{N-1}$ so that they have no common parts and making the sum of the number
of
elements of the selected subsets as large as possible is called the set packing
problem.
For example, consider the case shown in the figure below where $S = \{1, 2, 3, 4, 5, 6, 7, 8, 9\}$
and
$T_0 = \{1, 2, 3, 6, 9\}$, $T_1 = \{1, 2, 5, 8\}$, $T_2 = \{4, 7\}$, $T_3 = \{4, 5\}$ and $T_4 = \{6,
9\}$
as the subsets. In this case, if $T_1$, $T_2$, and $T_4$ are chosen, the sum of the number of elements
is
$8$, which is the maximum. On the other hand, since $T_0$ and $T_1$, for example, have a common part,
they
cannot be chosen at the same time.
This example program uses Fixstars Amplify to solve the set packing problem. The formulation follows
that
of Sec. 4.2 of A. Lucas,
Front. Phys. (2014).