to . Advanced algorithms An improvement to this algorithm is given by the more elaborate Hopcroft–Karp algorithm, which searches for multiple augmenting paths simultaneously. This algorithm runs in time. The algorithm of Chandran and Hochbaum for bipartite graphs runs in time that depends on the size of the maximum matching , which for is Using boolean operations on words of size the complexity is further improved to More efficient algorithms exist for special kinds of bipartite graphs: For sparse bipartite graphs, the maximum matching problem can be solved in with Madry's algorithm based on electric flows. For planar bipartite graphs, the problem can be solved in time where is the number of vertices, by reducing the problem to maximum flow with multiple sources and sinks. Algorithms for arbitrary graphs The blossom algorithm finds a maximum-cardinality matching in general (not necessarily bipartite) graphs. It runs in time . A better performance of for general graphs, matching the performance of the Hopcroft–Karp algorithm on bipartite graphs, can be achieved with the much more complicated algorithm of Micali and Vazirani. The same bound was achieved by an algorithm by Blum (de) and an algorithm by Gabow and Tarjan. An alternative approach uses randomization and is based on the fast matrix multiplication algorithm. This gives a randomized algorithm for general graphs with complexity . This is better in theory for sufficiently dense graphs, but in practice the algorithm is slower. Other algorithms for the task are reviewed by Duan and Pettie (see Table I). In terms of approximation algorithms, they also point out that the blossom algorithm and the algorithms by Micali and Vazirani can be seen as approximation algorithms running in linear time for any fixed error bound. Applications and generalizations By finding a maximum-cardinality matching, it is possible to decide whether there exists a perfect matching. The problem of finding a matching with maximum weight in a weighted graph is called the maximum weight matching problem, and its restriction to bipartite graphs is called the assignment problem. If each vertex can be matched to several vertices at once, then this is a generalized assignment problem. A priority matching is a particular maximum-cardinality matching in which prioritized vertices are matched first. The problem of finding a maximum-cardinality matching in a hypergraph is NP-complete even for 3-uniform hypergraphs. References Matching (graph theory)