您的位置:首页 > 其它

Push-Relabel算法

2015-06-17 21:18 281 查看
Ford-Fulkerson方法还比较好理解

即每一次尝试都需要在剩余图里找到一条增强路径。让整个图的流量最大化。

Algorithm Operation(s)Residual Graph
Initialize the residual graph by setting the preflow to values 0 and initializing the labeling.

Initial saturating push is performed across all preflow edges out of the source, s.

Vertex a is relabeled in order to push its excess flow towards the sink, t.
The excess at a is then pushed to b then d in
two subsequent saturating pushes; which still leaves a with some excess.


Once again, a is relabeled in order to push its excess along its last remaining positive residual (i.e. push the excess
back to s).
The vertex a is then removed from the set of active vertices.


Relabel b then push its excess to t and c.

Relabel c then push its excess to d.

Relabel d then push its excess to t.

This leaves the vertex b as the only remaining active vertex, but it cannot push its excess flow towards the sink.
Relabel b then push its excess towards the source, s, via the
vertex a.


Push the last bit of excess at a back to the source, s.
There are no remaining active vertices. The algorithm terminates and returns the maximum flow of the graph (as seen above).


理解了好久。记录一下。
这个算法主要的要点是这些:

1、尽可能多的(在边容纳范围内)向sink方向增大流。

2、source和sink的height都是定死的,一个是|V|另一个是0

3、height可以理解成该站的水位。如果比周围的站点都高,那他们就不能向此处增大流。

4、指针的意思是,A到B站可以还可以增大N个单位的流

5、流的唯一出口是sink节点。程序收敛时,每一个站要么已经没有库存流,要么无法向高位置的站发送流。(位高是由于边流量限制引发)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: