From Matchings to Hall’s Condition
Hall’s theorem connects a local counting condition to the existence of a matching that covers an entire side of a bipartite graph. The augmenting-path proof makes the connection constructive: if a maximum matching leaves a left vertex uncovered, following alternating edges from that vertex produces a set of left vertices with too few neighbors.
Throughout, \(G=(L\cup R,E)\) is a finite simple bipartite graph with disjoint parts \(L\) and \(R\); every edge has one endpoint in each part. For \(S\subseteq L\), its neighborhood is \(N(S)=\{r\in R: \ell r\in E\text{ for some }\ell\in S\}\). A matching is a set of edges with no shared endpoints. It saturates \(L\) if every vertex in \(L\) is incident to one of its edges.
An augmenting path starts and ends with edges outside \(M\), so it contains one more edge outside \(M\) than inside it. After the replacement, every internal vertex is still incident to exactly one selected edge, while each endpoint becomes matched. Thus the new set is a matching with one more edge.
The theorem’s condition concerns every subset of the left side, not just the whole side. If \(S\) has \(k\) vertices and fewer than \(k\) neighbors, distinct representatives for all vertices of \(S\) are impossible: each would need a different neighbor in \(N(S)\).
Why the Absence of an Augmenting Path Matters
Proof. If there is an augmenting path, changing the edges of \(M\) along it gives a matching with one more edge, so \(M\) is not maximum. Conversely, suppose \(M\) is not maximum. Choose a matching \(M'\) with \(|M'|>|M|\), and consider the graph consisting of the edges that belong to exactly one of \(M\) and \(M'\). At each vertex there is at most one incident edge from each matching, so every vertex has degree at most two in this graph. Each of its components is therefore an isolated vertex, a path, or a cycle. Along every nontrivial component the edges alternate between \(M\) and \(M'\), since two consecutive edges cannot belong to the same matching. An alternating cycle has equally many edges from each matching. An alternating path has either equal numbers or one more edge from one matching than the other. Because \(M'\) has more edges in total, some component has more \(M'\)-edges than \(M\)-edges. That component must be a path beginning and ending with \(M'\)-edges. Its endpoints have no incident \(M\)-edge in the component, and they have no other incident \(M\)-edge outside it: any such edge would also belong to the graph under consideration and would extend the component. Hence both endpoints are unmatched by \(M\). The path is an augmenting path for \(M\), proving the converse. \(\square\)
This lemma lets us use a maximum matching as a certificate that no augmenting path remains. Since the graph is finite, a maximum matching exists: among the finitely many subsets of \(E\), at least one matching has largest size.
Hall’s Theorem by Alternating Reachability
Proof. First suppose a matching \(M\) saturates \(L\). For any \(S\subseteq L\), the matching edges incident to vertices in \(S\) have distinct endpoints in \(R\), all belonging to \(N(S)\). There are \(|S|\) such endpoints, so \(|N(S)|\ge |S|\). This also holds for \(S=\varnothing\), since both sizes are zero.
For the converse, suppose the condition holds, and choose a maximum matching \(M\). Assume, seeking a contradiction, that \(M\) does not saturate \(L\). Choose an unmatched vertex \(\ell_0\in L\). Direct every edge outside \(M\) from \(L\) to \(R\), and every edge in \(M\) from \(R\) to \(L\). Let \(S\subseteq L\) and \(T\subseteq R\) be the vertices reachable from \(\ell_0\) by following these directions, including \(\ell_0\) in \(S\).
No vertex of \(T\) can be unmatched by \(M\). If one were, a directed path from \(\ell_0\) to it would be an alternating path with unmatched endpoints, hence an augmenting path. That contradicts the maximality of \(M\), by the lemma.
We now show \(N(S)=T\). Every vertex of \(T\) is reached across an edge from a vertex of \(S\), so \(T\subseteq N(S)\). For the reverse inclusion, take \(\ell\in S\) and an edge \(\ell r\). If \(\ell r\notin M\), the directed edge goes from \(\ell\) to \(r\), so \(r\in T\). If \(\ell r\in M\), then \(\ell\ne\ell_0\), because \(\ell_0\) is unmatched. Every reached left vertex other than \(\ell_0\) was reached from its matched partner, so \(r\in T\) in this case as well. Thus every neighbor of \(S\) is in \(T\), proving equality.
Every vertex of \(T\) is matched, and its matched partner is in \(S\), because the matched edge is directed from \(T\) to \(S\). Conversely, every vertex of \(S\setminus\{\ell_0\}\) was reached along its matched edge from a vertex of \(T\). These matched edges pair \(T\) bijectively with \(S\setminus\{\ell_0\}\). Therefore \[ |N(S)|=|T|=|S|-1<|S|, \] contradicting the assumed condition for this subset \(S\). The contradiction shows that \(M\) saturates \(L\). If \(L\) is empty, the empty matching already saturates it, so the conclusion holds in that case too. \(\square\)
Worked Examples
Worked Example: An Augmentation Covers the Left Side
Let \(L=\{a,b,c\}\), \(R=\{1,2,3\}\), and \(E=\{a1,a2,b1,c3\}\). Begin with the matching \(M_0=\{a1,c3\}\). Vertex \(b\) is unmatched. Find an augmenting path and update the matching.
The path \(b,1,a,2\) uses \(b1\notin M_0\), then \(1a\in M_0\), then \(a2\notin M_0\). Its endpoints \(b\) and \(2\) are both unmatched. Removing the path’s matched edge \(a1\) and adding its other two edges gives \[ M_1=(M_0\setminus\{a1\})\cup\{b1,a2\}=\{b1,a2,c3\}. \] Each vertex of \(L\) is incident to exactly one edge of \(M_1\), so it saturates \(L\).
Check: the three matching edges \(b1,a2,c3\) have distinct endpoints, so \(M_1\) is a matching of size \(3=|L|\). No matching can have more than \(|L|=3\) edges, since each matching edge uses a different left vertex. Thus this matching is maximum as well as saturating.
Worked Example: Reachability Finds a Hall Violation
Let \(L=\{p,q,r\}\), \(R=\{x,y\}\), and \(E=\{px,qx,ry\}\). The matching \(M=\{qx,ry\}\) has size \(2\), and \(p\) is unmatched. Use alternating reachability from \(p\).
Starting at \(p\), the unmatched edge \(px\) leads to \(x\). The matched edge \(xq\) then leads to \(q\). From \(q\), its only neighbor is \(x\), already reached. Vertex \(r\) is not reached: its only neighbor \(y\) is in a separate component. Consequently \(S=\{p,q\}\) and \(T=\{x\}\). Directly from the edge set, \[ N(S)=N(\{p,q\})=\{x\},\qquad |N(S)|=1<2=|S|. \] The theorem’s necessary condition fails, so no matching can saturate \(L\).
Check: \(\{qx,ry\}\) is a matching of size \(2\), and every matching has at most \(|R|=2\) edges. Hence \(M\) is maximum. The reachable-set calculation gives the same obstruction as Hall’s condition: the two vertices \(p,q\) have only one available neighbor between them.
Worked Example: Checking Hall’s Condition on Every Subset
Let \(L=\{u,v,w\}\), \(R=\{1,2,3,4\}\), and \(E=\{u1,u2,v1,v2,w2,w3\}\). Check Hall’s condition, including the empty set, and exhibit a matching that saturates \(L\).
For the empty subset, \(|N(\varnothing)|=0=|\varnothing|\). For singletons, \(N(\{u\})=\{1,2\}\), \(N(\{v\})=\{1,2\}\), and \(N(\{w\})=\{2,3\}\); each neighborhood has size \(2\), at least the subset size \(1\). For pairs, \[ N(\{u,v\})=\{1,2\},\quad N(\{u,w\})=\{1,2,3\},\quad N(\{v,w\})=\{1,2,3\}. \] Their neighborhood sizes are \(2,3,3\), respectively, all at least \(2\). Finally, \(N(L)=\{1,2,3\}\), so \(|N(L)|=3=|L|\). These are all \(2^3=8\) subsets: the empty set, three singletons, three pairs, and \(L\).
The edges \(u1,v2,w3\) form a matching, since their left endpoints are distinct and their right endpoints are distinct. This matching saturates \(L\).
Check: the matching has \(3\) edges, equal to \(|L|=3\), and the subset checks show that no Hall obstruction was missed. Vertex \(4\) is isolated; it does not affect the neighborhoods of subsets of \(L\) or the matching.
Using the Proof as a Procedure
The converse proof also explains how to search for a matching. Start with any matching. From an unmatched left vertex, follow edges outside the matching from left to right, and matched edges from right to left. If an unmatched right vertex is reached, the path to it is augmenting; flip the matched and unmatched edges along that path. If no unmatched right vertex is reached, the reachable left set \(S\) and right set \(T\) satisfy \(N(S)=T\) and \(|T|=|S|-1\), giving an explicit failure of Hall’s condition.
Each augmentation increases the matching size by one, and a matching has at most \(|L|\) edges. Thus the process cannot augment more than \(|L|\) times. If Hall’s condition holds, the theorem proves that a maximum matching saturates \(L\); if the process stops without saturation, the reachable set certifies a violation. The proof therefore gives both a matching when the condition succeeds and a specific obstructing subset when it fails.
A Common Mistake
Having enough vertices on the right is not enough. For example, let \(L=\{a,b,c\}\), \(R=\{1,2,3\}\), and \(E=\{a1,b1,c1\}\). Although \(|R|=|L|=3\), every left vertex has the same sole neighbor. For \(S=L\), the correct calculation is \(N(S)=\{1\}\), so \(|N(S)|=1<3=|S|\). A matching can contain only one edge.
A related error is stopping the reachability search after finding the neighbors of the starting vertex. In the example with edges \(px,qx,ry\), the starting vertex \(p\) first reaches \(x\), but the matched edge from \(x\) then reaches \(q\). The relevant set is \(S=\{p,q\}\), not just \(\{p\}\). Following both directions of the alternating search is what exposes the shortage \(|N(S)|=1<2=|S|\).
Check Your Understanding
For each question, distinguish the size of a matching from whether it saturates the left side.
- In the graph with \(L=\{a,b\}\), \(R=\{1,2\}\), and \(E=\{a1,b1\}\), find a subset that violates Hall’s condition and state the largest possible matching size.
- Explain why flipping the edges along an augmenting path increases a matching’s size by exactly one.
- For \(L=\{x,y\}\), \(R=\{1,2,3\}\), and \(E=\{x1,x2,y2,y3\}\), list the neighborhood sizes for all subsets of \(L\). Does Hall’s condition hold?
- In the reachability proof, why must every reached right vertex be matched when the matching is maximum?
- Why does each reached left vertex other than the starting unmatched vertex have a matched partner in the reached right set?