Max Stream Learning Note (3)-Push sticker labeling algorithm One

Source: Internet
Author: User

Previous article

1 Pre-flow: The pre-flow is a function $f$ of $v\times V \rightarrow R, which satisfies the capacity constraints and the following properties for each node $u\in v-\{s\}$:

$\sum_{v\in v}f (v,u)-\sum_{v\in v}f (u,v) \geq 0$

Define $E (U) =\sum_{v\in v}f (v,u)-\sum_{v\in v}f (u,v) $ for excess flow into the node $u$. If $e (u) >0$, call $u$ overflow

2 definition of the height function: Set g is a flow network if the function $f:v\rightarrow n$ satisfies $h (s) =| V|,h (t) =0$, and on any side $ (u,v) \in e_{f}$, with $h (u) \leq h (v) +1$, then $h$ is a height function

3 for any two nodes $u,v\in v$, if $h (u) >h (v) +1$, then $ (u,v) \notin e_{f}$

4 The idea of a push-to-paste label algorithm is to maintain a pre-stream $f$ and height function $h$ at any time of the algorithm, and to update it using push operations and a label-labeling Operation .

5 Push operation: If $u$ is an overflow node, $c _{f} (u,v) >0$, and $h (U) =h (v) +1$, then the push Operation $push (U,V) $ acts on the node $u,v$. The excess flow of the set node $u$ is stored in the $u.e$ and is stored in the $u.h$ height. Here is the pseudo-code for the push operation:

Each time the traffic from the node $u$ to the node $v$ is $\delta _{f} (u,v) =min (U.e,c_{f} (U,V)) $, the $u.e$ is guaranteed not to turn negative and $c (U,V) $.

If, after a $push$ operation, $ (u,v) $ is saturated, that is, $c_{f} (u,v) =0$, the push operation is called saturation push , otherwise unsaturated push .

6 node $u$ will no longer overflow after an unsaturated push from node $u$ to node $v$.

7 Re-labeling operation: If the node $u$ overflow and for all sides $ (u,v) \in e_{f}$, there is $u.h\leq v.h$, then the label operation will be re-labeled $relabel (U) $.

When this operation is called, the $E _{f}$ contains at least one edge from $u$. Because $e (u) =\sum_{v\in v}f (v,u)-\sum_{v\in v}f (u,v) >0$, there is at least one $v$ that makes $ (v,u). f>0$, so at least one side $ (u,v) \in e_{f}$.

8 The overall flow of the algorithm:

(1) initialization

(2) Main loop

9 Set $f$ as a pre-stream for the stream network G, $h $ for the height function. If a node $u$ overflow, either the $u$ can be pushed or the $u$ can be re-labeled.

10 the height of each node is not reduced throughout the Generic-push-relabel process, and each re-labeling operation will increase the $u$ height by at least 1.

11 the whole process of generic-push-relabel will always be maintained $h$ is a height function

12 The path from the source point to the sink point does not exist throughout the Generic-push-relabel process.

13 If the Generic-push-relabel algorithm is able to terminate, the computed $f$ is a maximum flow.

The following is proof

Proof of 9

For any remaining edge $ (u,v) $ has $h (u) \leq h (v) +1$. If the $u$ cannot be pushed, then for any of the $ (u,v) \in e_{f}$ there is $h (u)

Proof of 11

(1) Initially, $h $ is a height function;

(2) Re-labeling operation after $u$, for all $ (u,v) $ still satisfies $h (u) \leq h (v) +1$. For edges entering $u$, such as $ (w,u) $, there is $w.h\leq u.h+1$ before the label is re-labeled, followed by $w.h< u.h+1$. So the re-labeling operation will keep the $h$ still as the height function.

(3) $PUSH (U,V) $ operation may add an edge $ (v,u) $, $v. h=u.h-1<u.h+1$, so $h$ is still a height function. It is also possible to delete the side $ (u,v) $, which has no effect.

Proof of 12

Suppose there is a $p=<v_{0},v_{1},..., v_{k}>$, where $s=v_{0},t=v_{k}.$ because $p$ passes through each node at most once, then there is $k<| v|$. Because of $h (t) =0$, and for any one edge $ (v_{i},v_{i+1}) $, the height of the $v _{i}$ is up to 1 higher than the $v_{i+1}$, so $h (s) \leq k<| v|$, this with $h (s) =| v|$ contradiction

Proof of 13

(1) First, during the entire process of the algorithm, $f $ is a pre-stream. Initially, the algorithm in each loop, the re-labeling does not affect the $f$, push operation after the end of $f$ is still a pre-flow;

(2) If the algorithm can terminate, then terminate, no node need push operation and re-labeling operation, by 9, no overflow node exists, so $f$ is a stream. By 12 It is known that no augmented path exists, so by the maximum flow minimum cut theorem, $f $ is the maximum flow

Max Stream Learning Note (3)-Push sticker labeling algorithm One

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.