Skip to content

Chapter 58. Hall's Marriage Theorem

Chapter 58. Hall’s Marriage Theorem

Hall’s marriage theorem is one of the central results of combinatorics and graph theory. It gives a complete characterization of when a bipartite graph contains a matching that saturates one side of the graph. The theorem connects local neighborhood structure with global pairing possibilities. (en.wikipedia.org)

The theorem is often described through the marriage problem. Suppose a collection of people each has a set of acceptable partners. The question is whether every person can be matched with a distinct acceptable partner. Hall’s theorem gives an exact answer.

Although the theorem is stated for bipartite graphs, its influence extends into combinatorics, optimization, matrix theory, scheduling, network flows, and design theory.

58.1 Bipartite Graphs

Let

G=(XY,E) G = (X \cup Y, E)

be a bipartite graph.

The vertex set is divided into two disjoint parts:

XY=, X \cap Y = \varnothing,

and every edge joins a vertex in XX to a vertex in YY.

A matching MM is called an XX-saturating matching if every vertex in XX is matched by MM.

Thus,

xX,yY \forall x \in X, \quad \exists y \in Y

such that

xyM. xy \in M.

Different vertices of XX must be matched to different vertices of YY.

The central question is:

When does a bipartite graph contain an XX-saturating matching?

Hall’s theorem answers this exactly.

58.2 Neighborhoods

For a vertex

xX, x \in X,

the neighborhood of xx is the set

N(x)={yY:xyE}. N(x) = \{y \in Y : xy \in E\}.

More generally, for a subset

AX, A \subseteq X,

the neighborhood of AA is

N(A)=xAN(x). N(A) = \bigcup_{x \in A} N(x).

Thus N(A)N(A) contains all vertices in YY adjacent to at least one vertex in AA.

For example, suppose

A={x1,x2}, A = \{x_1,x_2\},

and

N(x1)={y1,y2},N(x2)={y2,y3}. N(x_1)=\{y_1,y_2\}, \qquad N(x_2)=\{y_2,y_3\}.

Then

N(A)={y1,y2,y3}. N(A)=\{y_1,y_2,y_3\}.

The neighborhood set measures how many possible partners are available for vertices in AA.

58.3 Hall’s Condition

Hall’s condition states that for every subset

AX, A \subseteq X,

the neighborhood satisfies

N(A)A. |N(A)| \geq |A|.

This condition says that every group of vertices in XX collectively has at least as many available neighbors in YY.

|N(A)| \ge |A|

The intuition is straightforward.

If some subset AA contains more vertices than its neighborhood, then there are not enough distinct vertices in YY to match all vertices of AA. At least two vertices in AA would be forced to share a partner, which is forbidden in a matching.

Thus Hall’s condition is clearly necessary.

The remarkable fact is that it is also sufficient.

58.4 Hall’s Marriage Theorem

Theorem 58.1. Hall’s Marriage Theorem.
Let

G=(XY,E) G = (X \cup Y,E)

be a bipartite graph. Then GG contains an XX-saturating matching if and only if for every subset

AX, A \subseteq X, N(A)A. |N(A)| \ge |A|.

(en.wikipedia.org)

This theorem completely solves the bipartite matching problem for one side of the graph.

58.5 Necessity of Hall’s Condition

Suppose GG contains an XX-saturating matching MM.

Let

AX. A \subseteq X.

Every vertex in AA is matched to a distinct vertex in YY. Since matching edges are disjoint, distinct vertices in AA must be matched to distinct vertices in N(A)N(A).

Therefore,

N(A)A. |N(A)| \ge |A|.

Thus Hall’s condition is necessary.

The proof is immediate once the meaning of a matching is understood.

58.6 Proof of Sufficiency

The converse direction is deeper.

We prove Hall’s theorem by induction on

X. |X|.

Assume Hall’s condition holds.

Case 1

Suppose

N(A)>A |N(A)| > |A|

for every nonempty proper subset

AX. A \subsetneq X.

Choose any edge

xyE. xy \in E.

Remove xx and yy from the graph. Let the remaining bipartite graph be

G. G'.

We claim Hall’s condition still holds in GG'.

Suppose not. Then some subset

AX{x} A' \subseteq X \setminus \{x\}

satisfies

NG(A)<A. |N_{G'}(A')| < |A'|.

In the original graph,

NG(A) N_G(A')

can differ from

NG(A) N_{G'}(A')

by at most the vertex yy. Therefore,

NG(A)A. |N_G(A')| \le |A'|.

Since strict inequality is impossible by Hall’s condition, we obtain

NG(A)=A. |N_G(A')| = |A'|.

But this contradicts the assumption that every proper nonempty subset has strictly larger neighborhood.

Thus Hall’s condition holds in GG'. By induction, GG' has a matching saturating all remaining vertices. Adding the edge xyxy gives an XX-saturating matching in GG.

Case 2

Suppose there exists a nonempty proper subset

AX A \subsetneq X

such that

N(A)=A. |N(A)| = |A|.

Consider the induced bipartite subgraph on

AN(A). A \cup N(A).

Hall’s condition holds inside this subgraph, so by induction it contains a matching saturating AA.

Now remove

AN(A) A \cup N(A)

from the graph.

Let the remaining graph have parts

X=XA,Y=YN(A). X' = X \setminus A, \qquad Y' = Y \setminus N(A).

We claim Hall’s condition holds in the remaining graph.

Let

BX. B \subseteq X'.

Suppose

NY(B)<B. |N_{Y'}(B)| < |B|.

Then in the original graph,

N(BA)<B+A. |N(B \cup A)| < |B| + |A|.

But

BA=B+A, |B \cup A| = |B| + |A|,

contradicting Hall’s condition.

Thus the remaining graph satisfies Hall’s condition. By induction it has a matching saturating XX'.

Combining the two matchings gives a matching saturating all of XX.

This completes the proof.

58.7 Marriage Interpretation

Hall’s theorem is traditionally described as the marriage problem.

Suppose:

SetInterpretation
XXWomen
YYMen
Edge xyxyWoman xx is willing to marry man yy

The question asks whether every woman can marry a distinct acceptable man.

Hall’s condition says:

Every group of women must collectively know at least as many acceptable men as the size of the group.

If a set of kk women collectively knows only k1k-1 men, then distinct marriages are impossible.

Hall’s theorem states that this obvious obstruction is the only obstruction.

Although the terminology is historical, the theorem applies to arbitrary pairing problems.

58.8 Perfect Matchings in Bipartite Graphs

Suppose

X=Y. |X| = |Y|.

Then Hall’s theorem implies:

A bipartite graph has a perfect matching if and only if Hall’s condition holds.

Indeed, an XX-saturating matching uses exactly X|X| vertices of YY. Since the two parts have equal size, every vertex in YY is also matched.

Thus the matching is perfect.

58.9 Systems of Distinct Representatives

Hall’s theorem is equivalent to the existence of systems of distinct representatives.

Suppose

A1,A2,,An A_1, A_2, \ldots, A_n

are finite sets.

A system of distinct representatives consists of elements

aiAi a_i \in A_i

such that all chosen elements are distinct.

Hall’s condition becomes:

For every index subset

I{1,,n}, I \subseteq \{1,\ldots,n\}, iIAiI. \left| \bigcup_{i \in I} A_i \right| \ge |I|.

Hall’s theorem states that this condition is necessary and sufficient for a system of distinct representatives to exist.

This formulation is common in combinatorics.

58.10 Examples

Example 1

Let

X={x1,x2,x3},Y={y1,y2,y3}, X=\{x_1,x_2,x_3\}, \qquad Y=\{y_1,y_2,y_3\},

with edges

x1y1,x1y2,x2y2,x3y3. x_1y_1, \quad x_1y_2, \quad x_2y_2, \quad x_3y_3.

Check Hall’s condition.

Single vertices have neighborhoods of size at least 11.

For two-vertex subsets:

N({x1,x2})={y1,y2}, N(\{x_1,x_2\})=\{y_1,y_2\},

so

N=2. |N|=2.

Similarly,

N({x1,x3})={y1,y2,y3}, N(\{x_1,x_3\})=\{y_1,y_2,y_3\},

and

N({x2,x3})={y2,y3}. N(\{x_2,x_3\})=\{y_2,y_3\}.

Finally,

N(X)=Y. N(X)=Y.

Hall’s condition holds, so a perfect matching exists.

One example is

{{x1,y1},{x2,y2},{x3,y3}}. \{\{x_1,y_1\}, \{x_2,y_2\}, \{x_3,y_3\}\}.

Example 2

Let

X={x1,x2,x3},Y={y1,y2}, X=\{x_1,x_2,x_3\}, \qquad Y=\{y_1,y_2\},

with every edge present.

Then

N(X)=Y, N(X)=Y,

and

N(X)=2<3=X. |N(X)|=2<3=|X|.

Hall’s condition fails, so no matching can saturate XX.

58.11 Regular Bipartite Graphs

Hall’s theorem immediately implies a major structural result.

Theorem 58.2.
Every kk-regular bipartite graph with k1k \ge 1 has a perfect matching.

Proof

Let

G=(XY,E) G=(X \cup Y,E)

be kk-regular.

For any subset

AX, A \subseteq X,

there are exactly

kA k|A|

edges leaving AA.

All these edges end in N(A)N(A). Since each vertex in N(A)N(A) has degree kk,

kAkN(A). k|A| \le k|N(A)|.

Thus,

AN(A). |A| \le |N(A)|.

Hall’s condition holds.

Since regular bipartite graphs satisfy

X=Y, |X|=|Y|,

a perfect matching exists.

This theorem is fundamental in edge-coloring theory and combinatorial design.

58.12 Hall’s Theorem and Flows

Hall’s theorem can be reformulated as a network flow problem.

Construct a directed network:

EdgeCapacity
Source to each xXx \in X11
Each bipartite edge xyxy11
Each yYy \in Y to sink11

An XX-saturating matching corresponds exactly to a flow of value

X. |X|.

Hall’s condition becomes equivalent to the max-flow min-cut condition.

This interpretation connects matching theory with optimization and algorithm design.

58.13 Hall’s Theorem and Latin Squares

Hall’s theorem plays a major role in combinatorial designs.

In Latin square completion problems, one often needs to assign symbols to rows or columns without repetition. These assignments become matching problems in bipartite graphs.

The theorem also appears in scheduling tournaments, allocating resources, and constructing transversal structures.

58.14 Deficiency

The deficiency of a bipartite graph measures how far Hall’s condition fails.

Define

def(G)=maxAX(AN(A)). \operatorname{def}(G) = \max_{A \subseteq X} (|A|-|N(A)|).

Hall’s theorem says:

def(G)=0 \operatorname{def}(G)=0

if and only if an XX-saturating matching exists.

Larger deficiencies correspond to larger unavoidable shortages.

58.15 Infinite Hall Theorem

Hall’s theorem extends to infinite bipartite graphs under suitable finiteness assumptions.

For countably infinite locally finite bipartite graphs, Hall-type conditions still characterize saturating matchings.

These infinite versions require more advanced set-theoretic arguments.

58.16 Common Consequences

StatementConsequence
Hall’s condition holdsXX-saturating matching exists
(X
Some subset satisfies (N(A)
kk-regular bipartite graphPerfect matching exists

Hall’s theorem converts matching existence into a neighborhood-counting condition.

58.17 Historical Notes

Hall published the theorem in 1935. It became one of the foundations of modern combinatorics. The theorem later influenced matching algorithms, polyhedral theory, optimization, and network flows.

The marriage interpretation made the theorem widely known, but its importance lies in its structural power. It transforms a difficult global existence problem into a family of local counting inequalities.

58.18 Exercises

  1. Let
X={x1,x2,x3},Y={y1,y2,y3}, X=\{x_1,x_2,x_3\}, \qquad Y=\{y_1,y_2,y_3\},

with edges

x1y1,x2y1,x3y2. x_1y_1, \quad x_2y_1, \quad x_3y_2.

Determine whether Hall’s condition holds.

  1. Prove that every perfect matching in a bipartite graph satisfies Hall’s condition.

  2. Show that the complete bipartite graph Kn,nK_{n,n} has a perfect matching.

  3. Let

A1={1,2},A2={2,3},A3={1,3}. A_1=\{1,2\}, \quad A_2=\{2,3\}, \quad A_3=\{1,3\}.

Find a system of distinct representatives.

  1. Give an example of a bipartite graph where Hall’s condition fails.

  2. Prove that every 11-regular bipartite graph has a perfect matching.

  3. Let GG be bipartite. Show that if some subset AXA \subseteq X satisfies

N(A)<A, |N(A)|<|A|,

then no matching can saturate XX.

  1. Prove Hall’s theorem for the case X=2|X|=2.

  2. Show that every cycle C2nC_{2n} has a perfect matching by using Hall’s theorem.

  3. Explain why Hall’s theorem implies that every regular bipartite graph has a perfect matching.