Nepedia
Back to Discover
Independent Reader
🔢

Maximum-cardinality matching

math Maturity 11-13 Next article →

Imagine you have many dots and lines.

Maximum cardinality matching
Maximum cardinality matching

Each line joins two dots. This is called a graph. We want to pick as many lines as we can. But there is a rule. Each dot can only have one line. This task is called maximum-cardinality matching. It means finding the largest group of lines that follow the rule.

Some graphs are special. They are bipartite graphs. In these, dots sit in two groups. Lines only go from the left group to the right group. Computers can solve these very fast. One way is the Ford-Fulkerson algorithm. This method uses a flow network. It treats the lines like water flowing through pipes. Another way is the Hopcroft-Karp algorithm. It is even faster because it looks for many paths at once.

Other graphs are not bipartite. These are general graphs. For these, we use the blossom algorithm. There are also very complex ways to solve them. Finding a perfect matching is one goal. This means every single dot has a partner. This math helps us solve many grouping puzzles.

179 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Maximum cardinality matching.svg
Maximum cardinality matching.svg
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.