Skip to content

Maximum matching

In graph theory, a maximum-cardinality matching is a special kind of subgraph useful in many computational contexts.

Version
v2 · 2026-11-14 · History
Domain-specific #
10623
Domain group
Formal Sciences
Origin domain
Mathematics
Subdomain
Graph Theory → Mathematics

Core Idea

Maximum matching is treated here as the recurring mathematicslogicstatistics identity summarized by this source-grounded definition: In graph theory, a maximum-cardinality matching is a special kind of subgraph useful in many computational contexts. In graph theory, a maximum-cardinality matching is a special kind of subgraph useful in many computational contexts. Given a graph , a matching is a subgraph where no two edges share a vertex. The cardinality of the matching is the number of edges in the subgraph, and the maximum cardinality is the largest number of edges a matching can contain. graph is a maximum-cardinality.

How would you explain it like I'm…

Most Pairs Possible

Imagine a room of kids where some pairs are friends. You want to make as many partner pairs as you can, but each kid can only be in one pair, and partners must be friends. A maximum matching is a way of pairing up that makes the biggest number of pairs possible. Sometimes everyone gets a partner, and sometimes a few kids are left out no matter what.

Biggest Possible Pairing

A graph is a set of dots with lines connecting some of them. A matching is a choice of lines where no two lines touch the same dot. A maximum matching is a matching with as many lines as possible. If it uses every dot, it is called a perfect matching. There is usually more than one maximum matching, and computer scientists have clever step-by-step methods to find one, especially when the dots split into two sides, like workers and jobs.

Maximum-Cardinality Matching

In a graph, a matching is a set of edges where no two share a vertex. A maximum matching is one with the largest possible number of edges. If it covers every vertex, it's a perfect matching. Maximum matchings always exist in finite graphs but usually aren't unique, and their size is at most half the number of vertices. The problem is easier in bipartite graphs, where every edge goes from a 'left' vertex to a 'right' one: you can turn it into a flow problem, or use the Hopcroft–Karp algorithm, which finds many improving paths at once. For general graphs, the blossom algorithm works. Don't confuse 'maximum' (largest of all) with a matching you simply can't add to.

 

A maximum (maximum-cardinality) matching in a graph G is a matching, a set of edges no two of which share a vertex, with the largest possible number of edges. Viewing each edge as covering its two endpoints once, it is the largest non-overlapping edge cover of part of the graph; if it covers every vertex it is perfect. In a finite graph a maximum matching always exists, is usually not unique, and has size at most half the number of vertices and at most the number of edges. Computing one is fundamental in algorithmic graph theory, and there are also nonconstructive theorems characterizing its size. For bipartite graphs, reducing to unit-capacity maximum flow and applying Ford–Fulkerson, which repeatedly augments along alternating paths, takes O(VE) time, and Hopcroft–Karp, which finds many augmenting paths per phase, takes O(sqrt(V) E). For general graphs, the blossom algorithm runs in O(V^2 E), and the more intricate Micali–Vazirani algorithm achieves O(sqrt(V) E).

Scope of Application

  • Algorithms for arbitrary graphs. This is better in theory for sufficiently dense graphs, but in practice the algorithm is slower.

  • Algorithms for bipartite graphsFlow-based algorithm. The simplest way to compute a maximum-cardinality matching is to follow the Ford–Fulkerson algorithm.

  • Algorithms for bipartite graphsFlow-based algorithm. This algorithm solves the more general problem of computing the maximum flow.

  • Algorithms for bipartite graphsFlow-based algorithm. A bipartite graph can be converted to a flow network as follows.

  • Algorithms for bipartite graphsFlow-based algorithm. Add a source vertex ; add an edge from to each vertex in .

Clarity

A clear use of Maximum matching names the carrier, the operative relation, and the conditions under which the source treats the identity as present. The minimal definition is In graph theory, a maximum-cardinality matching is a special kind of subgraph useful in many computational contexts.

Manages Complexity

Maximum matching compresses multiple mathematicslogicstatistics details into a stable diagnostic relation. The source shows both the central mechanism—as each path can be found in time, the running time is , and the maximum matching consists of the edges of that carry flow from to .—and the practical consequence—the same bound was achieved by an algorithm by and an algorithm by Gabow and Tarjan.

Abstract Reasoning

  1. Type the carrier. Identify the mathematicslogicstatistics entities to which the claim applies.
  2. State the relation. Use the source-grounded identity: In graph theory, a maximum-cardinality matching is a special kind of subgraph useful in many computational contexts.
  3. Check operation and conditions. An improvement to this algorithm is given by the more elaborate Hopcroft–Karp algorithm, which searches for multiple augmenting paths simultaneously.
  4. Demand recognition evidence.

Knowledge Transfer

Within the home domain. Knowledge about Maximum matching transfers literally when a new case preserves the same carrier type, relation, and recognition test. This is better in theory for sufficiently dense graphs, but in practice the algorithm is slower. The simplest way to compute a maximum-cardinality matching is to follow the Ford–Fulkerson algorithm. Beyond the home domain. No canonical parent is asserted for Maximum matching. An outside case receives the specialist name only when the same typed roles and rejection conditions can be filled literally; otherwise the comparison remains an analogy pending later graph densification.

Neighborhood in Abstraction Space

Maximum matching sits in a sparse region of the domain-specific corpus (73rd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Convex Optimization & Iterative Methods (8 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14