Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Flow 2016/04/12.

Similar presentations


Presentation on theme: "Network Flow 2016/04/12."— Presentation transcript:

1 Network Flow 2016/04/12

2 Ford-Fulkerson Algorithm
Initialize the flow to 0 Construct the graph While there’s an augmenting path P from s to t (BFS): F = the bottleneck flow of P Add F to the path and total flow Modify residual network Return total flow

3 Will this Procedure End?
We assume all flows and capacities are integers. If not, scale them. The upper bound of the max network flow is the capacity of the largest edge, let’s call it C. After each round, the total flow increases by at least 1. Otherwise, there’s no augmenting path and procedure ends. C rounds at most. Time complexity is O( CN ), where N is the number of nodes.

4 Choose a Good Flow Choose augmenting paths with:
Max bottleneck capacity. Fewest number of edges. Sufficiently large bottleneck capacity.

5 Capacity & Net Flow Limit
If e is a forward edge, its residual capacity = ce - f( e ). 0 ≤ f( e ) ≤ f’( e ) = f( e ) + F ≤ f( e ) + ( ce - f( e ) ) = ce Otherwise… ce ≥ f( e ) ≥ f’( e ) = f( e ) – F ≥ f( e ) – f( e ) = 0 For each internal node on P, the flow enters and exits with amount F. Therefore the net flow of an internal node is 0.

6 Max-Flow Min-Cut Theorem Proof
The value of the max flow = the value of the min cut. Prove by There exists a cut ( A, B ) such that v( f ) = cap( A, B ). Flow f is a max flow. There is no augmenting path relative to f.

7 Max-Flow Min-Cut Theorem Proof
1. => 2. If there’s no such cut, that means we can still add some flow. 2. => 3. If there exists an augmenting path, send flow along that path. 3. => 1. If there’s no such cut, we can find a augmenting path. When one of the conditions are fulfilled, so are the other ones. Therefore, the value of the max flow = the value of the min cut.


Download ppt "Network Flow 2016/04/12."

Similar presentations


Ads by Google