Koenig
Koenig
König’s Theorem
Lalla Mouatadid
In this lecture, we formulate maximum matching and minimum vertex cover as LPs, as ILPs in fact (integer
linear programs) and we’ll use strong duality as well as properties of TU matrices to prove König’s theorem.
We recall some definitions first.
• A graph G(V = X ∪ Y, E) is a bipartite graph if X and Y are both independent sets and every edge
e ∈ E is of the form e = (x, y), x ∈ X, y ∈ Y . We call X and Y the bi-partitions of G.
• A vertex u is incident to an edge e if u is an endpoint of e, i.e. e = (u, v) for some v ∈ V . We write
u ∼ e.
• A matching in a graph is a subset of edges M ⊆ E such that for all e1 , e2 ∈ M , e1 , e2 have no common
end points.
• A vertex cover in G is a subset of vertices S ⊆ V such that every edge e ∈ E is incident to at least one
vertex in S (i.e. e is covered).
• An incidence matrix A of a graph G is an n × m binary matrix whose rows are the vertices of G and
columns the edges of G. An entry is A is defined as
(
1, if vi is incident to ej
aij =
0, otherwise.
it’s not hard to see that every column of A has exactly two 1s, since every edge is incident to exactly
two vertices.
We illustrate the above definitions in the following example. Consider the bipartite graph below with bi-
partitions X = {v1 , v2 }, Y = {v3 , v4 }.
e1
v1 v3
e1 e2 e3
e2 v1 1 1 0
v2 0 0 1
e3 v3 1 0 1
v4 0 1 0
v2 v4
The set M = {e1 } is a maximal matching of G, and M 0 = {e2 , e3 } a maximum matching. The set S = {v1 , v2 }
is a vertex cover of G.
1
Lemma 1. The incidence matrix of a bipartite graph is totally unimodular.
Maximum Bipartite Matching: Let G(V, E) be a bipartite graph. Consider the following linear program:
m
X
maximize xj
j=1
subj. to Ax ≤ 1
x≥0
x ∈ Zm
1 · x1 + 0 · x2 + 1 · x3 ≤ 1
In other words, we either set x1 or x3 to 1 but not both. Thus either edge e1 or e3 can be in a matching but
not both. Since x ≥ 0 and x ∈ Zm , this implies xj ∈ {0, 1} for j ∈ [m].
Therefore, in an optimal solution x∗ of the LP above, the edges ej with x∗j = 1 form a matching. Thus the
LP is a formulation of the maximum matching in G.
Minimum Vertex Cover: Consider now the following LP:
n
X
minimize yi
i=1
T
subj. to A y≥1
y≥0
y ∈ Zn
0 · y1 + 1 · y2 + 1 · y3 + 0 · y4 ≥ 1
In other words, at least one of v2 , v3 is set to 1. In fact, vi can indeed be greater than 1, but since this is
a minimization problem, reducing vi to 1 - but not below - produces a better feasible solution. Therefore,
in an optimal solution y∗ of this LP, yi∗ ∈ {0, 1} for i ∈ [n]. And thus, the vertices vi with yi∗ = 1 form a
minimum vertex cover of G.
We are now ready to prove König’s Theorem.
2
Proof of Theorem 1. Since A is TU (Lemma 1), and so is AT (since det(A) = det(AT )), we can drop the
integrality constraints of the LPs above and still get optimal integral solutions by Theorem 9 (Lecture Notes:
Week 5). Notice that the LPs above are duals to each other, and thus by strong duality, their optimal values
are equal. Therefore the size of a maximum matching in a bipartite graph equals the size of a minimum
vertex cover.