Maximum Flows Lecture 4: Jan 19
Network transmission Given a directed graph G A source node s A sink node t Goal: To send as much information from s to t
Maximum flow sender receiver Capacity constraint (bits per second)
Flows An s-t flow is a function f which satisfies: (capacity constraint) (conservation of flows) An s-t flow is a function f which satisfies: (capacity constraint) (conservation of flows)
Value of the flow st G: 6 Value = 19 Maximum flow problem: maximize this value
An upper bound sender receiver
Cuts An s-t cut is a set of edges whose removal disconnect s and t The capacity of a cut is defined as the sum of the capacity of the edges in the cut Minimum s-t cut problem: minimize this capacity of a s-t cut
Flows ≤ cuts Let C be a cut and S be the connected component of G-C containing s. Then:
Reverse? Value of max s-t flow ≤ capacity of min s-t cut Suppose every s-t cut has capacity at least 4, is it true that there is a max s-t flow of value 2?
Main result (Ford Fulkerson 1956) Max flow = Min cut A polynomial time algorithm
Greedy method? Find an s-t path where every edge has f(e) < c(e) Add this path to the flow Repeat until no such path can be found. Does it work?
A counterexample How to proceed? Hint: Find an augmenting path
Residual graph Key idea: allow flows to push back c(e) = 10 f(e) = 2 c(e) = 8 c(e) = 2
Finding an augmenting path Find an s-t path in the residual graph Add it to the current flow to obtain a larger flow. Why? 1.Flow conservations 2.More flow going out from s
Ford-Fulkerson Algorithm 1. Start from an empty flow f 2. While there is an s-t path in G G := G + P, and update f 3. Return f
Max-flow min-cut theorem Consider the set S of all vertices reachable from s So, s is in S, but t is not in S No incoming flow coming in S Achieve full capacity from S to T Min cut!
Complexity Assume edge capacity between 1 to C At most nC iterations Finding an s-t path can be done in O(m) time Total running time O(nmC)
Speeding up Find a shortest s-t path time Capacity scaling
Integrality theorem If every edge has integer capacity, then there is a flow of integer value.
Applications of the algorithm of the min-max theorem of the integrality theorem
Multi-source multi-sink Contrast with multicommodity flow which is NP-hard.
Bipartite matching and more Bipartite matching of size k max flow of size k Work even for d-matching
Edge disjoint paths Find the maximum number of edge disjoint s-t paths
Graph connectivity Minimum number of edges to disconnect a graph [Menger 1927] Max number of edge-disjoint s-t paths = Min size of an s-t cut.
Project selection Precedence constraints Each job has a revenus (can be negative) Goal: Choose a feasible subset to maximize revenue. Idea: minimize the jobs that lost money, and maximize the jobs that gain money.
Leaque winner See if your favorite team can still win the leaque