组合数学 (Fall 2023)/Matching theory
Systems of Distinct Representatives (SDR)
A system of distinct representatives (SDR) (also called a transversal) for a sequence of (not necessarily distinct) sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] is a sequence of distinct elements [math]\displaystyle{ x_1,x_2,\ldots,x_m }[/math] such that [math]\displaystyle{ x_i\in S_i }[/math] for all [math]\displaystyle{ i=1,2,\ldots,m }[/math].
Hall's marriage theorem
If the sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] have a system of distinct representatives [math]\displaystyle{ x_1\in S_1,x_2\in S_2,\ldots,x_m\in S_m }[/math], then it is obvious that [math]\displaystyle{ \left|S_1\cup S_2\cup\cdots\cup S_m\right|\ge |\{x_1,x_2,\ldots,x_m\}|=m }[/math]. Moreover, for any subset [math]\displaystyle{ I\subseteq\{1,2,\ldots,m\} }[/math],
- [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\ge |\{x_i\mid i\in I\}|=|I| }[/math]
because [math]\displaystyle{ x_1,x_2,\ldots,x_m }[/math] are distinct.
Surprisingly, this obvious necessary condition for the existence of SDR is also sufficient, which is stated by the Hall's theorem, also called the mariage theorem.
Hall's Theorem - The sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] have a system of distinct representatives (SDR) if and only if
- [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\ge |I| }[/math] for all [math]\displaystyle{ I\subseteq\{1,2,\ldots,m\} }[/math].
- The sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] have a system of distinct representatives (SDR) if and only if
The condition that [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\ge |I| }[/math] for all [math]\displaystyle{ I\subseteq\{1,2,\ldots,m\} }[/math] is also called the Hall's condition.
Proof. We only need to prove the sufficiency of Hall's condition for the existence of SDR. We do it by induction on [math]\displaystyle{ m }[/math]. When [math]\displaystyle{ m=1 }[/math], the theorem trivially holds. Now assume the theorem hold for any integer smaller than [math]\displaystyle{ m }[/math].
A subcollection of sets [math]\displaystyle{ \{S_i\mid i\in I\} }[/math], [math]\displaystyle{ |I|\lt m\, }[/math], is called a critical family if [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|=|I| }[/math].
Case.1: There is no critical family, i.e. for each [math]\displaystyle{ I\subset\{1,2,\ldots,m\} }[/math], [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\gt |I| }[/math].
Take [math]\displaystyle{ S_m }[/math] and choose an arbitrary [math]\displaystyle{ x\in S_m }[/math] as its representative. Remove [math]\displaystyle{ x }[/math] from all other sets by letting [math]\displaystyle{ S'_i=S_i\setminus \{x\} }[/math] for [math]\displaystyle{ 1\le i\le m-1 }[/math]. Then for all [math]\displaystyle{ I\subseteq\{1,2,\ldots,m-1\} }[/math],
- [math]\displaystyle{ \left|\bigcup_{i\in I}S_i'\right|\ge \left|\bigcup_{i\in I}S_i\right|-1\ge |I| }[/math].
Due to the induction hypothesis, [math]\displaystyle{ S_1,\ldots,S_m }[/math] have an SDR, say [math]\displaystyle{ x_1\in S_1,\ldots,x_{m-1}\in S_{m-1} }[/math]. It is obvious that none of them equals [math]\displaystyle{ x }[/math] because [math]\displaystyle{ x }[/math] is removed. Thus, [math]\displaystyle{ x_1,\ldots,x_{m-1} }[/math] and [math]\displaystyle{ x\, }[/math] form an SDR for [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math].
Case.2: There is a critical family, i.e. [math]\displaystyle{ \exists I\subset\{1,2,\ldots,m\}, |I|\lt m }[/math], such that [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|=|I| }[/math].
Suppose [math]\displaystyle{ S_{m-k+1},\ldots, S_m }[/math] are such a collection of [math]\displaystyle{ k\lt m }[/math] sets. Hall's condition certainly holds for these sets. Since [math]\displaystyle{ k\lt m }[/math], due to the induction hypothesis, there is an SDR for the sets, say [math]\displaystyle{ x_{m-k+1}\in S_{m-k+1},\ldots,x_m\in S_m }[/math].
Again, remove the [math]\displaystyle{ k }[/math] elements from the remaining sets by letting [math]\displaystyle{ S'_i=S_i\setminus\{x_{m-k+1},\ldots,x_m\} }[/math] for [math]\displaystyle{ 1\le i\le m-k }[/math]. By the Hall's condition, for any [math]\displaystyle{ I\subseteq\{1,2,\ldots,m-k\} }[/math], writing that [math]\displaystyle{ S=\bigcup_{i\in I}S_i\cup\bigcup_{i=m-k+1}^m S_i }[/math],
- [math]\displaystyle{ \left|S\right|\ge |I|+k }[/math],
thus
- [math]\displaystyle{ \left|\bigcup_{i\in I}S_i'\right|\ge |S|-\left|\bigcup_{i=m-k+1}^m S_i\right|\ge |I| }[/math].
Due to the induction hypothesis, there is an SDR for [math]\displaystyle{ S_1,\ldots, S_{m-k} }[/math], say [math]\displaystyle{ x_1\in S_1,\ldots, x_{m-k}\in S_{m-k} }[/math]. Combining it with the SDR [math]\displaystyle{ x_{m-k+1},\ldots, x_{m} }[/math] for [math]\displaystyle{ S_{m-k+1},\ldots, S_{m} }[/math], we have an SDR for [math]\displaystyle{ S_{1},\ldots, S_{m} }[/math].
- [math]\displaystyle{ \square }[/math]
Hall's theorem is usually stated as a theorem for the existence of matching in a bipartite graph.
In a graph [math]\displaystyle{ G(V,E) }[/math], a matching [math]\displaystyle{ M\subseteq E }[/math] is an independent set for edges, that is, for any [math]\displaystyle{ e_1,e_2\in M }[/math] that [math]\displaystyle{ e_1\neq e_2 }[/math], [math]\displaystyle{ e_1 }[/math] and [math]\displaystyle{ e_2 }[/math] are not adjacent to the same vertex.
In a bipartite graph [math]\displaystyle{ G(U,V,E) }[/math], we say [math]\displaystyle{ M }[/math] is a matching of [math]\displaystyle{ U }[/math] (or a matching of [math]\displaystyle{ V }[/math]), if every vertex in [math]\displaystyle{ U }[/math] (or [math]\displaystyle{ V }[/math]) is adjacent to some edge in [math]\displaystyle{ M }[/math], i.e., all vertices in [math]\displaystyle{ U }[/math] (or [math]\displaystyle{ V }[/math]) are matched.
In a graph [math]\displaystyle{ G(V,E) }[/math], for any vertex [math]\displaystyle{ v\in V }[/math], let [math]\displaystyle{ N(v) }[/math] denote the set of neighbors of [math]\displaystyle{ v }[/math] in [math]\displaystyle{ G }[/math]; and for any vertex set [math]\displaystyle{ S\subseteq V }[/math], we override the notation as [math]\displaystyle{ N(S)=\bigcup_{v\in S}N(v) }[/math], i.e. the set of vertices that are adjacent to one of the vertices in [math]\displaystyle{ S }[/math].
Hall's Theorem (graph theory form) - A bipartite graph [math]\displaystyle{ G(U,V,E) }[/math] has a matching of [math]\displaystyle{ U }[/math] if and only if
- [math]\displaystyle{ \left|N(S)\right|\ge |S| }[/math] for all [math]\displaystyle{ S\subseteq U }[/math].
- A bipartite graph [math]\displaystyle{ G(U,V,E) }[/math] has a matching of [math]\displaystyle{ U }[/math] if and only if
Consider the collection of sets [math]\displaystyle{ N(u), u\in U }[/math]. A matching of [math]\displaystyle{ U }[/math] is an SDR for these sets. Then clearly the theorem is equivalent to Hall's theorem.
Min-max theorems
In combinatorics (and also in other branches of mathematics), there is a family of theorems which relate the minimum of one thing to the maximum of something else. The following are some examples.
- König-Egerváry theorem (König 1931; Egerváry 1931): in a bipartite graph, the maximum number of edges in a matching equals the minimum number of vertices in a vertex cover.
- Menger's theorem (Menger 1927): the minimum number of vertices separating two given vertices in a graph equals the maximum number of vertex-disjoint paths between the two vertices.
- Dilworth's theorem (Dilworth 1950): the minimum number of chains which cover a partially ordered set equals the maximum number of elements in an antichain.
König-Egerváry theorem
A matching in a graph [math]\displaystyle{ G(V,E) }[/math] is a set [math]\displaystyle{ M\subseteq E }[/math] of edges such that no two edges [math]\displaystyle{ e_1,e_2\in M }[/math] shares a vertex. In other words, a matching is just an edge version of independent set.
A vertex cover in a graph [math]\displaystyle{ G(V,E) }[/math] is a vertex set [math]\displaystyle{ C\subseteq V }[/math] such that every edge [math]\displaystyle{ e\in E }[/math] is adjacent to some [math]\displaystyle{ u\in C }[/math], that is, all edges in the graph are "covered" by some vertex in the vertex cover [math]\displaystyle{ C }[/math].
The König-Egerváry theorem (also called the König's theorem) states the equality of the sizes of maximum matching and minimum vertex cover.
König-Egerváry Theorem (graph theory form) - In any bipartite graph, the size of a maximum matching equals the size of a minimum vertex cover.
The König-Egerváry theorem can be reformulated in its matrix form. A bipartite graph [math]\displaystyle{ G(U,V,E) }[/math] can be represented as a [math]\displaystyle{ |U|\times |V| }[/math] matrix [math]\displaystyle{ A }[/math] with 0-1 entries. For any [math]\displaystyle{ u\in U }[/math] and [math]\displaystyle{ v\in V }[/math], [math]\displaystyle{ A(u,v)=1 }[/math] if and only if [math]\displaystyle{ uv\in E }[/math]. (Note that this definition is different from adjacency matrix for graphs.)
Then, a matching in [math]\displaystyle{ G(U,V,E) }[/math] corresponds to a set of independent 1's in [math]\displaystyle{ A }[/math]: a set of 1's that do not share rows or columns. A vertex cover corresponds to a set of rows and columns covering all 1's in [math]\displaystyle{ A }[/math]: a set of rows and columns that every 1-entry in [math]\displaystyle{ A }[/math] belongs to at least one of these rows or columns.
It is easy to see the König-Egerváry theorem for bipartite graphs can be equivalently described as follows:
König-Egerváry Theorem (matrix form) - Let [math]\displaystyle{ A }[/math] be an [math]\displaystyle{ m\times n }[/math] 0-1 matrix. The maximum number of independent 1's is equal to the minimum number of rows and columns required to cover all the 1's in [math]\displaystyle{ A }[/math].
We give a proof by the Hall's theorem.
Proof. Let [math]\displaystyle{ r }[/math] denote the maximum number of independent 1's in [math]\displaystyle{ A }[/math] and [math]\displaystyle{ s }[/math] be the minimum number of rows and columns to cover all 1's in [math]\displaystyle{ A }[/math]. Clearly, [math]\displaystyle{ r\le s }[/math], since any set of [math]\displaystyle{ r }[/math] independent 1's requires together [math]\displaystyle{ r }[/math] rows and columns to cover.
We now prove [math]\displaystyle{ r\ge s }[/math]. Assume that some [math]\displaystyle{ a }[/math] rows and [math]\displaystyle{ b }[/math] columns cover all the 1's in [math]\displaystyle{ A }[/math], and [math]\displaystyle{ s=a+b }[/math], i.e. the covering is minimum. Because permuting the rows or the columns change neither [math]\displaystyle{ r }[/math] nor [math]\displaystyle{ s }[/math] (as reordering the vertices on either side in a bipartite graph changes nothing to the size of matchings and vertex covers), we may assume that the first [math]\displaystyle{ a }[/math] rows and the first [math]\displaystyle{ b }[/math] columns cover the 1's. Write [math]\displaystyle{ A }[/math] in the form
- [math]\displaystyle{ A=\begin{bmatrix} B_{a\times b} &C_{a\times (n-b)}\\ D_{(m-a)\times b} &E_{(m-a)\times (n-b)} \end{bmatrix} }[/math],
where the submatrix [math]\displaystyle{ E }[/math] has only zero entries. We will show that there are [math]\displaystyle{ a }[/math] independent 1's in [math]\displaystyle{ C }[/math] and [math]\displaystyle{ b }[/math] independent 1's in [math]\displaystyle{ D }[/math], thus together [math]\displaystyle{ A }[/math] has [math]\displaystyle{ a+b=s }[/math] independent 1's, which will imply that [math]\displaystyle{ r\ge s }[/math], as desired.
Define
- [math]\displaystyle{ S_i=\{j\mid c_{ij}=1\} }[/math]
It is obvious that [math]\displaystyle{ S_i\subseteq\{1,2,\ldots,n-b\} }[/math]. We claim that the sequence [math]\displaystyle{ S_1,S_2,\ldots, S_a }[/math] has a system of distinct representatives, i.e., we can choose a 1 from each row, no two in the same column. Otherwise, Hall's theorem tells us that there exists some [math]\displaystyle{ I\subseteq\{1,2,\ldots,a\} }[/math], such that [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\lt |I| }[/math], that is, the 1's in the rows contained by [math]\displaystyle{ I }[/math] can be covered by less than [math]\displaystyle{ |I| }[/math] columns. Thus, the 1's in [math]\displaystyle{ C }[/math] can be covered by [math]\displaystyle{ a-|I| }[/math] and less than [math]\displaystyle{ |I| }[/math] columns, altogether less than [math]\displaystyle{ a }[/math] rows and columns. Therefore, the 1's in [math]\displaystyle{ A }[/math] can be covered by less than [math]\displaystyle{ a+b }[/math] rows and columns, which contradicts the assumption that the size of the minimum covering of all 1's in [math]\displaystyle{ A }[/math] is [math]\displaystyle{ a+b }[/math]. Therefore, we show that [math]\displaystyle{ C }[/math] has [math]\displaystyle{ a }[/math] independent 1's.
By the same argument, we can show that [math]\displaystyle{ D }[/math] has [math]\displaystyle{ b }[/math] independent 1's. Since [math]\displaystyle{ C }[/math] and [math]\displaystyle{ D }[/math] share no rows or columns, the number of independent 1's in [math]\displaystyle{ A }[/math] is [math]\displaystyle{ r\ge a+b=s }[/math].
- [math]\displaystyle{ \square }[/math]
Dilworth's theorem
Recall that a partially ordered set (or poset) consists of a set [math]\displaystyle{ P }[/math] and a binary relation [math]\displaystyle{ \le }[/math] defined on [math]\displaystyle{ P }[/math], satisfying
- reflexivity: [math]\displaystyle{ x\le x }[/math];
- antisymmetry: [math]\displaystyle{ x\le y }[/math] and [math]\displaystyle{ y\le x }[/math] only if [math]\displaystyle{ x=y }[/math];
- transitivity: if [math]\displaystyle{ x\le y }[/math] and [math]\displaystyle{ y\le z }[/math], then [math]\displaystyle{ x\le z }[/math].
Two elements [math]\displaystyle{ x,y\in P }[/math] are said to be comparable if [math]\displaystyle{ x\le y }[/math] or [math]\displaystyle{ y\le x }[/math]; and [math]\displaystyle{ x,y\in P }[/math] are incomparable if otherwise.
A poset [math]\displaystyle{ P }[/math] is a totally ordered set, or a chain, if all pairs of elements in [math]\displaystyle{ P }[/math] are comparable. A poset [math]\displaystyle{ P }[/math] is an antichain if all pairs of elements in [math]\displaystyle{ P }[/math] are incomparable.
Given a poset [math]\displaystyle{ P }[/math], we can partition it into chains. What is the minimum number of chains that we can break [math]\displaystyle{ P }[/math] into? Dilworth's theorem tells us that it is equal to the size of the maximum antichain.
Dilworth's Theorem - Suppose that the largest antichain in the poset [math]\displaystyle{ P }[/math] has size [math]\displaystyle{ r }[/math]. Then [math]\displaystyle{ P }[/math] can be partitioned into [math]\displaystyle{ r }[/math] disjoint chains.
Proof. Suppose [math]\displaystyle{ P }[/math] has an antichain [math]\displaystyle{ |A| }[/math], and [math]\displaystyle{ P }[/math] can be partitioned into disjoint chains [math]\displaystyle{ C_1,C_2,\ldots,C_s }[/math]. Then [math]\displaystyle{ |A|\le s }[/math], since every chain can pass though an antichain at most once, that is, [math]\displaystyle{ |C_i\cap A|\le 1 }[/math] for all [math]\displaystyle{ i=1,2,\ldots,s }[/math].
Therefore, we only need to prove that there exist an antichain [math]\displaystyle{ A\subseteq P }[/math] of size [math]\displaystyle{ r }[/math], and a partition of [math]\displaystyle{ P }[/math] into at most [math]\displaystyle{ r }[/math] chains.
Define a bipartite graph [math]\displaystyle{ G(U,V,E) }[/math] where [math]\displaystyle{ U=V=P }[/math], and for any [math]\displaystyle{ u\in U }[/math] and [math]\displaystyle{ v\in v }[/math], [math]\displaystyle{ uv\in E }[/math] if and only if [math]\displaystyle{ u\lt v }[/math] in the poset [math]\displaystyle{ P }[/math]. By König-Egerváry theorem, there is a matching [math]\displaystyle{ M\subseteq E }[/math] and a vertex set [math]\displaystyle{ C }[/math] such that every edge in [math]\displaystyle{ E }[/math] is adjacent to at least a vertex in [math]\displaystyle{ C }[/math], and [math]\displaystyle{ |M|=|C| }[/math].
Denote [math]\displaystyle{ |M|=|C|=m }[/math]. Let [math]\displaystyle{ A }[/math] be the set of uncovered elements in poset [math]\displaystyle{ P }[/math], i.e., the elements of [math]\displaystyle{ P }[/math] that do not correspond to any vertex in [math]\displaystyle{ C }[/math]. Clearly, [math]\displaystyle{ |A|\ge n-m }[/math]. We claim that [math]\displaystyle{ A\subseteq P }[/math] is an antichain. By contradiction, assume there exists [math]\displaystyle{ x,y\in A }[/math] such that [math]\displaystyle{ x\lt y }[/math]. Then, by the definition of [math]\displaystyle{ G }[/math], there exist [math]\displaystyle{ u_x\in U,v_x\in V }[/math] which corresponds to [math]\displaystyle{ x }[/math], and [math]\displaystyle{ u_y\in U,v_y\in V }[/math] which corresponds to [math]\displaystyle{ y }[/math], such that [math]\displaystyle{ u_xv_y\in E }[/math]. But since [math]\displaystyle{ A }[/math] includes only those elements whose corresponding vertices are not in [math]\displaystyle{ C }[/math], none of [math]\displaystyle{ u_x,v_x,u_y,v_y }[/math] can be in [math]\displaystyle{ C }[/math], which contradicts the fact that [math]\displaystyle{ C }[/math] is a vertex cover of [math]\displaystyle{ G }[/math] that every edges in [math]\displaystyle{ G }[/math] are adjacent to at least a vertex in [math]\displaystyle{ C }[/math].
Let [math]\displaystyle{ B }[/math] be a family of chains formed by including [math]\displaystyle{ u }[/math] and [math]\displaystyle{ v }[/math] in the same chain whenever [math]\displaystyle{ uv\in M }[/math]. A moment thought would tell us that the number of chains in [math]\displaystyle{ B }[/math] is equal to the unmatched vertices in [math]\displaystyle{ U }[/math] (or [math]\displaystyle{ V }[/math]). Thus, [math]\displaystyle{ |B|=n-m }[/math].
Altogether, we construct an antichain of size [math]\displaystyle{ |A|\ge n-m }[/math] and partition the poset [math]\displaystyle{ P }[/math] into [math]\displaystyle{ |B|=n-m }[/math] disjoint chains. The theorem is proved.
- [math]\displaystyle{ \square }[/math]
Application: Erdős-Szekeres Theorem
Let [math]\displaystyle{ (a_1,a_2,\ldots,a_n) }[/math] be a sequence of [math]\displaystyle{ n }[/math] distinct real numbers.A subsequence of [math]\displaystyle{ (a_1,a_2,\ldots,a_n) }[/math] is an [math]\displaystyle{ (a_{i_1},a_{i_2},\ldots,a_{i_k}) }[/math], with [math]\displaystyle{ i_1\lt i_2\lt \cdots\lt i_k }[/math].
A sequence [math]\displaystyle{ (a_1,a_2,\ldots,a_n) }[/math] is increasing if [math]\displaystyle{ a_1\lt a_2\lt \cdots\lt a_n }[/math], and decreasing if [math]\displaystyle{ a_1\gt a_2\gt \cdots\gt a_n }[/math].
Recall that the Erdős-Szekeres theorem states the existence of long increasing subsequence or decreasing subsequence. Last time we prove this by the pigeonhole principle. Now we use the Dilworth's theorem to prove it, which is also the original proof due to Erdős-Szekeres.
Erdős-Szekeres Theorem - A sequence of more than [math]\displaystyle{ mn }[/math] different real numbers must contain either an increasing subsequence of length [math]\displaystyle{ m+1 }[/math], or a decreasing subsequence of length [math]\displaystyle{ n+1 }[/math].
Proof by Dilworth's theorem (Original proof of Erdős-Szekeres) Let [math]\displaystyle{ (a_1,a_2,\ldots,a_N) }[/math] be the sequence of [math]\displaystyle{ N\gt mn }[/math] distinct real numbers. Define the poset as
- [math]\displaystyle{ P=\{(i,a_i)\mid i=1,2,\ldots,N\} }[/math]
and [math]\displaystyle{ (i,a_i)\le (j,a_j) }[/math] if and only if [math]\displaystyle{ i\le j }[/math] and [math]\displaystyle{ a_i\le a_j }[/math].
A chain [math]\displaystyle{ (i_1,a_{i_1})\lt (i_2,a_{i_2})\lt \cdots\lt (i_k,a_{i_k}) }[/math] must have [math]\displaystyle{ i_1\lt i_2\lt \cdots\lt i_k }[/math] and [math]\displaystyle{ a_{i_1}\lt a_{i_2}\lt \cdots\lt a_{i_k} }[/math]. Thus, each chain correspond to an increasing subsequence.
Let [math]\displaystyle{ (j_1,a_{j_1}),(j_2,a_{j_2}),\cdots,(j_k,a_{j_k}) }[/math] be an antichain. Without loss of generality, we can assume that [math]\displaystyle{ j_1\lt j_2\lt \cdots\lt j_k }[/math]. The only case that these elements are non-comparable is that [math]\displaystyle{ a_{j_1}\gt a_{j_2}\gt \cdots\gt a_{j_k} }[/math], otherwise if [math]\displaystyle{ a_{j_s}\lt a_{j_t} }[/math] for some [math]\displaystyle{ s\lt t }[/math], then [math]\displaystyle{ (j_s,a_{j_s})\lt (j_t,a_{j_t}) }[/math], which contradicts the fact that it is an antichain. Thus, each antichain corresponds to a decreasing subsequence.
If [math]\displaystyle{ P }[/math] has an antichain of size [math]\displaystyle{ n+1 }[/math], then [math]\displaystyle{ (a_1,a_2,\ldots,a_N) }[/math] has a decreasing subsequence of size [math]\displaystyle{ n+1 }[/math], and we are done.
Alternatively, if the largest antichain in [math]\displaystyle{ P }[/math] is of size at most [math]\displaystyle{ n }[/math], then by Dilworth's theorem, [math]\displaystyle{ P }[/math] can be partitioned into no more than [math]\displaystyle{ n }[/math] disjoint chains, due to pigeonhole principle, one of which must be of length [math]\displaystyle{ m+1 }[/math], which means [math]\displaystyle{ (a_1,a_2,\ldots,a_N) }[/math] has an increasing subsequence of size [math]\displaystyle{ m+1 }[/math].
- [math]\displaystyle{ \square }[/math]
Application: Hall's Theorem
To recognize the power of Dilworth's theorem, we show that it contains Hall's theorem as a special case!
Hall's Theorem - The sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] have a system of distinct representatives (SDR) if and only if
- [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\ge |I| }[/math] for all [math]\displaystyle{ I\subseteq\{1,2,\ldots,m\} }[/math].
- The sets [math]\displaystyle{ S_1,S_2,\ldots,S_m }[/math] have a system of distinct representatives (SDR) if and only if
Proof by Dilworth's theorem As we discussed before, the necessity of Hall's condition for the existence of SDR is easy. We prove its sufficiency by Dilworth's theorem.
Denote [math]\displaystyle{ X=\bigcup_{i=1}^mS_i }[/math]. Construct a poset [math]\displaystyle{ P }[/math] by letting [math]\displaystyle{ P=X\cup\{S_1,S_2,\ldots,S_m\} }[/math] and [math]\displaystyle{ x\lt S_{i} }[/math] for all [math]\displaystyle{ x\in S_{i} }[/math]. There are no other comparabilities.
It is obvious that [math]\displaystyle{ X }[/math] is an antichain. We claim it is also the largest one. To prove this, let [math]\displaystyle{ A }[/math] be an arbitrary antichain, and let [math]\displaystyle{ I=\{i\mid S_i\in A\} }[/math]. Then [math]\displaystyle{ A }[/math] contains no elements of [math]\displaystyle{ \bigcup_{i\in I}S_i }[/math], since if [math]\displaystyle{ x\in A }[/math] and [math]\displaystyle{ x\in S_i\in A }[/math], then [math]\displaystyle{ x\lt S_i }[/math] and [math]\displaystyle{ A }[/math] cannot be an antichain. Thus,
- [math]\displaystyle{ |A|\le |I|+|X|-\left|\bigcup_{i\in I}S_i\right| }[/math]
and by Hall's condition [math]\displaystyle{ \left|\bigcup_{i\in I}S_i\right|\ge|I| }[/math], thus [math]\displaystyle{ |A|\le |X| }[/math], as claimed.
Now, Dilworth's theorem implies that [math]\displaystyle{ P }[/math] can be partitioned into [math]\displaystyle{ |X| }[/math] chains. Since [math]\displaystyle{ X }[/math] is an antichain and each chain can pass though an antichain on at most one element, each of the [math]\displaystyle{ |X| }[/math] chains contain precisely one [math]\displaystyle{ x\in X }[/math]. And since [math]\displaystyle{ \{S_1,\ldots,S_m\} }[/math] is also an antichain, each of these [math]\displaystyle{ |X| }[/math] chains contain at most one [math]\displaystyle{ S_i }[/math]. Altogether, the [math]\displaystyle{ |X| }[/math] chains are in the form:
- [math]\displaystyle{ \{x_1,S_1\},\{x_2,S_2\},\ldots,\{x_m,S_m\},\{x_{m+1}\}\ldots,\{x_{|X|}\} }[/math].
Since the only comparabilities in our posets are [math]\displaystyle{ x\in S_i }[/math] and the above chains are disjoint, we have [math]\displaystyle{ x_1\in S_1, x_2\in S_2,\ldots,x_m\in S_m }[/math] as an SDR.
- [math]\displaystyle{ \square }[/math]
Flow and Cut
Flows
An instance of the maximum flow problem consists of:
- a directed graph [math]\displaystyle{ G(V,E) }[/math];
- two distinguished vertices [math]\displaystyle{ s }[/math] (the source) and [math]\displaystyle{ t }[/math] (the sink), where the in-degree of [math]\displaystyle{ s }[/math] and the out-degree of [math]\displaystyle{ t }[/math] are both 0;
- the capacity function [math]\displaystyle{ c:E\rightarrow\mathbb{R}^+ }[/math] which associates each directed edge [math]\displaystyle{ (u,v)\in E }[/math] a nonnegative real number [math]\displaystyle{ c_{uv} }[/math] called the capacity of the edge.
The quadruple [math]\displaystyle{ (G,c,s,t) }[/math] is called a flow network.
A function [math]\displaystyle{ f:E\rightarrow\mathbb{R}^+ }[/math] is called a flow (to be specific an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow) in the network [math]\displaystyle{ G(V,E) }[/math] if it satisfies:
- Capacity constraint: [math]\displaystyle{ f_{uv}\le c_{uv} }[/math] for all [math]\displaystyle{ (u,v)\in E }[/math].
- Conservation constraint: [math]\displaystyle{ \sum_{u:(u,v)\in E}f_{uv}=\sum_{w:(v,w)\in E}f_{vw} }[/math] for all [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math].
The value of the flow [math]\displaystyle{ f }[/math] is [math]\displaystyle{ \sum_{v:(s,v)\in E}f_{sv} }[/math].
Given a flow network, the maximum flow problem asks to find the flow of the maximum value.
The maximum flow problem can be described as the following linear program.
- [math]\displaystyle{ \text{maximize} \quad \sum_{v:(s,v)\in E}f_{sv} }[/math]
- [math]\displaystyle{ \begin{align} \text{s.t.} &&f_{uv} &\le c_{uv} &\quad& \forall (u,v)\in E\\ &&\sum_{u:(u,v)\in E}f_{uv}-\sum_{w:(v,w)\in E}f_{vw} &=0 &\quad& \forall v\in V\setminus\{s,t\}\\ &&f_{uv} &\ge 0 &\quad& \forall (u,v)\in E \end{align} }[/math]
Cuts
Definition - Let [math]\displaystyle{ (G(V,E),c,s,t) }[/math] be a flow network. Let [math]\displaystyle{ S\subset V }[/math]. We call [math]\displaystyle{ (S,\bar{S}) }[/math] an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut if [math]\displaystyle{ s\in S }[/math] and [math]\displaystyle{ t\not\in S }[/math].
- The value of the cut (also called the capacity of the cut) is defined as [math]\displaystyle{ \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }[/math].
A fundamental fact in flow theory is that cuts always upper bound flows.
Lemma - Let [math]\displaystyle{ (G(V,E),c,s,t) }[/math] be a flow network. Let [math]\displaystyle{ f }[/math] be an arbitrary flow in [math]\displaystyle{ G }[/math], and let [math]\displaystyle{ (S,\bar{S}) }[/math] be an arbitrary [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut. Then
- [math]\displaystyle{ \sum_{v:(s,v)}f_{sv}\le \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }[/math],
- that is, the value of any flow is no greater than the value of any cut.
- Let [math]\displaystyle{ (G(V,E),c,s,t) }[/math] be a flow network. Let [math]\displaystyle{ f }[/math] be an arbitrary flow in [math]\displaystyle{ G }[/math], and let [math]\displaystyle{ (S,\bar{S}) }[/math] be an arbitrary [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut. Then
Proof. By the definition of [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut, [math]\displaystyle{ s\in S }[/math] and [math]\displaystyle{ t\not\in S }[/math]. Due to the conservation of flow,
- [math]\displaystyle{ \sum_{u\in S}\left(\sum_{v:(u,v)\in E}f_{uv}-\sum_{v:(v,u)\in E}f_{vu}\right)=\sum_{v:(s,v)\in E}f_{sv}+\sum_{u\in S\setminus\{s\}}\left(\sum_{v:(u,v)\in E}f_{uv}-\sum_{v:(v,u)\in E}f_{vu}\right)=\sum_{v:(s,v)\in E}f_{sv}\,. }[/math]
On the other hand, summing flow over edges,
- [math]\displaystyle{ \sum_{v\in S}\left(\sum_{u:(u,v)\in E}f_{uv}-\sum_{u:(v,u)\in E}f_{vu}\right)=\sum_{u\in S,v\in S\atop (u,v)\in E}\left(f_{uv}-f_{uv}\right)+\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}=\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}\,. }[/math]
Therefore,
- [math]\displaystyle{ \sum_{v:(s,v)\in E}f_{sv}=\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}\le\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}\le \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}\,, }[/math]
- [math]\displaystyle{ \square }[/math]
Augmenting paths
Definition (Augmenting path) - Let [math]\displaystyle{ f }[/math] be a flow in [math]\displaystyle{ G }[/math]. An augmenting path to [math]\displaystyle{ u_k }[/math] is a sequence of distinct vertices [math]\displaystyle{ P=(u_0,u_1,\cdots, u_k) }[/math], such that
- [math]\displaystyle{ u_0=s\, }[/math];
- and each pair of consecutive vertices [math]\displaystyle{ u_{i}u_{i+1}\, }[/math] in [math]\displaystyle{ P }[/math] corresponds to either a forward edge [math]\displaystyle{ (u_{i},u_{i+1})\in E }[/math] or a reverse edge [math]\displaystyle{ (u_{i+1},u_{i})\in E }[/math], and
- [math]\displaystyle{ f(u_i,u_{i+1})\lt c(u_i,u_{i+1})\, }[/math] when [math]\displaystyle{ u_{i}u_{i+1}\, }[/math] corresponds to a forward edge [math]\displaystyle{ (u_{i},u_{i+1})\in E }[/math], and
- [math]\displaystyle{ f(u_{i+1},u_i)\gt 0\, }[/math] when [math]\displaystyle{ u_{i}u_{i+1}\, }[/math] corresponds to a reverse edge [math]\displaystyle{ (u_{i+1},u_{i})\in E }[/math].
- If [math]\displaystyle{ u_k=t\, }[/math], we simply call [math]\displaystyle{ P }[/math] an augmenting path.
- Let [math]\displaystyle{ f }[/math] be a flow in [math]\displaystyle{ G }[/math]. An augmenting path to [math]\displaystyle{ u_k }[/math] is a sequence of distinct vertices [math]\displaystyle{ P=(u_0,u_1,\cdots, u_k) }[/math], such that
Let [math]\displaystyle{ f }[/math] be a flow in [math]\displaystyle{ G }[/math]. Suppose there is an augmenting path [math]\displaystyle{ P=u_0u_1\cdots u_k }[/math], where [math]\displaystyle{ u_0=s }[/math] and [math]\displaystyle{ u_k=t }[/math]. Let [math]\displaystyle{ \epsilon\gt 0 }[/math] be a positive constant satisfying
- [math]\displaystyle{ \epsilon \le c(u_{i},u_{i+1})-f(u_i,u_{i+1}) }[/math] for all forward edges [math]\displaystyle{ (u_{i},u_{i+1})\in E }[/math] in [math]\displaystyle{ P }[/math];
- [math]\displaystyle{ \epsilon \le f(u_{i+1},u_i) }[/math] for all reverse edges [math]\displaystyle{ (u_{i+1},u_i)\in E }[/math] in [math]\displaystyle{ P }[/math].
Due to the definition of augmenting path, we can always find such a positive [math]\displaystyle{ \epsilon }[/math].
Increase [math]\displaystyle{ f(u_i,u_{i+1}) }[/math] by [math]\displaystyle{ \epsilon }[/math] for all forward edges [math]\displaystyle{ (u_{i},u_{i+1})\in E }[/math] in [math]\displaystyle{ P }[/math] and decrease [math]\displaystyle{ f(u_{i+1},u_i) }[/math] by [math]\displaystyle{ \epsilon }[/math] for all reverse edges [math]\displaystyle{ (u_{i+1},u_i)\in E }[/math] in [math]\displaystyle{ P }[/math]. Denote the modified flow by [math]\displaystyle{ f' }[/math]. It can be verified that [math]\displaystyle{ f' }[/math] satisfies the capacity constraint and conservation constraint thus is still a valid flow. On the other hand, the value of the new flow [math]\displaystyle{ f' }[/math]
- [math]\displaystyle{ \sum_{v:(s,v)\in E}f_{sv}'=\epsilon+\sum_{v:(s,v)\in E}f_{sv}\gt \sum_{v:(s,v)\in E}f_{sv} }[/math].
Therefore, the value of the flow can be "augmented" by adjusting the flow on the augmenting path. This immediately implies that if a flow is maximum, then there is no augmenting path. Surprisingly, the converse is also true, thus maximum flows are "characterized" by augmenting paths.
Lemma - A flow [math]\displaystyle{ f }[/math] is maximum if and only if there are no augmenting paths.
Proof. We have already proved the "only if" direction above. Now we prove the "if" direction. Let [math]\displaystyle{ S=\{u\in V\mid \exists\text{an augmenting path to }u\} }[/math]. Clearly [math]\displaystyle{ s\in S }[/math], and since there is no augmenting path [math]\displaystyle{ t\not\in S }[/math]. Therefore, [math]\displaystyle{ (S,\bar{S}) }[/math] defines an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut.
We claim that
- [math]\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }[/math],
that is, the value of flow [math]\displaystyle{ f }[/math] approach the value of the cut [math]\displaystyle{ (S,\bar{S}) }[/math] defined above. By the above lemma, this will imply that the current flow [math]\displaystyle{ f }[/math] is maximum.
To prove this claim, we first observe that
- [math]\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu} }[/math].
This identity is implied by the flow conservation constraint, and holds for any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut [math]\displaystyle{ (S,\bar{S}) }[/math].
We then claim that
- [math]\displaystyle{ f_{uv}=c_{uv} }[/math] for all [math]\displaystyle{ u\in S,v\not\in S, (u,v)\in E }[/math]; and
- [math]\displaystyle{ f_{vu}=0 }[/math] for all [math]\displaystyle{ u\in S,v\not\in S, (v,u)\in E }[/math].
If otherwise, then the augmenting path to [math]\displaystyle{ u }[/math] apending [math]\displaystyle{ uv }[/math] becomes a new augmenting path to [math]\displaystyle{ v }[/math], which contradicts that [math]\displaystyle{ S }[/math] includes all vertices to which there exist augmenting paths.
Therefore,
- [math]\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu} = \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }[/math].
As discussed above, this proves the theorem.
- [math]\displaystyle{ \square }[/math]
Max-Flow Min-Cut
The max-flow min-cut theorem
Max-Flow Min-Cut Theorem - In a flow network, the maximum value of any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow equals the minimum value of any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut.
Proof. Let [math]\displaystyle{ f }[/math] be a flow with maximum value, so there is no augmenting path.
Again, let
- [math]\displaystyle{ S=\{u\in V\mid \exists\text{an augmenting path to }u\} }[/math].
As proved above, [math]\displaystyle{ (S,\bar{S}) }[/math] forms an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut, and
- [math]\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }[/math],
that is, the value of flow [math]\displaystyle{ f }[/math] equals the value of cut [math]\displaystyle{ (S,\bar{S}) }[/math].
Since we know that all [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flows are not greater than any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut, the value of flow [math]\displaystyle{ f }[/math] equals the minimum value of any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut.
- [math]\displaystyle{ \square }[/math]
Flow Integrality Theorem
Flow Integrality Theorem - Let [math]\displaystyle{ (G,c,s,t) }[/math] be a flow network with integral capacity [math]\displaystyle{ c }[/math]. There exists an integral flow which is maximum.
Proof. Let [math]\displaystyle{ f }[/math] be an integral flow of maximum value. If there is an augmenting path, since both [math]\displaystyle{ c }[/math] and [math]\displaystyle{ f }[/math] are integral, a new flow can be constructed of value 1+the value of [math]\displaystyle{ f }[/math], contradicting that [math]\displaystyle{ f }[/math] is maximum over all integral flows. Therefore, there is no augmenting path, which means that [math]\displaystyle{ f }[/math] is maximum over all flows, integral or not.
- [math]\displaystyle{ \square }[/math]
Applications: Menger's theorem
Given an undirected graph [math]\displaystyle{ G(V,E) }[/math] and two distinct vertices [math]\displaystyle{ s,t\in V }[/math], a set of edges [math]\displaystyle{ C\subseteq E }[/math] is called an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut, if deleting edges in [math]\displaystyle{ C }[/math] disconnects [math]\displaystyle{ s }[/math] and [math]\displaystyle{ t }[/math].
A simple path from [math]\displaystyle{ s }[/math] to [math]\displaystyle{ t }[/math] is called an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] path. Two paths are said to be edge-disjoint if they do not share any edge.
Theorem (Menger 1927) - Let [math]\displaystyle{ G(V,E) }[/math] be an arbitrary undirected graph and [math]\displaystyle{ s,t\in V }[/math] be two distinct vertices. The minimum size of any [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut equals the maximum number of edge-disjoint [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] paths.
Proof. Construct a directed graph [math]\displaystyle{ G'(V,E') }[/math] from [math]\displaystyle{ G(V,E) }[/math] as follows: replace every undirected edge [math]\displaystyle{ uv\in E }[/math] that [math]\displaystyle{ s,t\not\in\{u,v\} }[/math] by two directed edges [math]\displaystyle{ (u,v) }[/math] and [math]\displaystyle{ (v,u) }[/math]; replace every undirected edge [math]\displaystyle{ sv\in E }[/math] by [math]\displaystyle{ (s,v) }[/math], and very undirected edge [math]\displaystyle{ vt\in E }[/math] by [math]\displaystyle{ (v,t) }[/math]. Then assign every directed edge with capacity 1.
It is easy to verify that in the flow network constructed as above, the followings hold:
- An integral [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow corresponds to a set of [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] paths in the undirected graph [math]\displaystyle{ G }[/math], where the value of the flow is the number of [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] paths.
- An [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut in the flow network corresponds to an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut in the undirected graph [math]\displaystyle{ G }[/math] with the same value.
The Menger's theorem follows as a direct consequence of the max-flow min-cut theorem.
- [math]\displaystyle{ \square }[/math]
Applications: König-Egerváry theorem
Let [math]\displaystyle{ G(V,E) }[/math] be a graph. An edge set [math]\displaystyle{ M\subseteq E }[/math] is called a matching if no edge in [math]\displaystyle{ M }[/math] shares any vertex. A vertex set [math]\displaystyle{ C\subseteq V }[/math] is called a vertex cover if for any edge [math]\displaystyle{ uv\in E }[/math], either [math]\displaystyle{ u\in C }[/math] or [math]\displaystyle{ v\in C }[/math].
Theorem (König 1936) - In any bipartite graph [math]\displaystyle{ G(V_1,V_2,E) }[/math], the size of a maximum matching equals the size of a minimum vertex cover.
We now show how a reduction of bipartite matchings to flows.
Construct a flow network [math]\displaystyle{ (G'(V,E'),c,s,t) }[/math] as follows:
- [math]\displaystyle{ V=V_1\cup V_2\cup\{s,t\} }[/math] where [math]\displaystyle{ s }[/math] and [math]\displaystyle{ t }[/math] are two new vertices.
- For ever [math]\displaystyle{ uv\in E }[/math], add [math]\displaystyle{ (u,v) }[/math] to [math]\displaystyle{ E' }[/math]; for every [math]\displaystyle{ u\in V_1 }[/math], add [math]\displaystyle{ (s,u) }[/math] to [math]\displaystyle{ E' }[/math]; and for every [math]\displaystyle{ v\in V_2 }[/math], add [math]\displaystyle{ (v,t) }[/math] to [math]\displaystyle{ E' }[/math].
- Let [math]\displaystyle{ c_{su}=1 }[/math] for every [math]\displaystyle{ u\in V_1 }[/math] and [math]\displaystyle{ c_{vt}=1 }[/math] for every [math]\displaystyle{ v\in V_2 }[/math]. Let [math]\displaystyle{ c_{uv}=\infty }[/math] for every bipartite edges [math]\displaystyle{ (u,v) }[/math].
Lemma - The size of a maximum matching in [math]\displaystyle{ G }[/math] is equal to the value of a maximum [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow in [math]\displaystyle{ G' }[/math].
Proof. Given an integral [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow [math]\displaystyle{ f }[/math] in [math]\displaystyle{ G' }[/math], let [math]\displaystyle{ M=\{uv\in E\mid f_{uv}=1\} }[/math]. Then [math]\displaystyle{ M }[/math] must be a matching since for every [math]\displaystyle{ u\in V_1 }[/math]. To see this, observe that there is at most one [math]\displaystyle{ v\in V_2 }[/math] that [math]\displaystyle{ f_{uv}=1 }[/math], because of that [math]\displaystyle{ f_{su}\le c_{su}=1 }[/math] and conservation of flows. The same holds for vertices in [math]\displaystyle{ V_2 }[/math] by the same argument. Therefore, each flow corresponds to a matching.
Given a matching [math]\displaystyle{ M }[/math] in bipartite graph [math]\displaystyle{ G }[/math], define an integral flow [math]\displaystyle{ f }[/math] as such: for [math]\displaystyle{ uv\in E }[/math], [math]\displaystyle{ f_{uv}=1 }[/math] if [math]\displaystyle{ uv\in M }[/math] and [math]\displaystyle{ f_{uv}=0 }[/math] if otherwise; for [math]\displaystyle{ u\in V_1 }[/math], [math]\displaystyle{ f_{su}=1 }[/math] if [math]\displaystyle{ uv\in M }[/math] for some [math]\displaystyle{ v }[/math] and [math]\displaystyle{ f_{su}=0 }[/math] if otherwise; for [math]\displaystyle{ v\in V_2 }[/math], [math]\displaystyle{ f_{vt}=1 }[/math] if [math]\displaystyle{ uv\in M }[/math] for some [math]\displaystyle{ u }[/math] and [math]\displaystyle{ f_{vt}=0 }[/math] if otherwise.
It is easy to check that [math]\displaystyle{ f }[/math] is valid [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] flow in [math]\displaystyle{ G' }[/math]. Therefore, there is an one-one correspondence between flows in [math]\displaystyle{ G' }[/math] and matchings in [math]\displaystyle{ G }[/math]. The lemma follows naturally.
- [math]\displaystyle{ \square }[/math]
We then establish a correspondence between [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cuts in [math]\displaystyle{ G' }[/math] and vertex covers in [math]\displaystyle{ G }[/math].
Suppose [math]\displaystyle{ (S,\bar{S}) }[/math] is an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut in [math]\displaystyle{ G' }[/math].
Lemma - The size of a minimum vertex cover in [math]\displaystyle{ G }[/math] is equal to the value of a minimum [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut in [math]\displaystyle{ G' }[/math].
Proof. Let [math]\displaystyle{ (S,\bar{S}) }[/math] be an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut of minimum capacity in [math]\displaystyle{ G' }[/math]. Then [math]\displaystyle{ \sum_{u\in S, v\not\in S\atop (u,v)\in E'}c_{uv} }[/math] must be finite since [math]\displaystyle{ S=\{s\} }[/math] gives us an [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut whose capacity is [math]\displaystyle{ |V_1| }[/math] which is finite. Therefore, no edge [math]\displaystyle{ uv\in E }[/math] has [math]\displaystyle{ u\in V_1\cap S }[/math] and [math]\displaystyle{ v\in V_2\setminus S }[/math], i.e., for all [math]\displaystyle{ uv\in E }[/math], either [math]\displaystyle{ u\in V_1\setminus S }[/math] or [math]\displaystyle{ v\in V_2\cap S }[/math]. Therefore, [math]\displaystyle{ (V_1\setminus S)\cup(V_2\cap S) }[/math] is a vertex cover in [math]\displaystyle{ G }[/math], whose size is
- [math]\displaystyle{ |(V_1\setminus S)\cup(V_2\cap S)|=|V_1\setminus S|+|V_2\cap S|=\sum_{u\in V_1\setminus S}c_{su}+\sum_{v\in V_2\cap S}c_{ut}=\sum_{u\in S,v\not\in S\atop (u,v)\in E'}c_{uv} }[/math].
The last term is the capacity of the minimum [math]\displaystyle{ s }[/math]-[math]\displaystyle{ t }[/math] cut [math]\displaystyle{ (S,\bar{S}) }[/math].
- [math]\displaystyle{ \square }[/math]
The König-Egerváry theorem then holds as a consequence of the max-flow min-cut theorem.