计算网络的最大流量
我们能否找到一种算法(以线性时间)计算树状网络的最大流量,即对于删除汇(及其相关边)留下一棵树的网络。
can we find an algorithm which computes (in linear-time) the maximum flow for tree-like networks, that is, for networks such that the removal of the sink (and its associated edges) leaves a tree.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,只需运行如下所示的代码:
使用 s 等于源的初始调用(我们假设源的 in_capacity 为无穷大)。
Yes, just run something like the following:
Use an initial call with s equal to the source (we assume that the source has an in_capacity of infinity).
Ford-Fulkerson 的复杂度为 O(E*f),其中 E 是边数,f 是最大流,如果问题中的 E 或 f 具有恒定的上限,则将其视为线性。
Ford-Fulkerson is O(E*f) where E is the number of edges and f the maximum flow, which would be considered linear if you have a constant upper bound on E or f in your problem.