Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

Network Flows Back flow

Here is an example that involves what is called back flow

Arrows have already been drawn initially showing the capacities and initial flows of zero along all of the edges.

A
20 S 23 0 C 0

10 0

B
0

21
0 T 18 0

10 9
15 0

0
D

Network Flows Back flow


To start with lets choose the flow augmenting path SABT. 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.

A
10 S 23 0 C 20 0 10

010 0 10

B
0

21 11
0 10 T 18 0

10 9
15 0

0
D

Network Flows Back flow


To start with lets choose the flow augmenting path SABT. The arc AB is now saturated.

A
10 S 23 0 C 20 0 10

010 0 10

B
0

21 11
0 10 T 18 0

10 9
15 0

0
D

Network Flows Back flow


Our next flow augmenting path is SCDT. 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.

A
10 S 20 23 8 15 0 C 0 10

010 0 10

B
0

21 11
0 10 T 3 18 0 15

10 9
015

0
0 15 D

Network Flows Back flow


Our next flow augmenting path is SCDT. Arc CD is now saturated.

A
10 S 20 23 8 15 0 C 0 10

010 0 10

B
0

21 11
0 10 T 3 18 0 15

10 9
015

0
0 15 D

Network Flows Back flow


Consider now the flow augmenting path SCBT. 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.

A
10 S 20 23 8 0 23 15 0 C 0 10

010 0 10 2 10 0 8

21 11 3
0 1018 3 18 0 15

9
015

0
0 15 D

Network Flows Back flow


Consider now the flow augmenting path SCBT. Arc SC is now saturated.

A
10 S 20 23 8 0 23 15 0 C 0 10

010 0 10 2 10 0 8

21 11 3
0 1018 3 18 0 15

9
015

0
0 15 D

Network Flows Back flow


Another flow augmenting path is SADT. 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.

A
10 20 23 8 0 23 15 0 C 0 10 13

010 0 10 2 10 0 8

21 11 3
0 1018 3 0 18 0 15 18

9 6
015 3 0 0 15 D

Network Flows Back flow


Another flow augmenting path is SADT. Arc DT is now saturated.

A
10 20 23 8 0 23 15 0 C 0 10 13

010 0 10 2 10 0 8

21 11 3
0 1018 3 0 18 0 15 18

9 6
015 3 0 0 15 D

Network Flows Back flow


Are there any more flow augmenting paths? Remember that a flow augmenting path is any path from S to T following non-zero arrows. The path SADCBT is such a path. Although arc CD is saturated, in this path we are going against the direction of the arc hence the term back flow.

A
10 20 23 8 0 23 15 0 C 0 10 13

010 0 10 2 10 0 8

21 11 3
0 1018 3 0 18 0 15 18

9 6
015 3 0 0 15 D

Network Flows Back flow


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. 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.

5 7

A
10 20 23 8 0 23 15 0 C 0 10 13 15

010 0 10 02 10 0 810

21 11 3

1
20 T

0 1018 3 0 18

9 64
2 53 015 0 D 0 1513

0 15 18

Network Flows Back flow


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. Arc CB is now saturated, and arc DC is no longer saturated.

5 7

A
10 20 23 8 0 23 15 0 C 0 10 13 15

010 0 10 02 10 0 810

21 11 3

1
20 T

0 1018 3 0 18

9 64
2 53 015 0 D 0 1513

0 15 18

Network Flows Back flow


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.

5 3

15 10 20 23 8 0 15 0 23 23

A
0 10 17 15

010 02 10 10

10 0 10 0 810

20 21 11 3

1
20 T

0 1018 3 0 18

9 64

5 2 53 015 0 D 0 13 1513

0 15 18 18

You might also like