Graph theory : max flow in network
The problem
The graph should be directed
The graph is allowed to have cycles
The idea : repeatedly finds augmenting paths through the residual graph and augments the flow until no augmenting paths can be found
(You can see that this is a greedy algorithm)
- start with an arbitrary path, use it as augmenting path
- Find an another path in residual graph
- try to augment the flow using the new path
- Repeat until no new path
1 | while there is an augmenting path: |