|
for ( each edge e ) { f(e) = 0; // Start with 0 flow on each edge } while ( there is a "flow augmenting path" ) { increase the flow along this "flow augmenting path"; } |
To understand the algorithm, we need to learn about:
|
|
|
|
Example:
|
Slack( path ) = maximum amount of flow that can be increased along the given path |
Slack ( flow augmenting path type 1 ) = min e ∈ path ( c(e) - f(e) ) |
Example:
|
|
Example: increase flow along a "flow augmenting path"
|
|
|
Answer: no !!
There is a better solution:
(Total flow = 6 !!!)
|
|
|
Example:
|
|
|