Applications of the Max-Flow Min-Cut Theorem. S-T Cuts SF D H C A NY 5 6 2 4 5 4 7 S = {SF, D, H}, T={C,A,NY} [S,T] = {(D,A),(D,C),(H,A)}, Cap [S,T] =

Slides:



Advertisements
Similar presentations
Connectivity - Menger’s Theorem Graphs & Algorithms Lecture 3.
Advertisements

Introduction to Algorithms
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
1 Maximum flow sender receiver Capacity constraint Lecture 6: Jan 25.
EMIS 8374 Vertex Connectivity Updated 20 March 2008.
Piyush Kumar (Lecture 6: MaxFlow MinCut Applications)
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2012 Lecture 19.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
1 The Max Flow Problem. 2 Flow networks Flow networks are the problem instances of the max flow problem. A flow network is given by 1) a directed graph.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
Graph Clustering. Why graph clustering is useful? Distance matrices are graphs  as useful as any other clustering Identification of communities in social.
CS138A Network Flows Peter Schröder. CS138A Flow Networks Definitions a flow network G=(V,E) is a directed graph in which each edge (u,v)
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2001 Lecture 4 Tuesday, 2/19/02 Graph Algorithms: Part 2 Network.
1 Maximum flow problems. 2 - Introduction of: network, max-flow problem capacity, flow - Ford-Fulkerson method pseudo code, residual networks, augmenting.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 4 Tuesday, 10/2/01 Graph Algorithms: Part 2 Network.
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.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
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.
Packing Element-Disjoint Steiner Trees Mohammad R. Salavatipour Department of Computing Science University of Alberta Joint with Joseph Cheriyan Department.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
CSEP 521 Applied Algorithms
Introduction to Graph Theory
Advanced Algorithms Piyush Kumar (Lecture 4: MaxFlow MinCut Applications) Welcome to COT5405.
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 22 Network.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
Maximization of Network Survivability against Intelligent and Malicious Attacks (Cont’d) Presented by Erion Lin.
Kramer’s (a.k.a Cramer’s) Rule Component j of x = A -1 b is Form B j by replacing column j of A with b.
Network Flow. Network flow formulation A network G = (V, E). Capacity c(u, v)  0 for edge (u, v). Assume c(u, v) = 0 if (u, v)  E. Source s and sink.
10. Lecture WS 2006/07Bioinformatics III1 V10: Network Flows V10 follows closely chapter 12.1 in on „Flows and Cuts in Networks and Chapter 12.2 on “Solving.
Maximum Flow. p2. Maximum Flow A flow network G=(V, E) is a DIRECTED graph where each has a nonnegative capacity u.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
11. Lecture WS 2014/15 Bioinformatics III1 V11 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Chapter 6 Connectivity and Flow 大葉大學 資訊工程系 黃鈴玲
15.082J & 6.855J & ESD.78J October 7, 2010 Introduction to Maximum Flows.
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.
1 CS612 Algorithms for Electronic Design Automation CS 612 – Lecture 8 Lecture 8 Network Flow Based Modeling Mustafa Ozdal Computer Engineering Department,
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSEP 521 Applied Algorithms Richard Anderson Lecture 8 Network Flow.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Prof. Swarat Chaudhuri COMP 382: Reasoning about Algorithms Fall 2015.
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
CSE 421 Algorithms Richard Anderson Lecture 24 Network Flow Applications.
Maximum Flow Problem Definitions and notations The Ford-Fulkerson method.
TU/e Algorithms (2IL15) – Lecture 8 1 MAXIMUM FLOW (part II)
Richard Anderson Lecture 23 Network Flow
Lecture 22 Network Flow, Part 2
3.3 Applications of Maximum Flow and Minimum Cut
Richard Anderson Lecture 24 Network Flow Applications
Richard Anderson Lecture 25 Open Pit Mining
Introduction Basic formulations Applications
CS 583 Analysis of Algorithms
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
Project Selection Bin Li 10/29/2008.
Algorithms (2IL15) – Lecture 7
EE5900 Advanced Embedded System For Smart Infrastructure
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Lecture 22 Network Flow, Part 2
Richard Anderson Lecture 26 Open Pit Mining
Richard Anderson Lecture 22 Network Flow
Presentation transcript:

Applications of the Max-Flow Min-Cut Theorem

S-T Cuts SF D H C A NY S = {SF, D, H}, T={C,A,NY} [S,T] = {(D,A),(D,C),(H,A)}, Cap [S,T] = = 11 S = {SF, D, A,C}, T = {H, NY} [S,T] = {(SF,H),(C,NY)}, Cap[S,T] =6 + 4 = 10 Partition the Nodes into Sets S and T. [S,T] = Arcs from Nodes in S to Nodes in T.

Maximum-Flow Minimum-Cut Theorem l Removing arcs (D,C) and (A,NY) cuts off SF from NY. l The set of arcs{(D,C), (A,NY)} is an s-t cut with capacity 2+7=9. l The value of a maximum s-t flow = the capacity of a minimum s-t cut. SF D H C A NY SF D H C A NY

Network Connectivity l An s,t vertex separator of a graph G=(V,E) is a set of vertices whose removal disconnects vertices s and t. l The s,t-connectivity of a graph G is the minimum size of an s,t vertex separator. l The vertex-connectivity of G is the min{s,t-connectivity of G: (s,t) in V}.

Example Some Vertex Separators For s=2, t=7: {3, 4, 6}, {1, 4, 8} 2,7-connectivity = 3 Some Vertex Separators For s=1, t=8: {4, 5, 6}, {2,3} 1,8-connectivity = 2 Vertex-Connectivity = 2

Menger’s Theorem l Given and undirected graph G and two nonadjacent vertices s and t, the maximum number of vertex-disjoint (aside from sharing s and t) paths from s to t is equal to the s,t-connectivity of G.

Maximum Flow Formulation For G=(V,E), construct the network G’=(N,A) as follows –For each vertex v in V/{s,t}, add nodes v and v’ –Add arc (v,v’) with capacity 1 –For each edge (u,v) in E, add arcs (u’,v) and (v’,u) with infinite capacity –For each edge (s,v) in E, add arc (s,v) with infinite capacity –For each edge (v,t) in E, add arc (v’,t) with infinite capacity

Proof l Lemma 1 –Each set of k vertex-disjoint s,t paths in G, corresponds to exactly one integral flow of value k in G’. l Lemma 2 –Each s,t cut of finite capacity c corresponds to an s,t vertex-separator of size c in G l Result follows from Max-Flow Min-Cut Theorem

Finding the Vertex-Connectivity of G=(N,A) l Let Node 1 be the Source Node s l Let c = |N| l For i = 2 … |N| –Let t = i –If s-t Connectivity < c Then Let c = s-t Connectivity l Return c Find Vertex-Connectivity of G with |N|-1 Maximum Flow Computations

Mining for Gold l Divide a cross-section of earth into a grid of equally-sized blocks. l Given the cost of excavating a full block and the market value of a full block of gold, determine an optimal shape for the mine. l Constraints on the shape of your mine require that a block of earth cannot be excavated unless the three blocks above it (directly, and diagonally left and right) have also been excavated.

Solution l To get the gold in block (2,4), we need to excavate blocks (1,3), (1,4), (1,5) and (2,4). Revenue = $500, Cost = $400, Profit = $100. Take block (2,4). l To get the gold in block (3,1), we need to excavate blocks (3,1), (2,1), (2,2), (1,1), (1,2) and (1,3). Revenue = $500, Cost = $500*, Profit = $0. Don’t take block (3,1). * Assuming (1,3) Already Excavated

Maximum Flow Formulation l Each Block is a Node l Add Infinite Capacity Arc from Node (i,j) to Node (i-1,j-1), (i-1,j),(i-1,j+1) l Add Source Node s and Sink Node t l Wij = Vij - C Where Vij = Value of Gold in Block (i,j) C = Cost of Excavating a Block l If Wij < 0, Add an Arc from Node (i,j) to t with Capacity -Wij l If Wij > 0 Add an Arc from s to Node (i,j) with Capacity Wij

Maximum Flow Network 1,11,21,31,41,52,12,22,32,42,53,13,23,33,43,54,14,24,34,44,5st

Minimum Cut 1,11,21,31,41,52,12,22,32,42,53,13,23,33,43,54,14,24,34,44,5st Cut: S={s,(2,4)(1,3), (1,4), (1,5)} T: All Other Nodes

Meaning of the Minimum Cut l Excavate all Blocks in S –Only Finite-Capacity Arcs in Minimum Cut –Blocks in S Can be Excavated Without Excavating Blocks in T l Arcs in [S,T] –Arcs from s to Nodes in T Capacity = Value of Gold in T –Arcs from Nodes in S to t Capacity = Cost of Excavating S l Cap[S,T] = Value of Gold in T + Cost of Excavating S

Maximizing Profit l Finding a Maximum Flow Minimizes: Value of Gold in T + Cost of Excavating S l Equivalent to Maximizing: F = - (Value of Gold in T + Cost of Excavating S ) l Equivalent to Maximizing: Value of All Gold + F = Value of Gold in S - Cost of Excavating S = Profit for Excavating S