Lecture Roadmap
Topics for Today
- If every vertex of a graph has degree \(2\), then each connected component is a cycle.
- Dirac's theorem: a simple graph on \(n \ge 3\) vertices with minimum degree at least \(n/2\) is Hamiltonian.
- Definitions of matching, maximal matching, maximum matching, saturation, and Hall's marriage theorem with proof.
Three Reusable Proof Ideas
Where These Results Fit
The first theorem classifies finite connected \(2\)-regular graphs. Dirac's theorem is one of the main sufficient conditions for Hamiltonicity. Hall's theorem gives an exact criterion for when a bipartite graph has a matching that saturates an entire side.
If Every Vertex Has Degree 2, Each Component Is a Cycle
Theorem
Let \(G\) be a finite simple graph in which every vertex has degree \(2\). Then every connected component of \(G\) is a cycle.
So it is enough to prove the connected case: every connected \(2\)-regular simple graph is a cycle.
Degree-2 Contraction
Let \(v\) be a vertex with neighbors \(u\) and \(w\). We suppress or contract the degree-2 vertex \(v\) by deleting \(v\) and its two incident edges, then adding the edge \(uw\).
In a connected \(2\)-regular simple graph with more than \(3\) vertices, the neighbors \(u\) and \(w\) cannot already be adjacent. Otherwise \(u,v,w\) would form a triangle, and \(u\) and \(w\) would already use up their two incident edges, forcing the whole connected component to be exactly that triangle.
What Contraction Preserves
- Connectedness is preserved, because any walk that used \(u-v-w\) can use \(uw\) instead.
- Every remaining vertex still has degree \(2\).
- The number of vertices drops by \(1\), which makes induction possible.
Proof by Induction
We prove that every connected \(2\)-regular simple graph on \(n \ge 3\) vertices is the cycle \(C_n\).
Base case: If \(n=3\), then each of the three vertices has degree \(2\), so every vertex is adjacent to the other two. Hence the graph is \(C_3\).
Induction step: Assume every connected \(2\)-regular simple graph on \(n\) vertices is a cycle. Let \(G\) be a connected \(2\)-regular simple graph on \(n+1\) vertices.
Choose any vertex \(v\), and let its neighbors be \(u\) and \(w\). Since \(n+1>3\), the vertices \(u\) and \(w\) are not adjacent, by the observation above. Suppress \(v\): delete \(v\), delete \(uv\) and \(vw\), and add the edge \(uw\). Call the new graph \(G'\).
Then \(G'\) is connected, simple, and every vertex of \(G'\) still has degree \(2\). Also \(G'\) has \(n\) vertices. By the induction hypothesis, \(G'\) is a cycle \(C_n\).
Now reverse the suppression: replace the edge \(uw\) of that cycle by the path \(u-v-w\). This produces a single cycle through all \(n+1\) vertices, so \(G\) is \(C_{n+1}\).
This completes the induction proof.
Proof by Contradiction Using a Minimal Counterexample
Assume, for contradiction, that there exists a connected \(2\)-regular simple graph that is not a cycle. Among all such counterexamples, choose one with the fewest vertices, and call it \(H\).
The graph \(H\) cannot have \(3\) vertices, because the only connected \(2\)-regular simple graph on \(3\) vertices is \(C_3\). So \(|V(H)|>3\).
Pick a vertex \(v\) of \(H\), with neighbors \(u\) and \(w\). Since \(|V(H)|>3\), the vertices \(u\) and \(w\) are not adjacent. Suppress \(v\) to obtain a smaller connected \(2\)-regular simple graph \(H'\).
Because \(H\) was chosen with the fewest vertices among all counterexamples, the smaller graph \(H'\) cannot be a counterexample. Therefore \(H'\) must be a cycle.
But if \(H'\) is a cycle, then reversing the suppression of \(v\) simply replaces one edge by a two-edge path, and the result is again a cycle. Hence \(H\) is a cycle.
This contradicts the choice of \(H\) as a non-cycle. Therefore no counterexample exists, and every connected \(2\)-regular simple graph is a cycle.
Why the Contradiction Appears
The contradiction comes from the fact that contraction reduces the graph but preserves the hypotheses. A minimal counterexample should remain a counterexample after every reversible simplification, but suppressing a degree-2 vertex makes it smaller. The smaller graph must be a cycle, and then undoing the contraction shows the original graph was a cycle too. That directly violates the assumption that it was a counterexample.
Dirac's Theorem on Hamiltonian Graphs
Dirac's Theorem
Let \(G\) be a simple graph on \(n \ge 3\) vertices. If the minimum degree satisfies
then \(G\) is Hamiltonian.
Proof Strategy: A Maximum Non-Hamiltonian Graph
Assume the theorem is false. Then there exists a non-Hamiltonian graph on \(n\) vertices with minimum degree at least \(n/2\). Among all such graphs, choose one with the maximum possible number of edges.
This choice is the key: every missing edge becomes "dangerous," because if we add it, the graph can no longer remain a non-Hamiltonian counterexample.
Detailed Proof
Assume, for contradiction, that Dirac's theorem is false. Choose a counterexample \(G\) with the maximum possible number of edges among all non-Hamiltonian simple graphs on \(n\) vertices satisfying \(\delta(G)\ge n/2\).
The graph \(G\) is not complete, because every complete graph on at least \(3\) vertices is Hamiltonian. So there exist two nonadjacent vertices \(u\) and \(v\).
Now add the missing edge \(uv\), obtaining the graph \(G+uv\). By the maximal choice of \(G\), the graph \(G+uv\) must be Hamiltonian. Let \(C\) be a Hamiltonian cycle in \(G+uv\).
The cycle \(C\) must use the new edge \(uv\). Otherwise \(C\) would already be a Hamiltonian cycle of \(G\), contradicting that \(G\) is non-Hamiltonian.
Delete the edge \(uv\) from \(C\). What remains is a Hamiltonian path in \(G\) with endpoints \(u\) and \(v\). Write this path as
Now define two index sets:
Because \(x_1\) is not adjacent to \(x_n\), every neighbor of \(x_1\) appears among \(x_2,\dots,x_{n-1}\). Hence
For \(x_n\), the set \(J\) records all neighbors among \(x_1,\dots,x_{n-2}\). The vertex \(x_{n-1}\) is also a neighbor of \(x_n\) because it is adjacent to \(x_n\) on the path, so
Therefore
But both \(I\) and \(J\) are subsets of the set \(\{1,2,\dots,n-2\}\), which has only \(n-2\) elements. Hence \(I\cap J\neq \varnothing\). Choose \(i \in I\cap J\).
Then we have the two edges
These edges let us close the Hamiltonian path into a Hamiltonian cycle:
This uses every vertex exactly once and all its edges belong to \(G\): the forward segment uses path edges, the backward segment uses path edges in reverse, and the two extra edges are \(x_ix_n\) and \(x_{i+1}x_1\).
So \(G\) contains a Hamiltonian cycle after all. This contradicts the assumption that \(G\) was non-Hamiltonian.
Therefore no counterexample exists, and Dirac's theorem is proved.
Why the Contradiction Is Derived
The contradiction is not just that we found a cycle. We found a Hamiltonian cycle in the very graph \(G\) that we assumed was non-Hamiltonian.
- Maximality of \(G\) forces every missing edge to create a Hamiltonian cycle after addition.
- Removing that newly added edge gives a Hamiltonian path whose endpoints have many neighbors.
- The degree lower bound \(\delta(G)\ge n/2\) makes those endpoint neighborhoods overlap in the path order.
- That overlap lets us "rotate" the path into a Hamiltonian cycle already inside \(G\).
So the assumption that a maximum non-Hamiltonian counterexample exists destroys itself.
Matching: Definitions and Basic Notions
Core Definitions
| Term | Meaning |
|---|---|
| Matching | A matching is a subset of edges \(M \subseteq E(G)\) such that no two edges of \(M\) share a common endpoint. |
| Saturated vertex | A vertex is saturated by \(M\) if it is incident with some edge of \(M\). |
| Unsaturated vertex | A vertex not incident with any edge of \(M\) is unsaturated, or free. |
| Maximal matching | \(M\) is maximal if no edge can be added to \(M\) while keeping the matching property. |
| Maximum matching | \(M\) is maximum if it has the largest possible cardinality among all matchings in \(G\). |
| Perfect matching | A matching that saturates every vertex of the graph. |
Maximal versus Maximum
These two words sound similar, but they mean different things.
- Maximum means largest size.
- Maximal means inclusion-wise impossible to extend.
Every maximum matching is maximal, but a maximal matching need not be maximum.
A Small Example
Consider the path
The matching \(\{bc\}\) is maximal, because no further edge can be added to it. But it is not maximum, since \(\{ab,cd\}\) is a larger matching of size \(2\).
In the matching \(\{ab,cd\}\), every vertex is saturated, so it is also a perfect matching.
Matching Language for Bipartite Graphs
In a bipartite graph \(G=(X \cup Y,E)\), Hall's theorem asks when there is a matching that saturates every vertex of \(X\). The matching need not saturate all of \(Y\); it only has to cover the chosen side.
Hall's Marriage Theorem and Its Proof
Neighborhood of a Set
Let \(G=(X \cup Y,E)\) be a bipartite graph. For \(S \subseteq X\), define the neighborhood
Hall's Marriage Theorem
A bipartite graph \(G=(X \cup Y,E)\) has a matching that saturates every vertex of \(X\) if and only if
This condition is called Hall's condition.
Proof: Necessity
Assume there is a matching \(M\) that saturates every vertex of \(X\). Take any subset \(S \subseteq X\).
Each vertex of \(S\) is matched by \(M\) to a distinct vertex of \(Y\), because different matching edges cannot share an endpoint. All these matched vertices lie in \(N(S)\).
Therefore \(N(S)\) contains at least \(|S|\) distinct vertices, so
Hence Hall's condition is necessary.
Proof: Sufficiency by Induction on \(|X|\)
Assume Hall's condition holds for every subset of \(X\). We prove that there is a matching saturating \(X\) by induction on \(|X|\).
Base case: If \(|X|=1\), say \(X=\{x\}\), then Hall's condition gives \(|N(\{x\})|\ge 1\). So \(x\) has a neighbor \(y\), and the single edge \(xy\) is a matching saturating \(X\).
Induction step: Assume the theorem holds for all smaller left parts. We consider two cases.
Case 1: Strict Inequality for Every Proper Nonempty Set
Suppose
for every nonempty proper subset \(S \subsetneq X\).
Choose any \(x \in X\), and choose any neighbor \(y \in N(\{x\})\). Remove \(x\) and \(y\), obtaining a smaller bipartite graph \(G'\) with left part \(X' = X \setminus \{x\}\).
We claim that Hall's condition still holds in \(G'\). Let \(A \subseteq X'\). If \(|N_{G'}(A)| < |A|\), then in the original graph \(G\), the only possible extra neighbor for \(A\) is \(y\). Hence
This contradicts the strict inequality for nonempty proper subsets. Therefore \(G'\) satisfies Hall's condition, so by induction it has a matching saturating \(X'\). Adding the edge \(xy\) gives a matching saturating all of \(X\).
Case 2: Equality for Some Proper Nonempty Set
Suppose there exists a nonempty proper subset \(S \subsetneq X\) such that
First look at the induced bipartite subgraph on \(S \cup N(S)\). Hall's condition still holds there for every subset of \(S\), because neighborhoods inside this subgraph are the same as in \(G\). By induction, this subgraph has a matching \(M_1\) that saturates \(S\).
Now remove \(S\) and \(N(S)\) from the graph. Let the remaining bipartite graph be \(H\) with left part \(X \setminus S\) and right part \(Y \setminus N(S)\).
We claim Hall's condition also holds in \(H\). Let \(A \subseteq X \setminus S\). If \(|N_H(A)| < |A|\), then in the original graph
so
This contradicts Hall's condition in \(G\). Hence \(H\) satisfies Hall's condition, and by induction it has a matching \(M_2\) that saturates \(X \setminus S\).
The matchings \(M_1\) and \(M_2\) use disjoint vertex sets, so \(M_1 \cup M_2\) is a matching saturating all of \(X\).
Conclusion of the Proof
In both cases, Hall's condition lets us construct a matching that saturates every vertex of \(X\). So the condition is sufficient.
Combining necessity and sufficiency proves Hall's marriage theorem.
Why Hall's Condition Is the Right One
If some subset \(S \subseteq X\) has fewer than \(|S|\) neighbors, then there are not enough vertices in \(Y\) available to match the vertices of \(S\) distinctly. Hall's theorem says this obvious obstruction is not only necessary, but also the only obstruction.
Takeaways
Main Results
- A finite connected simple graph in which every vertex has degree \(2\) is a cycle; therefore each connected component of a \(2\)-regular graph is a cycle.
- Dirac's theorem proves Hamiltonicity from the degree condition \(\delta(G)\ge n/2\).
- Hall's theorem characterizes exactly when a bipartite graph has a matching saturating one side.
Proof Patterns to Remember
- Contraction is powerful when it preserves the structural hypothesis while shrinking the graph.
- Choosing a counterexample with the maximum number of edges often forces every missing edge to carry extra information.
- In bipartite matching, neighborhood sizes encode the feasibility of saturating a side.