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. A S 4 3 B C 8 8 D T Network Flows – Labelling procedure Each At each edge stage willwe be try labelled to findwith a path twofrom arrows. S to T that consists of non-zero arrows. The forward Initially therearrow are there will indicate are manythe such amount flow augmenting of excess capacity paths. – the potential increase. The backward One example isarrow SACT. 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. A 8 4 0 5 3 S 9 C 0 0 8 0 0 T 0 10 0 B 8 0 7 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. A 48 04 S 9 04 C 0 4 5 3 04 8 0 0 T 0 10 0 B 8 0 73 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. A 1 48 04 7 S 9 3 0 04 C 0 4 25 8 0 3 3 0 73 0 04 7 0 10 0 B 8 0 D 0 T Network Flows – Labelling procedure Now we choose another flow augmenting path. One example is SABCT. Arcs AB and CT are now saturated. A 1 48 04 7 S 9 3 0 04 C 0 4 25 8 0 3 3 0 73 0 04 7 0 10 0 B 8 0 D 0 T 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. A 1 48 S 04 7 19 0 8 3 0 04 25 3 0 B C 0 4 73 0 04 7 8 0 3 0 210 08 08 D 08 T Network Flows – Labelling procedure For our next flow augmenting path let’s choose SBDT. Arc BD is now saturated. A 1 48 S 04 7 19 0 8 3 0 04 25 3 0 B C 0 4 73 0 04 7 8 0 3 0 210 08 08 D 08 T 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. A 1 48 S 04 7 01 9 0 89 3 0 04 1 25 3 0 B C 0 4 73 0 04 7 78 0 3 4 08 08 01 1 210 D 08 9 T 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. A 1 48 S 04 7 01 9 0 89 3 0 04 1 25 3 0 B C 0 4 73 0 04 7 78 0 3 4 08 08 01 1 210 D 08 9 T 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. 7 1 48 S 04 7 01 9 9 0 89 A C 0 4 3 0 3 3 0 B 4 04 3 1 25 08 78 0 3 4 1 01 1 210 8 08 7 D 73 0 04 7 08 9 9 T