网站大量收购独家精品文档,联系QQ:2885784924

Ford–Fulkerson algorithm.pdf

  1. 1、本文档共6页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Ford–Fulkerson algorithm

Ford–Fulkerson algorithm 1 Ford–Fulkerson algorithm The Ford–Fulkerson algorithm (named for L. R. Ford, Jr. and D. R. Fulkerson) computes the maximum flow in a flow network. It was published in 1956. The name Ford–Fulkerson is often also used for the Edmonds–Karp algorithm, which is a specialization of Ford–Fulkerson. The idea behind the algorithm is very simple: As long as there is a path from the source (start node) to the sink (end node), with available capacity on all edges in the path, we send flow along one of these paths. Then we find another path, and so on. A path with available capacity is called an augmenting path. Algorithm Let be a graph, and for each edge from to , let be the capacity and be the flow. We want to find the maximum flow from the source to the sink . After every step in the algorithm the following is maintained: Capacity constraints: The flow along an edge can not exceed its capacity. Skew symmetry: The net flow from to must be the opposite of the net flow from to (see example). Flow conservation: That is, unless or . The net flow to a node is zero, except for the source, which produces flow, and the sink, which consumes flow. This means that the flow through the network is a legal flow after each round in the algorithm. We define the residual network to be the network with capacity and no flow. Notice that it can happen that a flow from to is allowed in the residual network, though disallowed in the original network: if and then . Algorithm Ford–Fulkerson Inputs Graph with flow capacity , a source node , and a sink node Output A flow from to which is a maximum 1. for all edges 2. While there is a path from to in , such that for all edges : 1. Find 2. For each edge 1. (Send flow along the path) 2. (The flow might be returned later) The path in step 2 can be found with for example a breadth-first search or a depth-first search in . If you use the former, the algorithm is called Edmonds–Karp. When no more paths in step 2 can be found, wi

文档评论(0)

l215322 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档