3-dimensional matching
   HOME

TheInfoList



OR:

In the
mathematical Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
discipline of
graph theory In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
, a 3-dimensional matching is a generalization of
bipartite matching In the mathematical discipline of graph theory, a matching or independent edge set in an undirected graph is a set of edges without common vertices. Finding a matching in a bipartite graph can be treated as a network flow problem. Definit ...
(also known as 2-dimensional matching) to 3-partite
hypergraph In mathematics, a hypergraph is a generalization of a graph in which an edge can join any number of vertices. In contrast, in an ordinary graph, an edge connects exactly two vertices. Formally, an undirected hypergraph H is a pair H = (X,E) w ...
s, which consist of hyperedges each of which contains 3 vertices (instead of edges containing 2 vertices in a usual graph). 3-dimensional matching, often abbreviated as 3DM, is also the name of a well-known computational problem: finding a largest 3-dimensional matching in a given hypergraph. 3DM is one of the first problems that were proved to be NP-hard.


Definition

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 (''x''1, ''y''1, ''z''1) ∈ ''M'' and (''x''2, ''y''2, ''z''2) ∈ ''M'', we have ''x''1 ≠ ''x''2, ''y''1 ≠ ''y''2, and ''z''1 ≠ ''z''2.


Example

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''. Here is example interactive visualisation i
javascript


Comparison with bipartite matching

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 (''x''1, ''y''1) ∈ ''M'' and (''x''2, ''y''2) ∈ ''M'', we have ''x''1 ≠ ''x''2 and ''y''1 ≠ ''y''2. 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.


Comparison with set packing

A 3-dimensional matching is a special case of a
set packing Set packing is a classical NP-complete problem in computational complexity theory and combinatorics, and was one of Karp's 21 NP-complete problems. Suppose one has a finite set ''S'' and a list of subsets of ''S''. Then, the set packing problem asks ...
: we can interpret each element (''x'', ''y'', ''z'') of ''T'' as a subset of ''X'' ∪ ''Y'' ∪ ''Z''; then a 3-dimensional matching ''M'' consists of pairwise disjoint subsets.


Decision problem

In computational complexity theory, ''3-dimensional matching (3DM)'' is the name of the following
decision problem In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm wheth ...
: 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 In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by trying ...
; it is one of
Karp's 21 NP-complete problems In computational complexity theory, Karp's 21 NP-complete problems are a set of computational problems which are NP-complete. In his 1972 paper, "Reducibility Among Combinatorial Problems", Richard Karp used Stephen Cook's 1971 theorem that the b ...
.. It is NP-complete even in the special case that ''k'' = , ''X'',  = , ''Y'',  = , ''Z'', and when each element is contained in exactly 3 sets, i.e., when we want a perfect matching in a 3-regular hypergraph., Section 3.1 and problem SP1 in Appendix A.3.1., Section 15.5. In this case, a 3-dimensional matching is not only a set packing, but also an
exact cover In the mathematical field of combinatorics, given a collection of subsets of a Set (mathematics), set , an exact cover is a subcollection of such that each element in is contained in ''exactly one'' subset in . In other words, is a partition ...
: the set ''M'' covers each element of ''X'', ''Y'', and ''Z'' exactly once., Section 15.7. The proof is by reduction from
3SAT In logic and computer science, the Boolean satisfiability problem (sometimes called propositional satisfiability problem and abbreviated SATISFIABILITY, SAT or B-SAT) is the problem of determining if there exists an interpretation that satisfies ...
. Given a 3SAT instance, we construct a 3DM instance as follows: * For each variable ''xi'', there is a "variable gadget" shaped like a wheel. It is made of overlapping triplets. The number of triplets is twice the number of occurrences of ''xi'' in the formula. There are exactly two ways to cover all the vertices in the gadget: one is to choose all even-indexed triplets, and one is to choose all odd-indexed triplets. These two ways correspond to setting ''xi'' to "true" or "false". The "true" selection leaves uncovered exactly one vertex in every odd-indexed triplet, and the "false" selection leaves uncovered exactly one vertex in every even-indexed triplet. *For each clause ''xi'' u ''xj'' u ''xk'', there is a "clause gadget" shaped like a rose. It is made of three overlapping triplets, one for each variable in the clause. It can be covered iff at least one of the nodes is left uncovered by the selection of the variable gadgets. *Since it is possible that two or more nodes are left uncovered, we also need a "garbage collection gadget". It is shaped like a larger rose. It is made of several overlapping triplets, one for each vertex that can be left uncovered in the variable gadget. The number of such gadgets is determined so that they can be covered exactly if and only if there is a satisfying assignment.


Special cases

There exist polynomial time algorithms for solving 3DM in dense hypergraphs.


Optimization problem

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 In mathematics, computer science and economics, an optimization problem is the problem of finding the ''best'' solution from all feasible solutions. Optimization problems can be divided into two categories, depending on whether the variables ...
: 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 In the mathematical discipline of graph theory, a matching or independent edge set in an undirected graph is a set of edges without common vertices. Finding a matching in a bipartite graph can be treated as a network flow problem. Definit ...
(maximum 2-dimensional matching), for example, the
Hopcroft–Karp algorithm In computer science, the Hopcroft–Karp algorithm (sometimes more accurately called the Hopcroft–Karp–Karzanov algorithm) is an algorithm that takes a bipartite graph as input and produces a maximum cardinality matching as output – a set of ...
.


Approximation algorithms

There is a very simple polynomial-time 3-approximation algorithm for 3-dimensional matching: find any maximal 3-dimensional matching. Just like a maximal matching is within factor 2 of a maximum matching, 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. However, attaining better approximation factors is probably hard: the problem is APX-complete, that is, it is hard to
approximate An approximation is anything that is intentionally similar but not exactly equal to something else. Etymology and usage The word ''approximation'' is derived from Latin ''approximatus'', from ''proximus'' meaning ''very near'' and the prefix ' ...
within some constant.., problem SP1 in Appendix B. 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.


Parallel algorithms

There are various algorithms for 3-d matching in the
Massively parallel Massively parallel is the term for using a large number of computer processors (or separate computers) to simultaneously perform a set of coordinated computations in parallel. GPUs are massively parallel architecture with tens of thousands of t ...
computation model.


See also

*
List of NP-complete problems This is a list of some of the more commonly known problems that are NP-complete when expressed as decision problems. As there are hundreds of such problems known, this list is in no way comprehensive. Many problems of this type can be found in . ...
*
Rainbow-independent set In graph theory, a rainbow-independent set (ISR) is an independent set in a graph, in which each vertex has a different color. Formally, let be a graph, and suppose vertex set is partitioned into subsets , called "colors". A set of vertice ...
– a problem that can be reduced from 3-dimensional matching.


Notes


References

*. *. *. *. *. *. *{{citation , last1=Papadimitriou , first1=Christos H. , authorlink1=Christos Papadimitriou , last2=Steiglitz , first2=Kenneth , authorlink2=Kenneth Steiglitz , title=Combinatorial Optimization: Algorithms and Complexity , publisher=
Dover Publications Dover Publications, also known as Dover Books, is an American book publisher founded in 1941 by Hayward and Blanche Cirker. It primarily reissues books that are out of print from their original publishers. These are often, but not always, book ...
, year=1998 . NP-complete problems Combinatorics Matching (graph theory)