Let X, Y, and Z be finite sets, and let T be a subset of X × Y × Z. That is, T consists of triples (x, y, z) such that x ∈ X, y ∈ Y, and z ∈ Z. Now M ⊆ T is a 3-dimensional matching if the following holds: for any two distinct triples (x1, y1, z1) ∈ M and (x2, y2, z2) ∈ M, we have x1 ≠ x2, y1 ≠ y2, and z1 ≠ z2.
The figure on the right illustrates 3-dimensional matchings. The set X is marked with red dots, Y is marked with blue dots, and Z is marked with green dots. Figure (a) shows the set T (gray areas). Figure (b) shows a 3-dimensional matching M with |M| = 2, and Figure (c) shows a 3-dimensional matching M with |M| = 3.
The matching M illustrated in Figure (c) is a maximum 3-dimensional matching, i.e., it maximises |M|. The matching illustrated in Figures (b)–(c) are maximal 3-dimensional matchings, i.e., they cannot be extended by adding more elements from T.
A 2-dimensional matching can be defined in a completely analogous manner. Let X and Y be finite sets, and let T be a subset of X × Y. Now M ⊆ T is a 2-dimensional matching if the following holds: for any two distinct pairs (x1, y1) ∈ M and (x2, y2) ∈ M, we have x1 ≠ x2 and y1 ≠ y2.
In the case of 2-dimensional matching, the set T can be interpreted as the set of edges in a bipartite graph G = (X, Y, T); each edge in T connects a vertex in X to a vertex in Y. A 2-dimensional matching is then a matching in the graph G, that is, a set of pairwise non-adjacent edges.
Hence 3-dimensional matchings can be interpreted as a generalization of matchings to hypergraphs: the sets X, Y, and Z contain the vertices, each element of T is a hyperedge, and the set M consists of pairwise non-adjacent edges (edges that do not have a common vertex). In case of 2-dimensional matching, we have Y = Z.
A 3-dimensional matching is a special case of a set packing: we can interpret each element (x, y, z) of T as a subset {x, y, z} of X ∪ Y ∪ Z; then a 3-dimensional matching M consists of pairwise disjoint subsets.
In computational complexity theory, 3-dimensional matching (3DM) is the name of the following decision problem: given a set T and an integer k, decide whether there exists a 3-dimensional matching M ⊆ T with |M| ≥ k.
This decision problem is known to be NP-complete; it is one of Karp's 21 NP-complete problems.1 It is NP-complete even in the special case that k = |X| = |Y| = |Z| and when each element is contained in at most 3 sets, i.e., when we want a perfect matching in a 3-regular hypergraph.234 In this case, a 3-dimensional matching is not only a set packing, but also an exact cover: the set M covers each element of X, Y, and Z exactly once.5 The proof is by reduction from 3SAT. Given a 3SAT instance, we construct a 3DM instance as follows:67
There exist polynomial time algorithms for solving 3DM in dense hypergraphs.89
A maximum 3-dimensional matching is a largest 3-dimensional matching. In computational complexity theory, this is also the name of the following optimization problem: given a set T, find a 3-dimensional matching M ⊆ T that maximizes |M|.
Since the decision problem described above is NP-complete, this optimization problem is NP-hard, and hence it seems that there is no polynomial-time algorithm for finding a maximum 3-dimensional matching. However, there are efficient polynomial-time algorithms for finding a maximum bipartite matching (maximum 2-dimensional matching), for example, the Hopcroft–Karp algorithm.
There is a very simple polynomial-time 3-approximation algorithm for 3-dimensional matching: find any maximal 3-dimensional matching.10 Just like a maximal matching is within factor 2 of a maximum matching,11 a maximal 3-dimensional matching is within factor 3 of a maximum 3-dimensional matching.
For any constant ε > 0 there is a polynomial-time (4/3 + ε)-approximation algorithm for 3-dimensional matching.12
However, attaining better approximation factors is probably hard: the problem is APX-complete, that is, it is hard to approximate within some constant.131415
It is NP-hard to achieve an approximation factor of 95/94 for maximum 3-d matching, and an approximation factor of 48/47 for maximum 4-d matching. The hardness remains even when restricted to instances with exactly two occurrences of each element.16
There are various algorithms for 3-d matching in the massively parallel communication model.17
Karp (1972). - Karp, Richard M. (1972), "Reducibility among combinatorial problems", in Miller, Raymond E.; Thatcher, James W. (eds.), Complexity of Computer Computations, Plenum, pp. 85–103 ↩
Garey, Michael R.; Johnson, David S. (1979). Computers and Intractability: A Guide to the Theory of NP-Completeness. Series of Books in the Mathematical Sciences (1st ed.). New York: W. H. Freeman and Company. ISBN 9780716710455. MR 0519066. OCLC 247570676., Section 3.1 and problem SP1 in Appendix A.3.1. 9780716710455 ↩
Korte, Bernhard; Vygen, Jens (2006), Combinatorial Optimization: Theory and Algorithms (3rd ed.), Springer, Section 15.5. /wiki/Bernhard_Korte ↩
Papadimitriou & Steiglitz (1998), Section 15.7. - Papadimitriou, Christos H.; Steiglitz, Kenneth (1998), Combinatorial Optimization: Algorithms and Complexity, Dover Publications ↩
Demaine, Erik (2016). "16. Complexity: P, NP, NP-completeness, Reductions". YouTube. https://www.youtube.com/watch?v=mr1FMrwi6Ew&t=2780 ↩
Karpinski, Rucinski & Szymanska (2009) - Karpinski, Marek; Rucinski, Andrzej; Szymanska, Edyta (2009), "The Complexity of Perfect Matching Problems on Dense Hypergraphs", ISAAC '09 Proceedings of the 20th International Symposium on Algorithms, Lecture Notes in Computer Science, 5878: 626–636, doi:10.1007/978-3-642-10631-6_64, ISBN 978-3-642-10630-9 https://doi.org/10.1007%2F978-3-642-10631-6_64 ↩
Keevash, Knox & Mycroft (2013) - Keevash, Peter; Knox, Fiachra; Mycroft, Richard (2013), "Polynomial-time perfect matchings in dense hypergraphs", Proceedings of the forty-fifth annual ACM symposium on Theory of Computing, pp. 311–320, arXiv:1307.2608, Bibcode:2013arXiv1307.2608K, doi:10.1145/2488608.2488647, ISBN 9781450320290, S2CID 5393523 https://arxiv.org/abs/1307.2608 ↩
Kann (1991) - Kann, Viggo (1991), "Maximum bounded 3-dimensional matching is MAX SNP-complete", Information Processing Letters, 37 (1): 27–35, doi:10.1016/0020-0190(91)90246-E https://doi.org/10.1016%2F0020-0190%2891%2990246-E ↩
Matching (graph theory)#Properties. /wiki/Matching_(graph_theory)#Properties ↩
Cygan, Marek (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. Bibcode:2013arXiv1304.1424C. doi:10.1109/FOCS.2013.61. ISBN 978-0-7695-5135-7. S2CID 14160646. 978-0-7695-5135-7 ↩
Crescenzi et al. (2000). - Crescenzi, Pierluigi; Kann, Viggo; Halldórsson, Magnús; Karpinski, Marek; Woeginger, Gerhard (2000), "Maximum 3-dimensional matching", A Compendium of NP Optimization Problems https://www.csc.kth.se/~viggo/wwwcompendium/node143.html ↩
Ausiello et al. (2003), problem SP1 in Appendix B. - Ausiello, Giorgio; Crescenzi, Pierluigi; Gambosi, Giorgio; Kann, Viggo; Marchetti-Spaccamela, Alberto; Protasi, Marco (2003), Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties, Springer ↩
Chlebík, Miroslav; Chlebíková, Janka (2006-04-04). "Complexity of approximating bounded variants of optimization problems". Theoretical Computer Science. Foundations of Computation Theory (FCT 2003). 354 (3): 320–338. doi:10.1016/j.tcs.2005.11.029. ISSN 0304-3975. /wiki/Janka_Chleb%C3%ADkov%C3%A1 ↩
Hanguir, Oussama; Stein, Clifford (2020-09-21). "Distributed Algorithms for Matching in Hypergraphs". arXiv:2009.09605 [cs.DS]. /wiki/ArXiv_(identifier) ↩