Maths WorkshopMaths problems with full solutions
Exercise 1941Combinatorics › Graph theoryOlympiadAdded 4 Nov 2026

Hall's marriage theorem and regular bipartite graphs

#Hall's theorem#matchings#bipartite graphs#induction

Statement

Let GG be a finite bipartite graph with classes AA and BB. For S⊆AS\subseteq A, let N(S)N(S) be the set of vertices of BB adjacent to at least one vertex of SS.

  1. (Hall.) Prove that AA can be matched into BB if and only if ∣N(S)∣≥∣S∣|N(S)|\ge|S| for every S⊆AS\subseteq A.
  2. Deduce that a kk-regular bipartite graph (k≥1k\ge1) has a perfect matching.
  3. A deck of 5252 cards is dealt into 1313 piles of 44 cards. Show that one can choose one card from each pile so that the 1313 chosen cards have all different ranks.
Hint

For part 1 use induction on ∣A∣|A|, with two cases: either every proper nonempty SS has ∣N(S)∣≥∣S∣+1|N(S)|\ge|S|+1 (slack), or some proper nonempty SS has ∣N(S)∣=∣S∣|N(S)|=|S| (tight).

Show solutionHide solution

Solution

1. (⇒\Rightarrow) is clear: the ∣S∣|S| partners of the vertices of SS are distinct elements of N(S)N(S).

(⇐\Leftarrow) Induction on ∣A∣|A|; the case ∣A∣=1|A|=1 is clear. Assume Hall's condition.

*Case 1: ∣N(S)∣≥∣S∣+1|N(S)|\ge|S|+1 for every nonempty proper S⊂AS\subset A.* Pick any a∈Aa\in A and any neighbour bb of aa. Remove aa and bb. For every nonempty S⊆A∖{a}S\subseteq A\setminus\{a\}, removing bb lowers the neighbourhood by at most 11, so ∣N′(S)∣≥∣N(S)∣−1≥∣S∣|N'(S)|\ge|N(S)|-1\ge|S|. By induction A∖{a}A\setminus\{a\} can be matched, and we add the pair {a,b}\{a,b\}.

*Case 2: some nonempty proper SS has ∣N(S)∣=∣S∣|N(S)|=|S|.* The graph induced on S∪N(S)S\cup N(S) satisfies Hall's condition, so by induction SS is matched onto N(S)N(S). In the rest of the graph,
∣N(T)∖N(S)∣=∣N(T∪S)∣−∣N(S)∣≥∣T∣+∣S∣−∣S∣=∣T∣.|N(T)\setminus N(S)|=|N(T\cup S)|-|N(S)|\ge|T|+|S|-|S|=|T|.
So Hall's condition holds there and, by induction, A∖SA\setminus S is matched. The two matchings together match AA.

2. Counting edges, k∣A∣=k∣B∣k|A|=k|B|, so ∣A∣=∣B∣|A|=|B|. For S⊆AS\subseteq A, there are k∣S∣k|S| edges leaving SS, and they all end in N(S)N(S), where each vertex receives at most kk of them. So k∣N(S)∣≥k∣S∣k|N(S)|\ge k|S|. By Hall, AA is matched into BB, and since ∣A∣=∣B∣|A|=|B| this matching is perfect.

3. Let AA be the set of 1313 piles, BB the set of 1313 ranks. This is a 44-regular bipartite multigraph. A perfect matching is exactly the required choice.

Lesson. To prove a matching exists, check Hall's condition; for regular graphs, double count edges.