Network Flows – Back flow

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.
3/17/2003Tucker, Applied Combinatorics Section 4.2a 1 Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 4.2a, Group.
Network Optimization Models: Maximum Flow Problems
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Advanced Algorithm Design and Analysis (Lecture 8) SW5 fall 2004 Simonas Šaltenis E1-215b
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 4.3 Graph Models Prepared by Jo Ellis-Monaghan.
Nick McKeown Spring 2012 Maximum Matching Algorithms EE384x Packet Switch Architectures.
Applications of Maximum Flow and Minimum Cut Problems In this handout Transshipment problem Assignment Problem.
CSC 2300 Data Structures & Algorithms April 17, 2007 Chapter 9. Graph Algorithms.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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.
A network is shown, with a flow f. v u 6,2 2,2 4,1 5,3 2,1 3,2 5,1 4,1 3,3 Is f a maximum flow? (a) Yes (b) No (c) I have absolutely no idea a b c d.
A B C D The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Here is an example that involves what is called ‘back flow’ 0 A C B D S T Arrows have already been drawn initially.
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.
1. cluster the data. 2. for the data of a cluster, set up the network. 3. begin at a random vertex as source/sink s, choose its farthest vertex as the.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
9/23/2015ACM-ICPC1 Maximum Flow Problem Source t fg e 42 Target (sink) flow capacity b s c a de 2/3/ actual flow 1/2/ 1/ 2/ 1.Actual flow  capacity.
Network Flow How to solve maximal flow and minimal cut problems.
Announcements Network Flow today, depending on how far we get, we will do String Matching on Wednesday Then Review for Final next Monday This week’s lab.
CS 4407, Algorithms University College Cork, Gregory M. Provan Network Optimization Models: Maximum Flow Problems In this handout: The problem statement.
1 WEEK 11 Graphs III Network Flow Problems A Simple Maximum-Flow Algorithm Izmir University of Economics.
The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they can carry.
& 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.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Announcements Finish up Network Flow today Then Review for Final on Monday ◦ HW#5 is due on Monday, let me or the TA’s know if you have trouble starting.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Network Problems A D O B T E C
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)
Maximum Flow - Anil Kishore Graph Theory Basics. Prerequisites What is a Graph Directed, Weighted graphs How to traverse a graph using – Depth First Search.
CSC 172 DATA STRUCTURES.
Maximum Flow Solutions
Maximum Flow Problem flow capacity Actual flow  capacity
Network Notes Ms Allan 2012 AS91260 (2.5) Designed to teach from,
Network Flows – Labelling procedure
Edmonds-Karp Algorithm
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
3.4 Push-Relabel(Preflow-Push) Maximum Flow Alg.
Network Flows – Multiple sources and sinks
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 21 Network Flow
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
Network Flow CSE 373 Data Structures.
Network Flows – Restricted vertices
Min Global Cut Animation
Lecture 21 Network Flow, Part 1
Network Flows – Minimum capacities
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
MAXIMUM flow by Eric Wengert.
The Ford-Fulkerson Algorithm
Augmenting Path Algorithm
Introduction to Maximum Flows
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Introduction to Maximum Flows
Not Always Feasible 2 (3,5) 1 s (0,2) 3 (, u) t.
Richard Anderson Lecture 22 Network Flow
Maximum Flow Problems in 2005.
EMIS 8374 Max-Flow in Undirected Networks Updated 18 March 2008
EMIS The Maximum Flow Problem: Flows and Cuts Updated 6 March 2008
Excess Scaling Approach Algorithm
Presentation transcript:

Network Flows – Back flow Here is an example that involves what is called ‘back flow’ Arrows have already been drawn initially showing the capacities and initial flows of zero along all of the edges. 10 A B 21 20 10 S T 23 9 18 15 C D

Network Flows – Back flow To start with let’s choose the flow augmenting path SABT. The minimum excess capacity along this path is 10, so we increase the flow by 10. Arrows in the direction of the path are decreased by 10 and arrows against the direction of the path are increased by 10. 10 A B 11 21 10 10 20 10 10 10 S T 23 9 18 15 C D

Network Flows – Back flow To start with let’s choose the flow augmenting path SABT. The arc AB is now saturated. 10 A B 11 21 10 10 20 10 10 10 S T 23 9 18 15 C D

Network Flows – Back flow Our next flow augmenting path is SCDT. The minimum excess capacity along this path is 15, so we increase the flow by 15. Arrows in the direction of the path are decreased by 15 and arrows against the direction of the path are increased by 15. 10 A B 11 21 10 10 20 10 10 10 S T 8 23 9 3 18 15 15 15 C D 15

Network Flows – Back flow Our next flow augmenting path is SCDT. Arc CD is now saturated. 10 A B 11 21 10 10 20 10 10 10 S T 8 23 9 3 18 15 15 15 C D 15

Network Flows – Back flow Consider now the flow augmenting path SCBT. The minimum excess capacity along this path is 8, so we increase the flow by 8. Arrows in the direction of the path are decreased by 8 and arrows against the direction of the path are increased by 8. 10 A B 11 21 10 3 10 20 2 10 10 10 8 18 S T 8 23 9 3 18 15 23 15 15 C D 15

Network Flows – Back flow Consider now the flow augmenting path SCBT. Arc SC is now saturated. 10 A B 11 21 10 3 10 20 2 10 10 10 8 18 S T 8 23 9 3 18 15 23 15 15 C D 15

Network Flows – Back flow Another flow augmenting path is SADT. The minimum excess capacity along this path is 3, so we increase the flow by 3. Arrows in the direction of the path are decreased by 3 and arrows against the direction of the path are increased by 3. 10 A B 11 21 7 10 3 10 20 2 10 10 13 10 8 18 S T 8 23 9 6 3 18 3 15 15 23 15 18 C D 15

Network Flows – Back flow Another flow augmenting path is SADT. Arc DT is now saturated. 10 A B 11 21 7 10 3 10 20 2 10 10 13 10 8 18 S T 8 23 9 6 3 18 3 15 15 23 15 18 C D 15

Network Flows – Back flow Are there any more flow augmenting paths? Remember that a flow augmenting path is any path from S to T following non-zero arrows. The path SADCBT is such a path. Although arc CD is saturated, in this path we are going against the direction of the arc – hence the term back flow. 10 A B 11 21 7 10 3 10 20 2 10 10 13 10 8 18 S T 8 23 9 6 3 18 3 15 15 23 15 18 C D 15

Network Flows – Back flow What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result. The minimum excess capacity along SADCBT is 2 and so the flow changes by 2. All arrows in the direction of the path are reduced by 2, All arrows against the direction of the path are increased by 2. 10 A B 11 21 5 7 10 3 1 10 20 2 10 10 13 10 8 15 10 18 S 20 T 8 23 9 6 4 3 18 5 2 3 15 15 23 15 18 C D 15 13

Network Flows – Back flow What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result. Arc CB is now saturated, and arc DC is no longer saturated. 10 A B 11 21 5 7 10 3 1 10 20 2 10 10 13 10 8 15 10 18 S 20 T 8 23 9 6 4 3 18 5 2 3 15 15 23 15 18 C D 15 13

Network Flows – Back flow We have a flow of 23 + 15 = 38 out of the source and 20 + 18 = 38 into the sink. This is the maximum flow. The flows are equal to all the arrows going against the direction of the edges. 10 20 10 A B 11 15 21 5 3 10 3 1 10 20 2 10 10 17 10 8 15 10 18 S 20 T 8 10 23 9 6 4 3 18 5 2 5 3 15 15 23 15 23 18 C D 18 15 13 13