Network Flows. Menger ’ s Theorem Theorem 7.1. (Menger [1927] ) Let G be a graph (directed or undirected), let s and t be two vertices, and k  N. Then.

Slides:



Advertisements
Similar presentations
Lecture 7. Network Flows We consider a network with directed edges. Every edge has a capacity. If there is an edge from i to j, there is an edge from.
Advertisements

Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Connectivity - Menger’s Theorem Graphs & Algorithms Lecture 3.
1 Matching Polytope x1 x2 x3 Lecture 12: Feb 22 x1 x2 x3.
Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Edge-connectivity and super edge-connectivity of P 2 -path graphs Camino Balbuena, Daniela Ferrero Discrete Mathematics 269 (2003) 13 – 20.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
Chapter 9 Connectivity 连通度. 9.1 Connectivity Consider the following graphs:  G 1 : Deleting any edge makes it disconnected.  G 2 : Cannot be disconnected.
Combinatorial Algorithms
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 19.
Vertex Cut Vertex Cut: A separating set or vertex cut of a graph G is a set S  V(G) such that G-S has more than one component. a b c d e f g h i.
Connectivity and Paths
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #17 Chapter 2: TREES מבוסס על הספר : S. Even, "Graph Algorithms",
Graph Orientations and Submodular Flows Lecture 6: Jan 26.
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
The max flow problem
Vertex Cut Vertex Cut: A separating set or vertex cut of a graph G is a set SV(G) such that S has more than one component. Connectivity of G ((G)): The.
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.
Definition Dual Graph G* of a Plane Graph:
Internally Disjoint Paths
Internally Disjoint Paths
1 Submodular Functions in Combintorial Optimization Lecture 6: Jan 26 Lecture 8: Feb 1.
Internally Disjoint Paths Internally Disjoint Paths : Two paths u to v are internally disjoint if they have no common internal vertex. u u v v Common internal.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2004 Lecture 5 Wednesday, 10/6/04 Graph Algorithms: Part 2.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Vertex Cut Vertex Cut: A separating set or vertex cut of a graph G is a set SV(G) such that G-S has more than one component. d f b e a g c i h.
The Maximum Independent Set Problem Sarah Bleiler DIMACS REU 2005 Advisor: Dr. Vadim Lozin, RUTCOR.
Introduction to Graph Theory
Theory of Computing Lecture 13 MAS 714 Hartmut Klauck.
Mycielski’s Construction Mycielski’s Construction: From a simple graph G, Mycielski’s Construction produces a simple graph G’ containing G. Beginning with.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
Chapter 6 Connectivity and Flow 大葉大學 資訊工程系 黃鈴玲
Graph Theory and Applications
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
 Quotient graph  Definition 13: Suppose G(V,E) is a graph and R is a equivalence relation on the set V. We construct the quotient graph G R in the follow.
Spanning tree Lecture 4.
and 6.855J March 6, 2003 Maximum Flows 2. 2 Network Reliability u Communication Network u What is the maximum number of arc disjoint paths from.
10/11/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 21 Network.
Graphs Lecture 2. Graphs (1) An undirected graph is a triple (V, E, Y), where V and E are finite sets and Y:E g{X V :| X |=2}. A directed graph or digraph.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Exercise 6.1 Find the number of different shortest paths from point A to point B in a city with perfectly horizontal streets and vertical avenues as shown.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
Introduction to Graph Theory
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Problems in Combinatorial Optimization. Linear Programming.
Connectivity. Graph Scanning Algorithm Input: A graph G and some vertex s. Output: The set R of vertices reachable from s and a set T ⊆ E(G) such that.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
A directed graph G consists of a set V of vertices and a set E of arcs where each arc in E is associated with an ordered pair of vertices from V. V={0,
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Trees.
V15: Max-Flow Min-Cut V15 continues chapter 12 in Gross & Yellen „Graph Theory“ Theorem [Characterization of Maximum Flow] Let f be a flow in a.
Richard Anderson Lecture 26 NP-Completeness
Data Structures and Algorithms (AT70. 02) Comp. Sc. and Inf. Mgmt
Algorithms and Networks
Algorithm Design and Analysis
Planarity Testing.
3.3 Applications of Maximum Flow and Minimum Cut
ICS 353: Design and Analysis of Algorithms
Instructor: Shengyu Zhang
EE5900 Advanced Embedded System For Smart Infrastructure
V12 Menger’s theorem Borrowing terminology from operations research
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

Network Flows

Menger ’ s Theorem Theorem 7.1. (Menger [1927] ) Let G be a graph (directed or undirected), let s and t be two vertices, and k  N. Then there are k edge-disjoint s-t-paths if and only if after deleting any k – 1edges t is still reachable from s.

Proof (directed case) Necessity is obvious. To prove sufficiency in the directed case, let (G, u, s, t) be a network with unit capacities u ≡1such that t is reachable from s even after deleting any k – 1 edges. This implies that the minimum capacity of an s-t-cut is at least k. By the Max-Flow-Min-Cut Theorem and Corollary 6.7 there is an integral s-t-flow of value at least k. By Theorem 6.8 this flow can be decomposed into integral flows on s-t-paths (and possibly some circuits). Since all capacities are 1 we must have at least k edge-disjoint s-t-paths.

Proof (undirected case) Necessity is obvious. Let G be an undirected graph with two vertices s and t such that t is reachable from s even after deleting any k – 1 edges.

Proof (undirected case) u v uv

Vertex-disjoint path We call two paths vertex-disjoint if they have no edge and no inner vertex in common (they may have one or two common endpoints).

Menger ’ s Theorem (2) Theorem 7.2. (Menger [1927] ) Let G be a graph (directed or undirected), let s and t be two non-adjacent vertices, and k  N. Then there are k vertex-disjoint s-t-paths if and only if after deleting any k – 1vertices (distinct from s and t) t is still reachable from s.

Proof v0v0 v1v1 v

v0v0 v1v1 v Any set of k – 1 edges in the new graph whose deletion makes t unreachable from s implies a set of at most k – 1vertices in G whose deletion makes t unreachable from s. Moreover, edge-disjoint s-t-paths in the new graph corresponds to vertex-disjoint paths in the old one.

k-edge-connected Graph Corollary 7.3. ( Whitney [1932] ) An undirected graph G with at least two vertices is k-edge-connected if and only if for each pair s, t  V(G) with s ≠ t there are k edge-disjoint s-t-paths. An undirected graph G with more than k vertices is k-connected if and only if for each pair s, t  V(G) with s ≠ t there are k vertex- disjoint s-t-paths.

Proof To prove the second statement let G be an undirected graph with more than k vertices. If G has k −1 vertices whose deletion makes the graph disconnected, then it cannot have k vertex disjoint s-t-paths for each pair s, t  V(G). Conversely, if G does not have k vertex-disjoint s-t-paths for some s, t  V(G), then we consider two cases. If s and t are non-adjacent, then by the 2 nd Menger Theorem G has k −1 vertices whose deletion separates s and t.  G is not k-connected.

Proof (s and t are adjacent) If s and t are joined by a set F of parallel edges. Then G – F has no k – |F| vertex-disjoint s-t-paths. (|F| ≥ 1) So by the 2 nd Menger Theorem it has a set X of k − |F| – 1 vertices whose deletion separates s and t. Let v  V(G)\(X  {s, t}). Then v cannot be reachable from s and from t in G – F – X. Say v is not reachable from t. Add vertex s to X. Then v and t are in different connected components of G – (X  {s}). |X  {s}| = k − |F| ≤ k – 1  G is not k-connected.

Directed Edge-Disjoint Paths Problem Instance: Two directed graphs (G, H) on the same vertices. Task: Find a family (P f ) f  E(H) of edge-disjoint paths in G such that for each f = (t, s) in H, P f is an s-t-path. Such a family is called a solution of (G, H). We say that P f realizes f. The edges of G are called supply edges, the edges of H demand edges. A vertex incident to some demand edge is called a terminal.

Solvable instance Proposition 7.4. Let (G, H) be an instance of the Directed Edge-Disjoint Paths Problem where H is just a set of parallel edges and G + H is Eulerian. Then (G, H) has a solution.

Solvable instance Proposition 7.4. Let (G, H) be an instance of the Directed Edge-Disjoint Paths Problem where H is just a set of parallel edges and G + H is Eulerian. Then (G, H) has a solution. Proof (induction on number of parallel edges in H). Since G + H is Eulerian, every edge, in particular any f  E(H), belong to some circuit C. We take C – F as the first part of our solution, delete C, and apply induction.

Ford-Fulkerson Algorithm Input: A network (G, u, s, t). Output: An s-t-flow f of maximum value.

Edmonds-Karp Algorithm Input: A network (G, u, s, t). Output: An s-t-flow f of maximum value.

Lemma Lemma 7.5. Let f 1, f 2,... be a sequence of flows such that f i+1 results from f i by augmenting along P i, where P i is a shortest f i -augmenting path. Then a) |E(P k )| ≤ | E(P k+1 )| for all k. b) |E(P k )| + 2 ≤ |E(P l )| for all k < l such that P k ∪ P l contains a pair of reverse edges.

|E(P k )| ≤ | E(P k+1 )| for all k Consider the graph G 1, which results from P k  P k+1 by deleting pairs of reverse edges. (Edges appearing both in P k and P k+1 are taken twice.)

Graph G 1 S t G 1 =P k U P k+1 − {reverse edges} G1G1

Proof a) Consider the graph G 1, which results from P k  P k+1 by deleting pairs of reverse edges. (Edges appearing both in P k and P k+1 are taken twice.) Note that E(G 1 )  E(G f k ), since any edge in E(G f k+1 )\E(G f k ) must be the reverse of an edge in P k.

Proof a) Consider the graph G 1, which results from P k  P k+1 by deleting pairs of reverse edges. (Edges appearing both in P k and P k+1 are taken twice.) Note that E(G 1 )  E(G f k ), since any edge in E(G f k+1 )\E(G f k ) must be the reverse of an edge in P k. Let H 1 simply consists of two copies of (t,s). Obviously G 1 + H 1 is Eulerian.

G 1 + H 1 S t G 1 =P k U P k+1 − reverse edges H 1 − two edges (t,s) G1G1

Proof a) Consider the graph G 1, which results from P k  P k+1 by deleting pairs of reverse edges. (Edges appearing both in P k and P k+1 are taken twice.) Note that E(G 1 )  E(G f k ), since any edge in E(G f k+1 )\E(G f k ) must be the reverse of an edge in P k. Let H 1 simply consists of two copies of (t,s). Obviously G 1 + H 1 is Eulerian. Proposition 7.4.  there are two edge disjoint s-t-paths Q 1 and Q 2. E(G 1 )  E(G f k )  both Q 1 and Q 2 are augmenting paths in G f k.

|E(P k )| ≤ | E(P k+1 )| for all k Since P k was a shortest f k - augmenting path, |E(P k )| ≤ |E(Q 1 )| and |E(P k )| ≤ |E(Q 2 )|. 2|E(P k )| ≤ |E(Q 1 )| + |E(Q 2 )| ≤ |E(G 1 )| ≤ ≤ |E(P k )| + |E(P k+1 )|. |E(P k )| ≤ |E(P k+1 )|.

|E(P k )| + 2 ≤ |E(P l )| for all k < l such that P k ⋃ P l contains a pair of reverse edges Let k < l such that for any i, k < i < l, P i  P l contains no pair of reverse edges. Consider the graph G 1, which results from P k  P l by deleting pairs of reverse edges. Again, E(G 1 )  E(G f k ): –E(P k )  E(G f k ), E(P l )  E(G f l ) –Any edge of E(G f l )\E(G f k ) must be the reverse of an edge in one of P k, P k+1,…, P l–1. –But − due to choice of k and l − among these paths only P k contains the reverse of an edge in P l. 2|E(P k )| ≤ |E(Q 1 )| + |E(Q 2 )| ≤ |E(G 1 )| ≤ ≤ |E(P k )| + |E(P k+1 )| – 2.

Lemma Lemma 7.5. Let f 1, f 2,... be a sequence of flows such that f i+1 results from f i by augmenting along P i, where P i is a shortest f i -augmenting path. Then a) |E(P k )| ≤ | E(P k+1 )| for all k. b) |E(P k )| + 2 ≤ |E(P l )| for all k < l such that P k ∪ P l contains a pair of reverse edges.

Number of Augmentations Theorem 7.6. (Edmonds, Karp [1972] ) Regardless of the edge capacities, the Edmonds-Karp Algorithm stops after at most mn/2 augmentations, where m is the number of edges and n is the number of vertices.

Proof Let P 1, P 2,… be the augmenting paths chosen during the Edmonds-Karp Algorithm. By the choice of γ in step 3 of the algorithm, each augmenting path contains at least one bottleneck edge e: u f (e) = γ. For any edge e, let P i 1, P i 2,… be the subsequence of augmenting paths containing e as a bottleneck edge. Then between P i j, P i j+1 there must be an augmenting path P к containing a reverse edge of e.

Proof Lemma 7.5 b)  |E(P i j )| + 4 ≤ |E(P k )| + 2 ≤ |E(P i j+1 )| for all j. 1 ≤ |E(P i j )| ≤ n – 1  there can be at most n/4 augmenting paths containing e as a bottleneck edge. Since any augmenting path must contain at least one edge of Ğ as a bottleneck edge, there can be at most (n|E(Ğ)|)/4 =(mn)/2 augmenting paths.

Running time of Edmonds-Karp Algorithm Corollary 7.7. The Edmonds-Karp Algorithm solves the Maximum Flow Problem in O(m 2 n) time.

Applications: scheduling problem P. Given set of jobs J = {J 1,…, J n } and m parallel identical machines. A processing time p j, a release time r j, and a deadline d j are associated with each job J j. Find a feasible preemptive schedule or decide that none exists. Preemption of a job means that processing may be interrupted and resumed at a later time, even on another machine. So, a schedule is for each job an allocation of one or more intervals to one or more machines. Schedule is feasible if no two time intervals overlap on the same machine, no two time intervals allocated to the same job overlap, and each job J j is executed inside the interval [r j, d j ].

Exersice 7.1 Find a polynomial time algorithm for the scheduling problem P.

Solution J1J1 J1J1 JiJi JiJi JnJn JnJn I1I1 I1I1 IkIk IkIk IrIr IrIr p1p1 pipi pnpn mT r mT k mT 1 TkTk J i+1 p i+1 TkTk Let t 0 < t 1 < …< t r be the ordered sequence of all different r i -values and d i -values. Consider the intervals I k :=[t k– 1,t k ] of length T k = t k – t k– 1.

Homework Escape problem Given m ≤ n 2 starting points (x 1, y 1 ), (x 2, y 2 ),…, (x m,y m ) in the grid, the escape problem is to determine whether or not there are m vertex-disjoint paths from the starting points to any m different points on the boundary. Reduce the Escape problem to the Maximum Flow problem.