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

Graph Matching and Hall's Marriage Theorem

College Depth 81 in the knowledge graph I know this Set as goal
15topics build on this
396prerequisites beneath it
See this on the map →
Bipartite Graphs and 2-ColorabilityNetwork Flows: Maximum Flow and Minimum Cut
graph-theory matching halls-theorem

Core Idea

A matching is a set of edges with no common vertices. A perfect matching covers all vertices. Hall's Marriage Theorem: a bipartite graph G = (X ∪ Y, E) has a matching covering all vertices in X if and only if for every subset S ⊆ X, |N(S)| ≥ |S|, where N(S) is the neighborhood of S.

Explainer

From your study of bipartite graphs, you know that a bipartite graph separates its vertices into two independent sets X and Y, with edges only running between the sets — never within them. Imagine X represents a set of job applicants and Y represents job openings, with an edge meaning "this applicant is qualified for this job." A matching is an assignment of applicants to jobs where no two applicants share a job and no applicant holds multiple jobs — formally, a set of edges with no repeated vertices. A perfect matching from X to Y assigns every applicant in X to a distinct job.

The obvious question is: when does such an assignment exist? Hall's Marriage Theorem gives a clean, complete answer. The condition is intuitively natural: for every group S of applicants, there must be at least |S| distinct jobs they are collectively qualified for. If five applicants are all only qualified for the same two jobs, no assignment can work — three will be left out. Formally, for every subset S ⊆ X, the neighborhood N(S) (all vertices in Y adjacent to at least one vertex in S) must satisfy |N(S)| ≥ |S|. This is called Hall's condition.

What makes the theorem remarkable is that it is both necessary *and* sufficient. It's obvious that Hall's condition is necessary (if some S violates it, you can't match those vertices). The deep part is sufficiency: if Hall's condition holds for *every* possible subset S, then a perfect matching is guaranteed to exist. You don't need to construct the matching explicitly to know it exists — the condition alone certifies it. The proof proceeds by strong induction on |X|, considering whether the graph is "tight" (some S achieves |N(S)| = |S|) or "loose" everywhere.

Hall's theorem is a template for a broader class of existence results. Whenever you want to show that a combinatorial assignment exists without constructing it explicitly, you look for a condition analogous to Hall's that eliminates the obvious obstructions and then proves no others can occur. This same logic underlies network flow algorithms and Latin square completions. In practice, if you can verify Hall's condition algorithmically, you can also *find* a maximum matching using augmenting path algorithms — the theorem tells you what to look for, and the algorithm finds it.

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 ConnectivityTrees and Spanning TreesPlanar Graphs and Euler's FormulaGraph Coloring and the Chromatic NumberGraph Coloring and Chromatic NumbersBipartite Graphs and Matching ProblemsBipartite Graphs and 2-ColorabilityGraph Matching and Hall's Marriage Theorem

Longest path: 82 steps · 396 total prerequisite topics

Prerequisites (1)

Leads To (1)