Download presentation
Presentation is loading. Please wait.
1
Network Flows – Multiple sources and sinks
Sometimes a network will have multiple sources and multiple sinks. We deal with this situation by introducing a supersource and a supersink. 8 12 A D T1 9 10 S1 3 18 30 16 T2 E B 15 S2 8 10 3 17 T3 12 C F 5
2
Network Flows – Multiple sources and sinks
Sometimes a network will have multiple sources and multiple sinks. To obtain the capacities on the new edges, consider the max flow out of the sources. Max flow out of S1 = = 27 so the capacity into S1 must be at least 27. Max flow out of S2 = = 32 so the capacity into S2 must be at least 32. We deal with this situation by introducing a supersource and a supersink. 8 12 A D T1 9 T 10 S1 3 27 S 18 30 16 T2 E B 15 32 S2 8 10 3 17 T3 12 C F 5
3
Network Flows – Multiple sources and sinks
Max flow into T1 = = 22 so the capacity out of T1 must be at least 22. Max flow into T2 = = 19 so the capacity out of T2 must be at least 19. Max flow into T3 = 12 so the capacity out of T3 must be at least 12. 8 12 A D T1 9 T 22 10 S1 3 27 S 18 19 30 16 T2 E B 15 32 S2 8 10 3 12 17 T3 12 C F 5
4
Network Flows – Multiple sources and sinks
The minimum cut consists of edges AD, ED, ET2, EF ad CF and DT or vertex sets S, S1, S2, A, B, C, E and D, T1, T2, T3, T The capacity of the cut is = 50 What is the minimum cut for this network? 8 12 A D T1 9 T 22 10 S1 3 27 S 18 19 30 16 T2 E B 15 32 S2 8 10 3 12 17 T3 12 C F 5
5
Network Flows – Multiple sources and sinks
We can now find flow augmenting paths to increase the flow. 8 12 A D T1 9 22 10 S1 3 27 18 S 19 30 16 T2 T E B 15 32 S2 8 3 10 12 17 T3 C F 12 5
6
Network Flows – Multiple sources and sinks
SS2BET2T can be increased by 15. Arc S2B is now saturated. 8 12 A D T1 9 22 10 S1 3 27 18 S 4 15 19 30 15 16 1 15 T2 T E B 16 15 32 15 15 S2 8 3 10 12 17 T3 C F 12 5
7
Network Flows – Multiple sources and sinks
SS1BET1T can be increased by 10. Arc ET1 is now saturated. 8 12 A D T1 9 22 12 10 10 10 S1 3 27 17 10 18 8 10 S 15 4 5 25 1 T2 T E B 15 15 15 15 16 15 S2 8 3 10 12 17 T3 C F 12 5
8
Network Flows – Multiple sources and sinks
SS1ADT1T can be increased by 8. Arc AD is now saturated. 8 8 4 8 12 A D T1 9 1 8 4 18 12 10 10 S1 3 9 18 17 10 8 S 10 4 5 1 T2 T E B 15 15 25 15 15 16 S2 8 3 10 12 17 T3 C F 12 5
9
Network Flows – Multiple sources and sinks
SS2CFT3T can be increased by 5. Arc CF is now saturated. 4 A D T1 1 8 8 8 4 10 S1 3 9 8 18 18 S 10 4 5 1 T2 T E B 11 20 16 15 25 15 15 15 S2 7 5 12 8 3 10 12 5 17 7 5 T3 5 5 C F 12
10
Network Flows – Multiple sources and sinks
SS2CEFT2T can be increased by 3. Arc FT2 is now saturated. 4 A D T1 1 8 8 8 4 10 S1 3 9 8 18 18 S 10 1 18 4 15 5 1 T2 T E B 8 23 11 20 25 15 15 S2 5 3 3 5 3 8 10 7 3 7 12 5 9 8 5 T3 5 C F 7
11
Network Flows – Multiple sources and sinks
SS2CEFT3T can be increased by 5. Arc EF is now saturated. 4 A D T1 1 8 8 8 4 10 S1 3 9 8 18 18 S 10 1 5 1 T2 T E B 3 28 8 23 25 15 18 15 S2 7 5 2 10 8 3 5 3 2 8 7 3 9 8 4 13 2 10 7 5 T3 5 C F
12
Network Flows – Multiple sources and sinks
SS1BEDT1T can be increased by 3. Arc ED is now saturated. 1 11 4 8 A D T1 1 8 8 4 18 1 21 3 3 10 S1 6 21 9 18 5 13 8 10 S 2 28 1 5 25 1 T2 T E B 28 15 18 3 15 S2 10 3 8 2 2 13 8 4 10 T3 5 C F 2
13
Network Flows – Multiple sources and sinks
SS1BET2T can be increased by 1. Arcs ET2 and T1T2 are now saturated. 1 A D T1 1 8 11 8 1 3 10 S1 5 22 6 21 4 14 5 13 21 S 19 1 18 1 29 2 28 1 15 16 T2 T E B 28 3 15 S2 10 3 8 2 2 13 8 4 10 T3 5 C F 2
14
Network Flows – Multiple sources and sinks
The flow out of the sources ( = 50) and into the sinks ( = 50) are both equal to the minimum cut of 50. We have therefore found the maximum flow. 1 A D T1 1 8 11 8 1 3 10 S1 5 22 4 14 21 S 19 1 29 16 T2 T E B 28 3 15 S2 10 3 8 2 2 13 8 4 10 T3 5 C F 2
15
Network Flows – Multiple sources and sinks
The flow out of the sources ( = 50) and into the sinks ( = 50) are both equal to the minimum cut of 50. We have therefore found the maximum flow. 11 1 A D T1 8 1 8 11 8 8 3 10 S1 3 4 14 29 10 14 1 T2 E B 29 16 15 15 8 16 S2 3 8 2 3 13 13 8 8 4 10 T3 5 C F 2 10 5
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.