Algorithm: Maximum Flow Problem

本文详细介绍了最大流问题的背景,包括流量网络的定义、反平行边的建模、多源多汇网络。重点讲解了Ford-Fulkerson方法,包括残余网络、增广路径、容量约束和流量守恒定律,并阐述了Edmonds-Karp算法,该算法通过寻找最短增广路径优化了效率。最后提到了最大二分匹配问题。
摘要由CSDN通过智能技术生成

reference 【Introduction to Algorithm Chapter 26】

Problem Setting

We wish to compute the greatest rate at which we can ship material from the source to the sink without violating any capacity constraints.

 

1.1 Flow networkds

A flow network G =(V, E) is a directed graph in which each edge(u, v) belong  to E has a nonnegative capacity c(u, v) >= 0.

We further require that if E contains a edge(u, v), then there is no edge(v, u) in the reverse direction. 

If (u, v) is not belong to E, we define c(u, v) = 0,and we disallow self-loops.

the flow network contains : a source s and a sink t and other vertices.  there is a path as s->v->t.

 Definition: Leg G = (V, E) be a flow network with a capacity function c. let s be the source of the network, and let t be the sink. A flow in G is a real-valued function f: V X V -> R that satisfies the following two properties:

Capacity constraint: For all u, v belong to V, we require 0 <= f(u, v) <= c(u, v)

Flow conservation: For all u belog to V - {s, t}, we require(none source and none sink vertices)

                                  \sum_{v \in V} f(v, u)=\sum_{v \in V} f(u, v)

when (u, v) is not belong to E, f(u,v) = 0

We call the nonnegative quantity f(u, v) the  flow from vertex u to v ertex v. and the value |f| of a flow f is defined as

 

                             |f|=\sum_{v \in V} f(s, v)-\sum_{v \in V} f(v, s)

that is the total flow out of the source minus the flow into the source.

Modeling Problems with antiparallel edges

by the definition when (u, v) is belong to E, (v, u) is not belong to E, we can convert the flow by adding a virtual vertices if it violate the constraint, as:

 

Networks with multiple sources and sinks

<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值