ArticleslgStudy

computer science

Matching (graph theory)

Matching (graph theory) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Matching (graph theory) rather than just read about it. In short: 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. In other words, a subset of the edges is a matching if each vertex appears in at most one edge of that matching.

Matching (graph theory) — main illustration
Matching (graph theory) — illustration

Key takeaways

  • Matching (graph theory) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Matching (graph theory) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Matching (graph theory) from memory before moving on to harder problems.

Reference excerpt

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. In other words, a subset of the edges is a matching if each vertex appears in at most one edge of that matching. Finding a largest matching in a bipartite graph can be treated as a network flow problem. Finding a largest matching in a general graph is much more difficult; it can be done using Edmonds' blossom algorithm.

Definitions Given a graph G = (V, E), a matching M in G is a set of pairwise non-adjacent edges, none of which are loops; that is, no two edges share common vertices.

M {\displaystyle M} is a matching of U ⊆ V {\displaystyle U\subseteq V} if every vertex in U {\displaystyle U} is incident with an edge in M {\displaystyle M} .

A vertex is matched (or saturated) if it is an endpoint of one of the edges in the matching. Otherwise the vertex is unmatched (or unsaturated). A maximal matching is a matching M of a graph G that is not a subset of any other matching. A matching M of a graph G is maximal if every edge in G has a non-empty intersection with at least one edge in M. The following figure shows examples of maximal matchings (red) in three graphs.

A maximum matching (also known as maximum-cardinality matching) is a matching that contains the largest possible number of edges. There may be many maximum matchings. The matching number ν ( G ) {\displaystyle \nu (G)} of a graph G is the size of a maximum matching. Every maximum matching is maximal, but not every maximal matching is a maximum matching. The following figure shows examples of maximum matchings in the same three graphs.

A perfect matching is a matching that matches all vertices of the graph. That is, a matching is perfect if every vertex of the graph is incident to an edge of the matching. A matching is perfect if | M | = | V | / 2 {\displaystyle |M|=|V|/2} . Every perfect matching is maximum and hence maximal. In some literature, the term complete matching is used. In the above figure, only part (b) shows a perfect matching. A perfect matching is also a minimum-size edge cover. Thus, the size of a maximum matching is no larger than the size of a minimum edge cover: ⁠ ν ( G ) ≤ ρ ( G ) {\displaystyle \nu (G)\leq \rho (G)} ⁠. A graph can only contain a perfect matching when the graph has an even number of vertices. A near-perfect matching is one in which exactly one vertex is unmatched. Clearly, a graph can only contain a near-perfect matching when the graph has an odd number of vertices, and near-perfect matchings are maximum matchings. In the above figure, part (c) shows a near-perfect matching. If every vertex is unmatched by some near-perfect matching, then the graph is called factor-critical. An induced matching is a matching that is the edge set of an induced subgraph.

Alternating and augmenting paths Given a matching M, an alternating path is a path that begins with an unmatched vertex and whose edges belong alternately to the matching and not to the matching. An augmenting path is an alternating path that starts from and ends on free (unmatched) vertices. Berge's lemma states that a matching M is maximum if and only if there is no augmenting path with respect to M {\displaystyle M} . Using Berge's lemma, we can start from any matching M {\displaystyle M} and repeatedly apply augmenting paths until no more augmenting paths are found. This reduces the problem of finding a large matching to finding augmented paths.

Properties In any graph without isolated vertices, the sum of the matching number and the edge covering number equals the number of vertices. If there is a perfect matching, then both the matching number and the edge cover number are |V | / 2.

… excerpt ends here. Continue reading the full article.

Illustrations

Matching (graph theory) illustration
Matching (graph theory) illustration

Worked examples

Example 1 — a first encounter with Matching (graph theory)

Start with the simplest possible case. Write down what Matching (graph theory) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Matching (graph theory) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Matching (graph theory) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Matching (graph theory)

In research
Matching (graph theory) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Matching (graph theory) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Matching (graph theory) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorial optimization, Computational problems in graph theory, Matching (graph theory), so understanding it makes those chapters shorter.
In everyday life
Look for Matching (graph theory) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Matching (graph theory)” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Matching (graph theory) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Matching (graph theory) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Matching (graph theory) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Matching (graph theory) in simple terms?

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. In other words, a subset of the edges is a matching if each vertex appears in at most one edge of that matching.

Why does Matching (graph theory) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Matching (graph theory)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Matching (graph theory).

Tags

  • Combinatorial optimization
  • Computational problems in graph theory
  • Matching (graph theory)
  • Polynomial-time problems

Keep exploring