100 likes | 171 Views
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. 5. 3. S.
E N D
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 5 3 S 8 T 10 9 B D 8
Network Flows – Labelling procedure 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. 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. The minimum arrow along this path is 4, and so this is the increase in the flow. 4 A C 0 8 7 0 0 5 8 3 0 S T 0 9 0 10 0 0 8 B D 0
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. 0 4 A C 0 4 4 8 7 0 3 4 0 5 8 4 3 0 S T 0 9 0 10 0 0 8 B D 0
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. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 2 5 7 8 4 3 7 0 S 0 3 T 0 3 9 0 10 0 0 8 B D 0
Network Flows – Labelling procedure Now we choose another flow augmenting path. One example is SABCT. Arcs AB and CT are now saturated. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 2 5 7 8 4 3 7 0 S 0 3 T 0 3 9 0 10 0 0 8 B D 0
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. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 2 5 7 8 4 3 7 0 S 0 3 T 1 0 3 9 0 2 10 0 0 8 0 8 8 B D 0 8
Network Flows – Labelling procedure For our next flow augmenting path let’s choose SBDT. Arc BD is now saturated. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 2 5 7 8 4 3 7 0 S 0 3 T 1 0 3 9 0 2 10 0 0 8 0 8 8 B D 0 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. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 1 2 5 7 7 8 4 3 7 0 S 0 3 T 0 1 0 3 9 0 1 1 4 2 10 0 0 8 9 0 8 8 9 B D 0 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. Arc SB is now saturated. 0 4 A C 0 4 1 4 8 7 0 3 0 4 0 1 2 5 7 7 8 4 3 7 0 S 0 3 T 0 1 0 3 9 0 1 1 4 2 10 0 0 8 9 0 8 8 9 B D 0 8
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. 0 4 4 7 A C 7 0 4 1 4 8 7 3 0 3 0 4 0 1 2 5 7 7 8 4 3 7 0 1 S 0 3 T 0 1 0 3 9 0 1 1 3 4 2 10 0 0 8 9 9 0 8 8 8 9 9 B D 0 8