Log in Sign up
Back to Discover
🔢

Matching (graph theory)

math Maturity 11-13

Imagine you have many friends.

Maximal-matching.svg
Maximal-matching.svg
You want to pick pairs to play. Each person can only be in one pair. We try to make as many pairs as we can. This helps everyone play together. Can you find all the pairs?
Maximum-matching-labels.svg
Maximum-matching-labels.svg

43 words

Imagine you have many dots.

Maximal-matching.svg
Maximal-matching.svg
You draw lines to connect them. A matching is a set of lines. In a matching, no two lines touch. Each dot can only have one line.
Maximum-matching-labels.svg
Maximum-matching-labels.svg
Some matchings are small. Some matchings are the biggest they can be. A perfect matching is special. It connects every single dot. You can only have a perfect matching if you have an even number of dots. This helps us solve puzzles in science and math.

80 words

Imagine you have a group of dots. You draw lines to connect them. In math, we call this a graph.

Maximal-matching.svg
Maximal-matching.svg
A matching is a set of lines where no two lines share a dot. Each dot can only be part of one line in the matching. If a dot has a line, we say it is matched. If it has no line, it is unmatched.

There are different kinds of matchings. A maximal matching is one where you cannot add any more lines without breaking the rules. A maximum matching is the biggest one possible. It uses the most lines you can find in that graph.

Maximum-matching-labels.svg
Maximum-matching-labels.svg
A perfect matching is even more special. It matches every single dot in the graph. You can only have a perfect matching if you have an even number of dots.

Math helps us find these matchings in the real world. Scientists use them to study chemicals. They look at how atoms connect to make molecules. Finding the best matching can also help solve problems about moving goods or picking classes for school.

180 words

Imagine you have a collection of dots connected by lines. In math, this is called a graph. A matching is a special set of these lines. The rule is simple: no two lines can share the same dot.

Maximal-matching.svg
Maximal-matching.svg
If a dot is part of a line, we say it is matched or saturated. If it has no line, it is unmatched or unsaturated. This idea helps us understand how things can be paired up without any overlaps. It is a way to find connections that stay separate from one another.

There are different ways to look at these sets of lines. A maximal matching is one where you cannot add any more lines without breaking the rules. Every edge in the graph must touch at least one line in your matching.

Maximum-matching-labels.svg
Maximum-matching-labels.svg
A maximum matching is different because it is the largest possible set. It uses the highest number of lines the graph can hold. This number is called the matching number. Every maximum matching is maximal, but not every maximal matching is the largest one. A perfect matching is the most complete version. It matches every single dot in the graph so that nothing is left alone.

Math history shows us many ways to solve these puzzles. For certain types of graphs, like bipartite graphs, we can use network flow to find the best matching. Finding the largest matching in a general graph is much harder. A mathematician named Jack Edmonds created the blossom algorithm to help solve this. There is also Kőnig's theorem for bipartite graphs. It says the maximum matching is the same size as the minimum vertex cover. Other thinkers like Hall and Tutte created theorems to describe when perfect matchings can exist.

Scientists and researchers use these rules for many tasks. In chemistry, they study aromatic compounds using Kekulé structures. These structures show how atoms connect in a molecule using a perfect matching.

Maximal-matching.svg
Maximal-matching.svg
This helps scientists understand the shape of things like benzene. In computer science, people study online bipartite matching. This is when new clients arrive one by one and must be matched to servers immediately. This is used in things like online ad auctions. Other problems include the Hitchcock transport problem and the Chinese postman problem.

Matching helps us organize the world around us. It can help a student choose the right classes to graduate. It can also help a company move goods using the least amount of effort. Even the way we count connections is important. The Hosoya index is a way to count the total number of matchings in a graph.

Maximum-matching-labels.svg
Maximum-matching-labels.svg
Whether we are looking at tiny molecules or big delivery routes, matching gives us a way to find the best pairs.

454 words

In graph theory, a matching is a specific way to select connections between points. A graph consists of vertices, which are points, and edges, which are the lines connecting them. A matching, also called an independent edge set, is a collection of edges where no two edges share a common vertex.

Maximal-matching.svg
Maximal-matching.svg
This means that every vertex in the graph is connected to at most one edge in the matching. If a vertex is an endpoint of an edge in the matching, it is called matched or saturated. If it is not connected to any edge in the matching, it is unmatched or unsaturated. This concept allows mathematicians to study how elements in a system can be paired without overlapping.

There are several distinct types of matchings based on how many edges they contain. A maximal matching is a set of edges that cannot be expanded by adding another edge without breaking the rule of no shared vertices. In a maximal matching, every edge in the original graph must touch at least one edge in the matching. However, a maximal matching is not always the largest possible set. A maximum matching, or maximum-cardinality matching, is a matching that contains the highest possible number of edges for that graph. The total number of edges in a maximum matching is known as the matching number.

Maximum-matching-labels.svg
Maximum-matching-labels.svg
While every maximum matching is maximal, not every maximal matching is a maximum matching.

Even more specific is the perfect matching. A perfect matching is a set of edges that matches every single vertex in the graph. In a perfect matching, every vertex is incident to exactly one edge from the matching. For a graph to have a perfect matching, it must have an even number of vertices. If a graph has an odd number of vertices, it can only have a near-perfect matching, which leaves exactly one vertex unmatched. If every vertex in a graph can be left unmatched by some near-perfect matching, the graph is called factor-critical. Every perfect matching is both maximum and maximal.

Mathematicians have developed several theorems to understand these structures. Kőnig's theorem states that in bipartite graphs, the size of the maximum matching equals the size of the minimum vertex cover. Hall's marriage theorem provides a way to identify which bipartite graphs have a perfect matching. For all types of graphs, Tutte's theorem provides a characterization for perfect matchings. Another important concept is the augmenting path. An augmenting path is an alternating path that starts and ends at unmatched vertices. Berge's lemma states that a matching is maximum if and only if no such augmenting path exists.

Finding these matchings often requires complex algorithms. For bipartite graphs, the Hopcroft-Karp algorithm can find a maximum matching in $O(E\sqrt{V})$ time. In weighted bipartite graphs, where edges have different values, the Hungarian algorithm is used to solve the assignment problem. For general graphs, which are more difficult to solve, Jack Edmonds developed the blossom algorithm. This algorithm allows for finding a maximum weight matching in non-bipartite graphs. While finding a maximal matching is easy using a greedy algorithm, finding a minimum maximal matching is much harder and is classified as an NP-hard problem.

Matching theory has deep connections to other scientific fields. In chemistry, the study of aromatic compounds uses Kekulé structures. These structures represent a perfect matching of the carbon skeleton in a molecule. For example, the benzene molecule can be viewed as a 6-vertex cycle with a specific matching of double bonds. The Hosoya index is used in computational chemistry to count the number of non-empty matchings in a molecule. This helps scientists investigate the properties of organic compounds through mathematical modeling.

Beyond chemistry, matching is used in logistics and computer science. The Chinese postman problem involves finding a minimum-weight perfect matching as a part of its solution. In computer science, online bipartite matching deals with "clients" and "servers" that arrive at different times. This model is used in online ad auctions where decisions must be made immediately. Even academic planning uses these ideas, such as the graduation problem, which involves choosing a minimum set of classes to meet requirements. Whether in molecules or digital markets, matching helps optimize complex systems.

700 words
🖼️ Images & Media (2)
File:Maximal-matching.svg
Maximal-matching.svg
File:Maximum-matching-labels.svg
Maximum-matching-labels.svg
Up Next
🔢
Maximum-cardinality matching
Math
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.