Network Flows – Minimum capacities

Slides:



Advertisements
Similar presentations
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.
Advertisements

3/17/2003Tucker, Applied Combinatorics Section 4.2a 1 Network Flows Michael Duquette & Whitney Sherman Tucker, Applied Combinatorics, Section 4.2a, Group.
Bioinformatics III1 We will present an algorithm that originated by Ford and Fulkerson (1962). Idea: increase the flow in a network iteratively until it.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 8 Network models.
Chapter 6 Maximum Flow Problems Flows and Cuts Augmenting Path Algorithm.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
Chapter 10: Iterative Improvement The Maximum Flow Problem The Design and Analysis of Algorithms.
1 Maximum Flow w s v u t z 3/33/3 1/91/9 1/11/1 3/33/3 4/74/7 4/64/6 3/53/5 1/11/1 3/53/5 2/22/2 
4/5/05Tucker, Sec Applied Combinatorics, 4rth Ed. Alan Tucker Section 4.3 Graph Models Prepared by Jo Ellis-Monaghan.
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 Efficient implementation of Dinic’s algorithm for maximum flow.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
Section 4.2 Network Flows By Christina Touhey. The flow out of a equals the flow into z. Algorithm 1.Make vertex a: (0, ). 2.Scan the first vertex and.
1 Augmenting Path Algorithm s t G: Flow value = 0 0 flow capacity.
3 t s the black numbers next to an arc is its capacity.
1 Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
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.
1 Efficient implementation of Dinic’s algorithm for maximum flow.
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.
EXAMPLE 2 Use perpendicular bisectors SOLUTION STEP 1 Label the bushes A, B, and C, as shown. Draw segments AB and BC. Three bushes are arranged in a garden.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Introduction Geometric figures can be graphed in the coordinate plane, as well as manipulated. However, before sliding and reflecting figures, the definitions.
Lecture 5: Network Flow Algorithms Single-Source Shortest-Path (SSSP) (Dijkstra's Algorithm) Max Flow - Min Cut (Ford-Fulkerson) Job Sequencing.
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.
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.
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.
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.
CSE 421 Algorithms Richard Anderson Lecture 22 Network Flow.
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,
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)
Triangle Inequality Theorem The sum of the lengths of any two sides of a triangle is greater than the length of the third side.
Çizge Algoritmaları.
Maximum Flow Chapter 26.
V12: Network Flows V12 follows closely chapter 12.1 in
Richard Anderson Lecture 23 Network Flow
Simplify √128 Simplify 4√45 Rationalise and simplify 2 5√2.
Maximum Flow Solutions
Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
Network Flows – Labelling procedure
Network Flows – Back flow
Network Flow 2016/04/12.
Instructor: Shengyu Zhang
MATS Quantitative Methods Dr Huw Owens
3.4 Push-Relabel(Preflow-Push) Maximum Flow Alg.
Analysis of Algorithms
Network Flows – Multiple sources and sinks
Richard Anderson Lecture 23 Network Flow
Richard Anderson Lecture 23 Network Flow
R. Johnsonbaugh Discrete Mathematics 5th edition, 2001
Richard Anderson Lecture 21 Network Flow
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.
Network Flow CSE 373 Data Structures.
EE5900 Advanced Embedded System For Smart Infrastructure
Network Flows – Restricted vertices
Min Global Cut Animation
Lecture 21 Network Flow, Part 1
Richard Anderson Lecture 22 Network Flow
Lecture 21 Network Flow, Part 1
Maximum flow: The preflow/push method of Goldberg and Tarjan (87)
Richard Anderson Lecture 22 Network Flow
Max Flows 3 Preflow-Push Algorithms
Maximum Flow Problems in 2005.
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
Excess Scaling Approach Algorithm
Presentation transcript:

Network Flows – Minimum capacities This problem involves a network in which the arcs have both minimum and maximum capacities. The definition of the value of a cut has to be modified when there are minimum capacities involved. 1, 4 A C 0, 7 2, 8 0, 3 2, 5 T S 4, 8 1, 9 4, 10 B D 1, 8

Network Flows – Minimum capacities The value of a cut is the sum of the maximum capacities for arcs that cross the cut line from S to T minus the sum of the minimum capacities for arcs that cross the cut line from T to S. The cut shown in the diagram below includes the arcs SA, BC and DT which cross the cut line from S to T, The cut shown in the diagram below includes the arcs SA, BC and DT which cross the cut line from S to T, and the arcs AB and CD which cross the cut line from T to S. The value of the cut is therefore 8 + 5 + 10 – 0 – 4 The value of the cut is therefore 8 + 5 + 10 The value of the cut is therefore 8 + 5 + 10 – 0 – 4 = 19. 1, 4 A C 0, 7 2, 8 2, 8 0, 3 0, 3 2, 5 2, 5 T S 4, 8 4, 8 1, 9 4, 10 4, 10 B D 1, 8

Network Flows – Minimum capacities The minimum cut for this network is shown below. This cut includes the arcs AC, BC and DT which cross the cut line from S to T, and the arc CD which crosses the cut line from T to S. This cut includes the arcs AC, BC and DT which cross the cut line from S to T, The value of the cut is therefore 4 + 5 + 10 The value of the cut is therefore 4 + 5 + 10 – 4 = 15. The value of the cut is therefore 4 + 5 + 10 – 4 1, 4 1, 4 A C 0, 7 2, 8 0, 3 2, 5 2, 5 T S 4, 8 4, 8 1, 9 4, 10 4, 10 B D 1, 8

Network Flows – Minimum capacities Since the value of the minimum cut is 15, the maximum flow for this network must be 15 (using the maximum flow – minimum cut theorem). We can find the maximum flow through the pipes using a modified version of the labelling procedure. 1, 4 S A B C D T 0, 7 2, 8 0, 3 2, 5 4, 8 1, 9 4, 10 1, 8

Network Flows – Minimum capacities The first step is to find an initial flow which satisfies the minimum capacities. You can start by allocating the minimum possible flows to each arc. 1, 4 S A B C D T 1 0, 7 2, 8 2 0, 3 2, 5 4 2 4, 8 1 4 1, 9 4, 10 1 1, 8

Network Flows – Minimum capacities Now you need to check each vertex and increase the flow where necessary so that the flow into a vertex is the same as the flow out of the vertex. Vertex D has a flow of 1 + 4 = 5 going into it, so the flow out of it needs to be increased to 5. Vertex C has a flow of 4 coming out of it, but only 3 going into it, so the flow in either AC or BC needs to be increased by 1. Vertex B has a flow of 3 coming out of it, but only 1 going into it, so the flow in SB needs to be increased by 2. 1, 4 S A B C D T 2 1 0, 7 2, 8 2 0, 3 2, 5 4 2 4, 8 3 1 4 5 1, 9 4, 10 1 1, 8

Network Flows – Minimum capacities The next step is to show the excess capacities and potential backflows for each arc. The flow in arc SB could increase by up to 6 units, and could decrease by up to 2 units. The flow in arc SA could increase by up to 6 units, but cannot decrease. The flow in arc AC could increase by up to 2 units, and could decrease by 1 unit. The flow in arc BD could increase by up to 7 units, but cannot decrease. The flow in arc DT could increase by up to 5 units, and could decrease by 1 unit. The flow in arc CT could increase by up to 7 units, but cannot decrease. The flow in arc CD could increase by up to 4 units, but cannot decrease. The flow in arc BC could increase by up to 3 units, but cannot decrease. The flow in arc AB could increase by up to 3 units, but cannot decrease. 2 1 2 1, 4 S A B C D T 0, 7 2, 8 2 6 7 3 3 4 0, 3 2, 5 2 4, 8 4 6 2 3 1, 9 5 4, 10 5 1 7 1, 8 1

Network Flows – Minimum capacities We now use the labelling procedure in the same way as before. Find a flow augmenting path. One example is SACT. The minimum arrow along this path is 2, and so this is the increase in the flow. We decrease all the arrows in the direction of this path by 2, and increase all the arrows against the direction of this path by 2. 2 1 S A B C D T 3 4 6 2 7 5 3 3 4 2 6 2 5 1 7

Network Flows – Minimum capacities We now use the labelling procedure in the same way as before. Find a flow augmenting path. One example is SACT. Arc AC is now saturated. 2 1 S A B C D T 3 4 6 2 7 5 3 3 4 2 6 2 5 1 7

Network Flows – Minimum capacities Now we choose another flow augmenting path. One example is SABCT. The minimum arrow along this path is 3, and so this is the increase in the flow. We decrease all the arrows in the direction of this path by 3, and increase all the arrows against the direction of this path by 3. 2 1 S A B C D T 3 5 1 4 6 2 7 5 2 3 3 4 2 5 3 6 2 3 5 1 7

Network Flows – Minimum capacities Now we choose another flow augmenting path. One example is SABCT. Arcs AB and BC are now saturated. 2 1 S A B C D T 3 5 1 4 6 2 7 5 2 3 3 4 2 5 3 6 2 3 5 1 7

Network Flows – Minimum capacities For our next flow augmenting path let’s choose SBDT. The minimum arrow along this path is 5, and so this is the increase in the flow. We decrease all the arrows in the direction of this path by 5, and increase all the arrows against the direction of this path by 5. 2 1 S A B C D T 3 5 1 4 6 2 7 5 2 3 3 4 2 5 1 3 6 2 3 6 5 1 2 7 7 5

Network Flows – Minimum capacities For our next flow augmenting path let’s choose SBDT. Arc DT is now saturated. 2 1 S A B C D T 3 5 1 4 6 2 7 5 2 3 3 4 2 5 1 3 6 2 3 6 5 1 2 7 7 5

Network Flows – Minimum capacities S and T are now disconnected, so there are no more flow augmenting paths. However, this diagram does not tell you the actual flows. The back flows (the numbers on the backward arrows) tell you by how much the flow could be reduced – i.e. how much greater the flow is than the minimum flow. Write the minimum capacity on each arc. Now add the back flow to the minimum capacity to give the flow on each arc. 4 2 1 S A B C D T 5 7 2 3 1 5 1 4 6 2 7 5 2 3 3 4 2 5 5 1 3 4 6 2 3 4 3 2 4 6 1 5 1 2 7 6 8 7 10 1 5

Network Flows – Minimum capacities The flow out of the source and into the sink is 15 units. This is the maximum possible flow. Notice that this maximum flow is the same as the value of the minimum cut, as expected from the maximum flow – minimum cut theorem. 4 2 1 S A B C D T 5 7 2 3 1 5 1 4 6 2 7 5 2 3 3 4 2 5 5 1 3 4 6 2 3 4 3 2 4 6 1 5 1 2 7 6 8 7 10 1 5

Network Flows – Minimum capacities The flow out of the source and into the sink is 15 units. This is the maximum possible flow. Notice that this maximum flow is the same as the value of the minimum cut, as expected from the maximum flow – minimum cut theorem. Notice that all the arcs in the minimum cut which flow from S to T are saturated, and the arc in the minimum cut which flows from T to S has as small a flow as possible. 4 1, 4 1, 4 A C 5 7 0, 7 2, 8 0, 3 2, 5 2, 5 T S 5 4, 8 4, 8 3 4 1, 9 4, 10 4, 10 6 8 B D 10 1, 8