The maximum set packing problem can be formulated as the following integer linear program.
The set packing problem is not only NP-complete, but its optimization version (general maximum set packing problem) has been proven as difficult to approximate as the maximum clique problem; in particular, it cannot be approximated within any constant factor.1 The best known algorithm approximates it within a factor of O ( | U | ) {\displaystyle O({\sqrt {|{\mathcal {U}}|}})} .2 The weighted variant can also be approximated as well.3
The problem does have a variant which is more tractable. Given any positive integer k≥3, the k-set packing problem is a variant of set packing in which each set contains at most k elements.
When k=1, the problem is trivial. When k=2, the problem is equivalent to finding a maximum cardinality matching, which can be solved in polynomial time.
For any k≥3, the problem is NP-hard, as it is more general than 3-dimensional matching. However, there are constant-factor approximation algorithms:
In another more tractable variant, if no element occurs in more than d of the subsets, the answer can be approximated within a factor of d. This is also true for the weighted version.
Hypergraph matching is equivalent to set packing: the sets correspond to the hyperedges.
The independent set problem is also equivalent to set packing – there is a one-to-one polynomial-time reduction between them:
This is also a bidirectional PTAS reduction, and it shows that the two problems are equally difficult to approximate.
In the special case when each set contains at most k elements (the k-set packing problem), the intersection graph is (k+1)-claw-free. This is because, if a set intersects some k+1 sets, then at least two of these sets intersect, so there cannot be a (k+1)-claw. So Maximum Independent Set in claw-free graphs6 can be seen as a generalization of Maximum k-Set Packing.
Graph matching is a special case of set packing in which the size of all sets is 2 (the sets correspond to the edges). In this special case, a maximum-size matching can be found in polynomial time.
3-dimensional matching is a special case in which the size of all sets is 3, and in addition, the elements are partitioned into 3 colors and each set contains exactly one element of each color. This special case is still NP-hard, though it has better constant-factor approximation algorithms than the general case.
In the set cover problem, we are given a family S {\displaystyle {\mathcal {S}}} of subsets of a universe U {\displaystyle {\mathcal {U}}} , and the goal is to determine whether we can choose t sets that together contain every element of U {\displaystyle {\mathcal {U}}} . These sets may overlap. The optimization version finds the minimum number of such sets. The maximum set packing need not cover every possible element.
In the exact cover problem, every element of U {\displaystyle {\mathcal {U}}} should be contained in exactly one of the subsets. Finding such an exact cover is an NP-complete problem, even in the special case in which the size of all sets is 3 (this special case is called exact 3 cover or X3C). However, if we create a singleton set for each element of S and add these to the list, the resulting problem is about as easy as set packing.
Karp originally showed set packing NP-complete via a reduction from the clique problem.
See also: Packing in a hypergraph
Hazan, Elad; Safra, Shmuel; Schwartz, Oded (2006), "On the complexity of approximating k-set packing", Computational Complexity, 15 (1): 20–39, CiteSeerX 10.1.1.352.5754, doi:10.1007/s00037-006-0205-6, MR 2226068, S2CID 1858087. See in particular p. 21: "Maximum clique (and therefore also maximum independent set and maximum set packing) cannot be approximated to within O ( n 1 − ϵ ) {\displaystyle O(n^{1-\epsilon })} unless NP ⊂ ZPP." /w/index.php?title=Computational_Complexity_(journal)&action=edit&redlink=1 ↩
Halldórsson, Magnus M.; Kratochvíl, Jan; Telle, Jan Arne (1998). Independent sets with domination constraints. 25th International Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science. Vol. 1443. Springer-Verlag. pp. 176–185. ↩
Halldórsson, Magnus M. (1999). Approximations of weighted independent set and hereditary subset problems. 5th Annual International Conference on Computing and Combinatorics. Lecture Notes in Computer Science. Vol. 1627. Springer-Verlag. pp. 261–270. ↩
Cygan, Marek (October 2013). "Improved Approximation for 3-Dimensional Matching via Bounded Pathwidth Local Search". 2013 IEEE 54th Annual Symposium on Foundations of Computer Science. pp. 509–518. arXiv:1304.1424. doi:10.1109/FOCS.2013.61. ISBN 978-0-7695-5135-7. S2CID 14160646. 978-0-7695-5135-7 ↩
Fürer, Martin; Yu, Huiwen (2014). "Approximating the k-set packing problem by local improvements". In Fouilhoux, Pierre; Gouveia, Luis Eduardo Neves; Mahjoub, A. Ridha; Paschos, Vangelis T. (eds.). Combinatorial Optimization. Lecture Notes in Computer Science. Vol. 8596. Cham: Springer International Publishing. pp. 408–420. doi:10.1007/978-3-319-09174-7_35. ISBN 978-3-319-09174-7. S2CID 15815885. 978-3-319-09174-7 ↩
Neuwohner, Meike (2021). "An improved approximation algorithm for the maximum weight independent set problem in d-claw free graphs". In Bläser, Markus; Monmege, Benjamin (eds.). 38th International Symposium on Theoretical Aspects of Computer Science, STACS 2021, March 16–19, 2021, Saarbrücken, Germany (Virtual Conference). LIPIcs. Vol. 187. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. pp. 53:1–53:20. arXiv:2106.03545. doi:10.4230/LIPICS.STACS.2021.53. /wiki/ArXiv_(identifier) ↩