CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement.

Slides:



Advertisements
Similar presentations
Maximum Flow and Minimum Cut Problems In this handout: Duality theory Upper bounds for maximum flow value Minimum Cut Problem Relationship between Maximum.
Advertisements

Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
15.082J & 6.855J & ESD.78J October 14, 2010 Maximum Flows 2.
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
Network Optimization Models: Maximum Flow Problems
MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
1 Maximum Flow Networks Suppose G = (V, E) is a directed network. Each edge (i,j) in E has an associated ‘capacity’ u ij. Goal: Determine the maximum amount.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
In this handout, Maximum flow problem Minimum cut An application of max flow problem: Baseball Elimination Problem.
Applications of Maximum Flow and Minimum Cut Problems In this handout Transshipment problem Assignment Problem.
Network Optimization Problems: Models and Algorithms This handout: Minimum Spanning Tree Problem.
Maximum Flow and Minimum Cut Problems In this handout: Good choices for augmenting paths Duality theory Upper bounds for maximum flow value Minimum Cut.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Solving by linear programming Augmenting path algorithm.
3 t s the black numbers next to an arc is its capacity.
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
NetworkModel-1 Network Optimization Models. NetworkModel-2 Network Terminology A network consists of a set of nodes and arcs. The arcs may have some flow.
MAX FLOW CS302, Spring 2013 David Kauchak. Admin.
and 6.855J The Capacity Scaling Algorithm.
Networks and the Shortest Path Problem.  Physical Networks  Road Networks  Railway Networks  Airline traffic Networks  Electrical networks, e.g.,
Network Optimization Models
Introduction to Operations Research
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Network Flow How to solve maximal flow and minimal cut problems.
1 COMMONWEALTH OF AUSTRALIA Copyright Regulations 1969 WARNING This material has been reproduced and communicated to you by or on behalf.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Max Flow – Min Cut Problem. Directed Graph Applications Shortest Path Problem (Shortest path from one point to another) Max Flow problems (Maximum material.
1 Network Models Transportation Problem (TP) Distributing any commodity from any group of supply centers, called sources, to any group of receiving.
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
Maximum Flow Chapter 26. Flow Concepts Source vertex s – where material is produced Sink vertex t – where material is consumed For all other vertices.
& 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem Thanks to Jim Orlin & MIT OCW.
CS223 Advanced Data Structures and Algorithms 1 Maximum Flow Neil Tang 3/30/2010.
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
Chapter 8 Network Models to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
Network Simplex Animations Network Simplex Animations.
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.
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 23.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
ENGM 631 Maximum Flow Solutions. Maximum Flow Models (Flow, Capacity) (0,3) (2,2) (5,7) (0,8) (3,6) (6,8) (3,3) (4,4) (4,10)
Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.
::Network Optimization:: Minimum Spanning Trees and Clustering Taufik Djatna, Dr.Eng. 1.
Minimum Cost Flow Algorithms and Networks. Algorithms and Networks: Minimum Cost Flow2 This lecture The minimum cost flow problem: statement and applications.
Cycle Canceling Algorithm
Maximum Flow Chapter 26.
Algorithms and Networks
Bipartite Matching and Other Graph Algorithms
Maximum Flow Solutions
Instructor: Shengyu Zhang
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Introduction Basic formulations Applications
Lecture 19-Problem Solving 4 Incremental Method
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Augmenting Path Algorithm
Max Flow Problem Given network N=(V,A), two nodes s,t of V, and capacities on the arcs: uij is the capacity on arc (i,j). Find non-negative flow fij for.
Algorithms (2IL15) – Lecture 7
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
EE5900 Advanced Embedded System For Smart Infrastructure
and 6.855J March 6, 2003 Maximum Flows 2
Algorithms and Networks
Lecture 21 Network Flow, Part 1
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Augmenting Path Algorithm
Maximum Flow Neil Tang 4/8/2008
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Network Optimization Models: Maximum Flow Problems
Presentation transcript:

CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement Augmenting path algorithm for solving the problem

CS 4407, Algorithms University College Cork, Gregory M. Provan Maximum Flow Problem Given :Directed graph G=(V, E), Supply (source) node O, demand (sink) node T Capacity function u: E  R. Goal :Given the arc capacities, send as much flow as possible from supply node O to demand node T through the network. Example: O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Towards the Augmenting Path Algorithm Idea : Find a path from the source to the sink, and use it to send as much flow as possible. In our example, 5 units of flow can be sent through the path O  B  D  T ; Then use the path O  C  T to send 4 units of flow. The total flow is = 9 at this point. Can we send more? O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Towards the Augmenting Path Algorithm If we redirect 1 unit of flow from path O  B  D  T to path O  B  C  T, then the freed capacity of arc D  T could be used to send 1 more unit of flow through path O  A  D  T, making the total flow equal to 9+1=10. To realize the idea of redirecting the flow in a systematic way, we need the concept of residual capacities. O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Residual capacities Suppose we have an arc with capacity 6 and current flow 5: Then there is a residual capacity of 6-5=1 for any additional flow through B  D. On the other hand, at most 5 units of flow can be sent back from D to B, i.e., 5 units of previously assigned flow can be canceled. In that sense, 5 can be considered as the residual capacity of the reverse arc D  B. To record the residual capacities in the network, we will replace the original directed arcs with undirected arcs: B D 6 5 B D 1 5 The number at B is the residual capacity of B  D; the number at D is the residual capacity of D  B.

CS 4407, Algorithms University College Cork, Gregory M. Provan Residual Network The network given by the undirected arcs and residual capacities is called residual network. In our example, the residual network before sending any flow: Note that the sum of the residual capacities on both ends of an arc is equal to the original capacity of the arc. How to increase the flow in the network based on the values of residual capacities? O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Augmenting paths An augmenting path is a directed path from the source to the sink in the residual network such that every arc on this path has positive residual capacity. The minimum of these residual capacities is called the residual capacity of the augmenting path. This is the amount that can be feasibly added to the entire path. The flow in the network can be increased by finding an augmenting path and sending flow through it.

CS 4407, Algorithms University College Cork, Gregory M. Provan Updating the residual network by sending flow through augmenting paths Continuing with the example, Iteration 1 : O  B  D  T is an augmenting path with residual capacity 5 = min{5, 6, 5}. After sending 5 units of flow through the path O  B  D  T, the new residual network is: O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Updating the residual network by sending flow through augmenting paths Iteration 2 : O  C  T is an augmenting path with residual capacity 4 = min{4, 5}. After sending 4 units of flow through the path O  C  T, the new residual network is: O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Updating the residual network by sending flow through augmenting paths Iteration 3 : O  A  D  B  C  T is an augmenting path with residual capacity 1 = min{4, 4, 5, 4, 1}. After sending 1 units of flow through the path O  A  D  B  C  T, the new residual network is: O A D B C T

CS 4407, Algorithms University College Cork, Gregory M. Provan Terminating the Algorithm: Returning an Optimal Flow There are no augmenting paths in the last residual network. So the flow from the source to the sink cannot be increased further, and the current flow is optimal. Thus, the current residual network is optimal. The optimal flow on each directed arc of the original network is the residual capacity of its reverse arc: flow( O  A )=1, flow( O  B )=5, flow( O  C )=4, flow( A  D )=1, flow( B  D )=4, flow( B  C )=1, flow( D  T )=5, flow( C  T )=5. The amount of maximum flow through the network is = 10 (the sum of path flows of all iterations).

CS 4407, Algorithms University College Cork, Gregory M. Provan The Summary of the Augmenting Path Algorithm Initialization: Set up the initial residual network. Repeat –Find an augmenting path. –Identify the residual capacity c* of the path; increase the flow in this path by c*. –Update the residual network: decrease by c* the residual capacity of each arc on the augmenting path; increase by c* the residual capacity of each arc in the opposite direction on the augmenting path. Until no augmenting path is left Return the flow corresponding to the current optimal residual network