Upload
stanley-strickland
View
214
Download
0
Tags:
Embed Size (px)
Citation preview
Here is an example that involves what is called ‘back flow’Here is an example that involves what is called ‘back flow’
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
00
Arrows have already been drawn initially showing the capacities and initial flows of zero along all of the edges.
Arrows have already been drawn initially showing the capacities and initial flows of zero along all of the edges.
Network Flows – Back flow
To start with let’s choose the flow augmenting path SABT.To start with let’s choose the flow augmenting path SABT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
Network Flows – Back flow
The minimum excess capacity along this path is 10, so we increase the flow by 10.
Arrows in the direction of the path are decreased by 10
and arrows against the direction of the path are increased by 10.
The minimum excess capacity along this path is 10, so we increase the flow by 10.
Arrows in the direction of the path are decreased by 10
and arrows against the direction of the path are increased by 10.
To start with let’s choose the flow augmenting path SABT.To start with let’s choose the flow augmenting path SABT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
Network Flows – Back flow
The arc AB is now saturated.The arc AB is now saturated.
Our next flow augmenting path is SCDT.Our next flow augmenting path is SCDT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
Network Flows – Back flow
The minimum excess capacity along this path is 15, so we increase the flow by 15.
Arrows in the direction of the path are decreased by 15
and arrows against the direction of the path are increased by 15.
The minimum excess capacity along this path is 15, so we increase the flow by 15.
Arrows in the direction of the path are decreased by 15
and arrows against the direction of the path are increased by 15.
Our next flow augmenting path is SCDT.Our next flow augmenting path is SCDT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
Network Flows – Back flow
Arc CD is now saturated.Arc CD is now saturated.
Consider now the flow augmenting path SCBT.Consider now the flow augmenting path SCBT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
Network Flows – Back flow
The minimum excess capacity along this path is 8, so we increase the flow by 8.
Arrows in the direction of the path are decreased by 8
and arrows against the direction of the path are increased by 8.
The minimum excess capacity along this path is 8, so we increase the flow by 8.
Arrows in the direction of the path are decreased by 8
and arrows against the direction of the path are increased by 8.
Consider now the flow augmenting path SCBT.Consider now the flow augmenting path SCBT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
Network Flows – Back flow
Arc SC is now saturated.Arc SC is now saturated.
Another flow augmenting path is SADT.Another flow augmenting path is SADT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
77
1313
33
00
1818
66
Network Flows – Back flow
The minimum excess capacity along this path is 3, so we increase the flow by 3.
Arrows in the direction of the path are decreased by 3
and arrows against the direction of the path are increased by 3.
The minimum excess capacity along this path is 3, so we increase the flow by 3.
Arrows in the direction of the path are decreased by 3
and arrows against the direction of the path are increased by 3.
Another flow augmenting path is SADT.Another flow augmenting path is SADT.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
77
1313
33
00
1818
66
Network Flows – Back flow
Arc DT is now saturated.Arc DT is now saturated.
Are there any more flow augmenting paths?Are there any more flow augmenting paths?
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
77
1313
33
00
1818
66
Remember that a flow augmenting path is any path from S to T following non-zero arrows. The path SADCBT is such a path.
Remember that a flow augmenting path is any path from S to T following non-zero arrows. The path SADCBT is such a path.
Network Flows – Back flow
Although arc CD is saturated, in this path we are going against the direction of the arc – hence the term back flow.
Although arc CD is saturated, in this path we are going against the direction of the arc – hence the term back flow.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
77
1313
33
00
1818
66
What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result.
What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result.
55
1515
4455
1313
22
00
1010
11
2020
Network Flows – Back flow
The minimum excess capacity along SADCBT is 2 and so the flow changes by 2.
All arrows in the direction of the path are reduced by 2,
All arrows against the direction of the path are increased by 2.
The minimum excess capacity along SADCBT is 2 and so the flow changes by 2.
All arrows in the direction of the path are reduced by 2,
All arrows against the direction of the path are increased by 2.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
77
1313
33
00
1818
66
What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result.
What is actually happening is that flow along CD is being diverted along CB which means that DT is able to take more flow from AD as a result.
55
1515
4455
1313
22
00
1010
11
2020
Network Flows – Back flow
Arc CB is now saturated, and arc DC is no longer saturated.Arc CB is now saturated, and arc DC is no longer saturated.
00
AA
CC
BB
DD
2020
1010
2323
2121
1818
1515
1010
99SS TT
00
00
00
00
00
00
001010
1010
1010 1111
1010
00
88
1515
1515
33
151500
00
2323
88
33
1818
22
33
1717
33
00
1818
66
We have a flow of 23 + 15 = 38 out of the source and 20 + 18 = 38 into the sink.
This is the maximum flow.
The flows are equal to all the arrows going against the direction of the edges.
We have a flow of 23 + 15 = 38 out of the source and 20 + 18 = 38 into the sink.
This is the maximum flow.
The flows are equal to all the arrows going against the direction of the edges.
55
1515
4455
1313
22
00
1010
11
2020
1010
1313
2323
20201515
55
1010
1818
Network Flows – Back flow