组合数学 (Fall 2019)/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
Hall's marriage theorem
If the sets
because
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
have a system of distinct representatives (SDR) if and only if for all .
- The sets
The condition that
Proof. We only need to prove the sufficiency of Hall's condition for the existence of SDR. We do it by induction on
. When , the theorem trivially holds. Now assume the theorem hold for any integer smaller than .A subcollection of sets
, , is called a critical family if .Case.1: There is no critical family, i.e. for each
, .Take
and choose an arbitrary as its representative. Remove from all other sets by letting for . Then for all , .
Due to the induction hypothesis,
have an SDR, say . It is obvious that none of them equals because is removed. Thus, and form an SDR for .Case.2: There is a critical family, i.e.
, such that .Suppose
are such a collection of sets. Hall's condition certainly holds for these sets. Since , due to the induction hypothesis, there is an SDR for the sets, say .Again, remove the
elements from the remaining sets by letting for . By the Hall's condition, for any , writing that , ,
thus
.
Due to the induction hypothesis, there is an SDR for
, say . Combining it with the SDR for , we have an SDR for .
Hall's theorem is usually stated as a theorem for the existence of matching in a bipartite graph.
In a graph
In a bipartite graph
In a graph
Hall's Theorem (graph theory form) - A bipartite graph
has a matching of if and only if for all .
- A bipartite graph
Consider the collection of sets
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
A vertex cover in a graph
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
Then, a matching in
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
be an 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 .
- Let
We give a proof by the Hall's theorem.
Proof. Let
denote the maximum number of independent 1's in and be the minimum number of rows and columns to cover all 1's in . Clearly, , since any set of independent 1's requires together rows and columns to cover.We now prove
. Assume that some rows and columns cover all the 1's in , and , i.e. the covering is minimum. Because permuting the rows or the columns change neither nor (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 rows and the first columns cover the 1's. Write in the form ,
where the submatrix
has only zero entries. We will show that there are independent 1's in and independent 1's in , thus together has independent 1's, which will imply that , as desired.Define
It is obvious that
. We claim that the sequence 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 , such that , that is, the 1's in the rows contained by can be covered by less than columns. Thus, the 1's in can be covered by and less than columns, altogether less than rows and columns. Therefore, the 1's in can be covered by less than rows and columns, which contradicts the assumption that the size of the minimum covering of all 1's in is . Therefore, we show that has independent 1's.By the same argument, we can show that
has independent 1's. Since and share no rows or columns, the number of independent 1's in is .
Dilworth's theorem
Recall that a partially ordered set (or poset) consists of a set
- reflexivity:
; - antisymmetry:
and only if ; - transitivity: if
and , then .
Two elements
A poset
Given a poset
Dilworth's Theorem - Suppose that the largest antichain in the poset
has size . Then can be partitioned into disjoint chains.
- Suppose that the largest antichain in the poset
Proof. Suppose
has an antichain , and can be partitioned into disjoint chains . Then , since every chain can pass though an antichain at most once, that is, for all .Therefore, we only need to prove that there exist an antichain
of size , and a partition of into at most chains.Define a bipartite graph
where , and for any and , if and only if in the poset . By König-Egerváry theorem, there is a matching and a vertex set such that every edge in is adjacent to at least a vertex in , and .Denote
. Let be the set of uncovered elements in poset , i.e., the elements of that do not correspond to any vertex in . Clearly, . We claim that is an antichain. By contradiction, assume there exists such that . Then, by the definition of , there exist which corresponds to , and which corresponds to , such that . But since includes only those elements whose corresponding vertices are not in , none of can be in , which contradicts the fact that is a vertex cover of that every edges in are adjacent to at least a vertex in .Let
be a family of chains formed by including and in the same chain whenever . A moment thought would tell us that the number of chains in is equal to the unmatched vertices in (or ). Thus, .Altogether, we construct an antichain of size
and partition the poset into disjoint chains. The theorem is proved.
Application: Erdős-Szekeres Theorem
Let
A sequence
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
different real numbers must contain either an increasing subsequence of length , or a decreasing subsequence of length .
- A sequence of more than
Proof by Dilworth's theorem (Original proof of Erdős-Szekeres) Let
be the sequence of distinct real numbers. Define the poset asand
if and only if and .A chain
must have and . Thus, each chain correspond to an increasing subsequence.Let
be an antichain. Without loss of generality, we can assume that . The only case that these elements are non-comparable is that , otherwise if for some , then , which contradicts the fact that it is an antichain. Thus, each antichain corresponds to a decreasing subsequence.If
has an antichain of size , then has a decreasing subsequence of size , and we are done.Alternatively, if the largest antichain in
is of size at most , then by Dilworth's theorem, can be partitioned into no more than disjoint chains, due to pigeonhole principle, one of which must be of length , which means has an increasing subsequence of size .
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
have a system of distinct representatives (SDR) if and only if for all .
- The sets
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
. Construct a poset by letting and for all . There are no other comparabilities.It is obvious that
is an antichain. We claim it is also the largest one. To prove this, let be an arbitrary antichain, and let . Then contains no elements of , since if and , then and cannot be an antichain. Thus,and by Hall's condition
, thus , as claimed.Now, Dilworth's theorem implies that
can be partitioned into chains. Since is an antichain and each chain can pass though an antichain on at most one element, each of the chains contain precisely one . And since is also an antichain, each of these chains contain at most one . Altogether, the chains are in the form: .
Since the only comparabilities in our posets are
and the above chains are disjoint, we have as an SDR.
Flow and Cut
Flows
An instance of the maximum flow problem consists of:
- a directed graph
; - two distinguished vertices
(the source) and (the sink), where the in-degree of and the out-degree of are both 0; - the capacity function
which associates each directed edge a nonnegative real number called the capacity of the edge.
The quadruple
A function
- Capacity constraint:
for all . - Conservation constraint:
for all .
The value of the flow
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.
Cuts
Definition - Let
be a flow network. Let . We call an - cut if and . - The value of the cut (also called the capacity of the cut) is defined as
.
- Let
A fundamental fact in flow theory is that cuts always upper bound flows.
Lemma - Let
be a flow network. Let be an arbitrary flow in , and let be an arbitrary - cut. Then ,
- that is, the value of any flow is no greater than the value of any cut.
- Let
Proof. By the definition of - cut, and .Due to the conservation of flow,
On the other hand, summing flow over edges,
Therefore,
Augmenting paths
Definition (Augmenting path) - Let
be a flow in . An augmenting path to is a sequence of distinct vertices , such that ;
- and each pair of consecutive vertices
in corresponds to either a forward edge or a reverse edge , and when corresponds to a forward edge , and when corresponds to a reverse edge .
- If
, we simply call an augmenting path.
- Let
Let
for all forward edges in ; for all reverse edges in .
Due to the definition of augmenting path, we can always find such a positive
Increase
.
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
is maximum if and only if there are no augmenting paths.
- A flow
Proof. We have already proved the "only if" direction above. Now we prove the "if" direction. Let
. Clearly , and since there is no augmenting path . Therefore, defines an - cut.We claim that
,
that is, the value of flow
approach the value of the cut defined above. By the above lemma, this will imply that the current flow is maximum.To prove this claim, we first observe that
.
This identity is implied by the flow conservation constraint, and holds for any
- cut .We then claim that
for all ; and for all .
If otherwise, then the augmenting path to
apending becomes a new augmenting path to , which contradicts that includes all vertices to which there exist augmenting paths.Therefore,
.
As discussed above, this proves the theorem.
Max-Flow Min-Cut
The max-flow min-cut theorem
Max-Flow Min-Cut Theorem - In a flow network, the maximum value of any
- flow equals the minimum value of any - cut.
- In a flow network, the maximum value of any
Proof. Let
be a flow with maximum value, so there is no augmenting path.Again, let
.
As proved above,
forms an - cut, and ,
that is, the value of flow
equals the value of cut .Since we know that all
- flows are not greater than any - cut, the value of flow equals the minimum value of any - cut.
Flow Integrality Theorem
Flow Integrality Theorem - Let
be a flow network with integral capacity . There exists an integral flow which is maximum.
- Let
Proof. Let
be an integral flow of maximum value. If there is an augmenting path, since both and are integral, a new flow can be constructed of value 1+the value of , contradicting that is maximum over all integral flows. Therefore, there is no augmenting path, which means that is maximum over all flows, integral or not.
Applications: Menger's theorem
Given an undirected graph
A simple path from
Theorem (Menger 1927) - Let
be an arbitrary undirected graph and be two distinct vertices. The minimum size of any - cut equals the maximum number of edge-disjoint - paths.
- Let
Proof. Construct a directed graph
from as follows: replace every undirected edge that by two directed edges and ; replace every undirected edge by , and very undirected edge by . 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
- flow corresponds to a set of - paths in the undirected graph , where the value of the flow is the number of - paths. - An
- cut in the flow network corresponds to an - cut in the undirected graph with the same value.
The Menger's theorem follows as a direct consequence of the max-flow min-cut theorem.
- An integral
Applications: König-Egerváry theorem
Let
Theorem (König 1936) - In any bipartite graph
, the size of a maximum matching equals the size of a minimum vertex cover.
- In any bipartite graph
We now show how a reduction of bipartite matchings to flows.
Construct a flow network
where and are two new vertices.- For ever
, add to ; for every , add to ; and for every , add to . - Let
for every and for every . Let for every bipartite edges .
Lemma - The size of a maximum matching in
is equal to the value of a maximum - flow in .
- The size of a maximum matching in
Proof. Given an integral
- flow in , let . Then must be a matching since for every . To see this, observe that there is at most one that , because of that and conservation of flows. The same holds for vertices in by the same argument. Therefore, each flow corresponds to a matching.Given a matching
in bipartite graph , define an integral flow as such: for , if and if otherwise; for , if for some and if otherwise; for , if for some and if otherwise.It is easy to check that
is valid - flow in . Therefore, there is an one-one correspondence between flows in and matchings in . The lemma follows naturally.
We then establish a correspondence between
Suppose
Lemma - The size of a minimum vertex cover in
is equal to the value of a minimum - cut in .
- The size of a minimum vertex cover in
Proof. Let
be an - cut of minimum capacity in . Then must be finite since gives us an - cut whose capacity is which is finite. Therefore, no edge has and , i.e., for all , either or . Therefore, is a vertex cover in , whose size is .
The last term is the capacity of the minimum
- cut .
The König-Egerváry theorem then holds as a consequence of the max-flow min-cut theorem.