Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Flows – Labelling procedure

Similar presentations


Presentation on theme: "Network Flows – Labelling procedure"— Presentation transcript:

1 Network Flows – Labelling procedure
The diagram below shows water flowing through a pipework system. The values on the edges are the capacities of water that they can carry. We can find the maximum flow through these pipes using the labelling procedure. 4 A C 7 8 3 5 S 8 T 10 9 B D 8

2 Network Flows – Labelling procedure
Each edge will be labelled with two arrows. The forward arrow will indicate the amount of excess capacity – the potential increase. The backward arrow will indicate the current flow - the potential decrease. Initially the excess capacities are the full capacity and the flows are all zero. At each stage we try to find a path from S to T that consists of non-zero arrows. Initially there are there are many such flow augmenting paths. One example is SACT. The minimum arrow along this path is 4, and so this is the increase in the flow. 8 4 9 7 10 5 3 A C S T B D

3 Network Flows – Labelling procedure
We decrease all the arrows in the direction of this path by 4, and increase all the arrows against the direction of this path by 4. Notice that AC is now saturated, so this arc cannot be used in any further flow augmenting paths. 4 A C 4 4 8 7 3 4 5 8 4 3 S T 9 10 8 B D

4 Network Flows – Labelling procedure
Now we choose another flow augmenting path. One example is SABCT. The minimum arrow along this path is 3, and so this 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. 4 A C 4 1 4 8 7 3 4 2 5 7 8 4 3 7 S 3 T 3 9 10 8 B D

5 Network Flows – Labelling procedure
Now we choose another flow augmenting path. One example is SABCT. Arcs AB and CT are now saturated. 4 A C 4 1 4 8 7 3 4 2 5 7 8 4 3 7 S 3 T 3 9 10 8 B D

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

7 Network Flows – Labelling procedure
For our next flow augmenting path let’s choose SBDT. Arc BD is now saturated. 4 A C 4 1 4 8 7 3 4 2 5 7 8 4 3 7 S 3 T 1 3 9 2 10 8 8 8 B D 8

8 Network Flows – Labelling procedure
Are there any more flow augmenting paths? Remember we are looking for paths following non-zero arrows from S to T. Yes, there is the path SBCDT, with minimum arrow 1, so we can increase the flow by 1. We decrease all the arrows in the direction of this path by 1, and increase all the arrows against the direction of this path by 1. 4 A C 4 1 4 8 7 3 4 1 2 5 7 7 8 4 3 7 S 3 T 1 3 9 1 1 4 2 10 8 9 8 8 9 B D 8

9 Network Flows – Labelling procedure
Are there any more flow augmenting paths? Remember we are looking for paths following non-zero arrows from S to T. Arc SB is now saturated. 4 A C 4 1 4 8 7 3 4 1 2 5 7 7 8 4 3 7 S 3 T 1 3 9 1 1 4 2 10 8 9 8 8 9 B D 8

10 Network Flows – Labelling procedure
We now have a flow of 16 out of the source (backwards arrows) and into the sink. Since SB, AB, AC, BD and CT are all saturated, S and T are disconnected (there is no path from S to T using unsaturated arcs), so this is the maximum flow. We can write the final flows on the diagram. We read them off the backward arrows on each edge. 4 4 7 A C 7 4 1 4 8 7 3 3 4 1 2 5 7 7 8 4 3 7 S 1 3 T 1 3 9 1 1 3 4 2 10 8 9 9 8 8 8 9 9 B D 8


Download ppt "Network Flows – Labelling procedure"

Similar presentations


Ads by Google