A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Matchings in Bipartite Graphs

Graduate Depth 76 in the knowledge graph I know this Set as goal
3topics build on this
387prerequisites beneath it
See this on the map →
Bipartite Graphs and MatchingsHall's Marriage Theorem
graph-theory matching bipartite

Core Idea

A matching is a set of edges with no shared vertices; in bipartite graphs, matchings model assignments between two sets. A maximum matching uses the most edges; a perfect matching covers all vertices. Bipartite matching is fundamental to applications like job assignment, resource allocation, and network optimization.

Explainer

Your prerequisite on bipartite graphs established that a bipartite graph has two disjoint vertex sets L and R, with all edges running between L and R (never within a side). Think of L as a set of workers and R as a set of jobs, with an edge meaning "this worker is qualified for this job." The question of interest is: how many workers can we assign to jobs simultaneously, with each worker doing at most one job and each job going to at most one worker? This is the matching problem.

A matching is a subset of edges in which no vertex appears more than once — each worker is assigned at most one job, and each job is filled by at most one worker. A maximum matching is the largest such set. A perfect matching goes further: every vertex on both sides is matched, so the assignment is total with no unmatched workers or jobs. Perfect matchings are only possible when |L| = |R| and the structure of the graph permits it. The upcoming topic Hall's Marriage Theorem gives the exact condition: a perfect matching from L into R exists if and only if for every subset S ⊆ L, the neighborhood of S (jobs reachable from S) has |N(S)| ≥ |S|. Intuitively, no group of workers can "crowd" a smaller pool of jobs.

The standard algorithm for finding a maximum matching uses augmenting paths. An augmenting path starts at an unmatched vertex in L, alternates between unmatched and matched edges, and ends at an unmatched vertex in R. Following such a path and flipping which edges are in the matching (matched edges become unmatched, unmatched become matched) increases the matching size by one. This process repeats until no augmenting path exists, at which point the matching is maximum. The algorithm runs in O(V·E) time.

The breadth of applications is remarkable. Bipartite matching models medical residency assignments, school scheduling (teachers to classrooms), network flow routing, and even database query optimization. Extending from matchings to weighted matchings — where each assignment has a cost and you want minimum or maximum total cost — leads to the Hungarian algorithm and the theory of optimal transport. The bipartite case is the cleanest entry point to a rich family of combinatorial optimization problems that appear throughout operations research and theoretical computer science.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsThe Distributive PropertyVariables and Expressions ReviewIntroduction to PolynomialsAdding and Subtracting PolynomialsMultiplying PolynomialsFactorialPermutationsCombinationsCounting Principles: Addition and Multiplication RulesIntroduction to Graph TheoryPropositional Logic FoundationsLogical EquivalencesSet Operations: Union, Intersection, and ComplementProof by CasesProving by Cases and ExhaustionVacuous Truth and Trivial CasesProof by Cases (Proof by Exhaustion)Mathematical InductionGraph Paths, Cycles, and ConnectivityBipartite Graphs and MatchingsMatchings in Bipartite Graphs

Longest path: 77 steps · 387 total prerequisite topics

Prerequisites (1)

Leads To (1)