Maximum-cardinality matching A fundamental problem in
combinatorial optimization is finding a
maximum matching. This problem has various algorithms for different classes of graphs. In an
unweighted bipartite graph, the optimization problem is to find a
maximum cardinality matching. The problem is solved by the
Hopcroft-Karp algorithm in time time, and there are more efficient
randomized algorithms,
approximation algorithms, and algorithms for special classes of graphs such as bipartite
planar graphs, as described in the main article.
Maximum-weight matching In a
weighted bipartite graph, the optimization problem is to find a maximum-weight matching; a dual problem is to find a minimum-weight matching. This problem is often called
maximum weighted bipartite matching, or the
assignment problem. The
Hungarian algorithm solves the assignment problem and it was one of the beginnings of combinatorial optimization algorithms. It uses a modified
shortest path search in the augmenting path algorithm. If the
Bellman–Ford algorithm is used for this step, the running time of the Hungarian algorithm becomes O(V^2 E), or the edge cost can be shifted with a potential to achieve O(V^2 \log{V} + V E) running time with the
Dijkstra algorithm and
Fibonacci heap. In a
non-bipartite weighted graph, the problem of
maximum weight matching can be solved in time O(V^{2}E) using
Edmonds' blossom algorithm.
Maximal matchings A maximal matching can be found with a simple
greedy algorithm. A maximum matching is also a maximal matching, and hence it is possible to find a
largest maximal matching in polynomial time. It is also possible to find a maximum matching with the use of
fast matrix multiplication algorithms in the time O({n^\omega }) for ~2.37 \le \omega . However, no polynomial-time algorithm is known for finding a
minimum maximal matching, that is, a maximal matching that contains the
smallest possible number of edges. A maximal matching with
k edges is an
edge dominating set with
k edges. Conversely, if we are given a minimum edge dominating set with
k edges, we can construct a maximal matching with
k edges in polynomial time. Therefore, the problem of finding a minimum maximal matching is essentially equal to the problem of finding a minimum edge dominating set. Both of these two optimization problems are known to be
NP-hard; the decision versions of these problems are classical examples of
NP-complete problems.
Counting problems The number of matchings in a graph is known as the
Hosoya index of the graph. It is
#P-complete to compute this quantity, even for bipartite graphs. It is also #P-complete to count
perfect matchings, even in
bipartite graphs, because computing the
permanent of an arbitrary 0–1 matrix (another #P-complete problem) is the same as computing the number of perfect matchings in the bipartite graph having the given matrix as its
biadjacency matrix. However, there exists a fully polynomial time randomized approximation scheme for counting the number of bipartite matchings. A remarkable theorem of
Kasteleyn states that the number of perfect matchings in a
planar graph can be computed exactly in polynomial time via the
FKT algorithm. The number of perfect matchings in a
complete graph Kn (with
n even) is given by the
double factorial (
n − 1)!!. The numbers of matchings in complete graphs, without constraining the matchings to be perfect, are given by the
telephone numbers. The number of perfect matchings in a graph is also known as the
hafnian of its
adjacency matrix.
Finding all maximally matchable edges One of the basic problems in matching theory is to find in a given graph all edges that may be extended to a maximum matching in the graph (such edges are called
maximally matchable edges, or
allowed edges). Algorithms for this problem include: • For general graphs, a deterministic algorithm in time O(VE) and a randomized algorithm in time \tilde{O}(V^{2.376}) . • For bipartite graphs, if a single maximum matching is found, a deterministic algorithm runs in time O(V+E).
Online bipartite matching The problem of developing an
online algorithm for matching was first considered by
Richard M. Karp,
Umesh Vazirani, and
Vijay Vazirani in 1990. In the online setting, nodes on one side of the bipartite graph ("clients") arrive one at a time and must either be immediately matched to the other side of the graph ("servers") or discarded. This is a natural generalization of the
secretary problem and has applications to online ad auctions. A simple greedy algorithm is 1/2-
competitive. For the unweighted maximization case with a random arrival model, Karp, Vazirani and Vazirani gave a randomized algorithm that attains a
competitive ratio of . The bound was later improved to . The problem was also studied in a model where clients may switch servers in order to improve the matching, and the goal is to economize on the number of switches while achieving a maximum matching. == Applications ==