0% found this document useful (0 votes)
30 views

Max Flow Min Cut Algorithm: Jacques@ucsd - Edu

The document describes applying the Max Flow Min Cut algorithm to find the maximum flow and minimum cut in two example networks. In the first example, the algorithm is applied starting with an initial flow of zero. It finds a maximum flow of value 2 by incrementally increasing the flow along paths with available capacity. The minimum cut has a capacity of 2 and is the single edge (v,t). In the second example, the algorithm is applied starting with an initial cyclic flow of 1. It again finds a maximum flow of value 2 through incremental increases, but arrives at a different flow distribution than the first example despite the same value. The same edge (v,t) is the minimum cut.

Uploaded by

Parmpreet Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Max Flow Min Cut Algorithm: Jacques@ucsd - Edu

The document describes applying the Max Flow Min Cut algorithm to find the maximum flow and minimum cut in two example networks. In the first example, the algorithm is applied starting with an initial flow of zero. It finds a maximum flow of value 2 by incrementally increasing the flow along paths with available capacity. The minimum cut has a capacity of 2 and is the single edge (v,t). In the second example, the algorithm is applied starting with an initial cyclic flow of 1. It again finds a maximum flow of value 2 through incremental increases, but arrives at a different flow distribution than the first example despite the same value. The same edge (v,t) is the minimum cut.

Uploaded by

Parmpreet Singh
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Max Flow Min Cut Algorithm

Example 1.

[email protected]

Find a maximum st-flow and st-minimum cut in the network below starting with a flow of zero in every arc.

u
3

4 1

We apply the algorithm. STEP 1. Now the path swxuvt is a path along which the flow in every arc is less than the capacity in every arc. So we can increase the flow along this path: we can increase the flow by one unit, but no more. So the flow values are now in red in the table below. The value of the flow (net flow leaving s) is 1. TABLE 1 Arc
(s, u ) (u, v ) (v, t ) (t, x ) (w, x ) (x , u ) (v, x ) (s, w ) (x , s)

Flow 1 0 1 1 0 1 1 0 1 0

Flow 2 Capacity 1 2 2 0 1 1 0 1 0 4 3 2 4 4 1 1 2 3

STEP 2. We have the red flow in Table 1. Then suvt is a path along which the flow can be increased, by 1 unit, but no more. So the new flow values are shown in the table in blue. The value of the flow (net flow leaving s) is 2.

STEP 3. We have the blue flow in Table 1. It appears we cant increase the flow so we build the set S for which (S , S ) is a minimum cut. Start with S = {s} Since f (s, w ) = 1 < c(s, w ) = 2 we add w S . Since f (w, x ) = 1 < c(w, x ) = 4 we add x S . Since f (s, u ) = 1 < c(s, u ) = 4 we add u S . Since f (u, v ) = 2 < c(u, v ) = 3 we add v S . We cannot add t to S, so we have found a min cut. The minimum cut is
(S , S ) = {(v, t )}

and the capacity of the cut is c(v, t ) = 2 . The blue flow, of value 2, is a maximum flow.

Example 2. We have the same example, except that you are required to start with the flow of one unit along the cycles suvtxs . Note that the value of this flow is zero, since the net flow leaving s is zero.

u
3

4 1

STEP 1 We have the flow given below in red. The path sxt has a backward flow of 1: the flow in each arc is positive but backwards towards s along this path. Therefore we can increase the flow to t by reducing the flow in all arcs of that path by one unit, but no less. The new flow is in blue below. TABLE 2. Arc
(s, u ) (u, v ) (v, t ) (t, x ) (w, x ) (x , u ) (v, x ) (s, w ) (x , s)

Flow 1 1 1 1 1 0 0 0 0 1

Flow 2 1 1 1 0 0 0 0 0 0

Flow 3 2 2 2 0 0 0 0 0 0

Capacity 4 3 2 4 4 1 1 2 3

STEP 2. We have the flow in blue. Now along the path suvt the flow can be increased by one unit. The new flow is now in green in the table.

STEP 3. The green flow seems to be a maximum flow, so lets check that this is the case by building a minimum cut. Start with S = {s} . Then again Since f (s, w ) = 0 < c(s, w ) = 2 we add w S . Since f (w, x ) = 0 < c(w, x ) = 4 we add x S . Since f (s, u ) = 2 < c(s, u ) = 4 we add u S . Since f (u, v ) = 2 < c(u, v ) = 3 we add v S . We cannot add t to S, so we have found a min cut. The minimum cut is
(S , S ) = {(v, t )}

and the capacity of the cut is c(v, t ) = 2 . The green flow, of value 2, is a maximum flow. Note that it is different to the flow in Example 1, even though it has the same value.

You might also like