Can someone please direct me to a site where step-by-step instruction is given on how to apply f开发者_运维知识库ord-fulkerson method on a graph to find the maximum flow.
Thank you so much in advance.
Best I know ( link ), wikipedia ( link ) and first alternative Google hit ( Link ).
Ford-Fulkerson Labeling Algorithm
- (Initialization) Let x be an initial feasible flow (e.g. x(e) = 0 for all e in E).
- (Flow augmentation) If there are no augmenting path from s to t on the residual network, then stop. The present x is a max flow. If there is a flow augmenting path p, replace the flow x as 2.
- x(e)=x(e)+delta if e is a forward arc on p.
- x(e)=x(e)-delta if e is a backward arc on p. where delta is a minimum value of residual capacity on p. Repeat this step.
Source code example: Java
http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm
also interesting is the min-cut theorem. the maximum amount of flow passing from the source to the sink is equal to the minimum cut of edges and their flow. i just flunked on that question in school :(
http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem
精彩评论