Max Stream Learning Notes (2)

Source: Internet
Author: User

1 Basic Ford-fulkerson method. The idea of this method is to find an augmented path $p$ each time, and then add the augmented path $p $ corresponding stream to the previous stream to get a new stream, until the augmented path is not found, then the flow found is the maximum flow.

The pseudo code of the algorithm is as follows

Assuming that the capacity is an integer and the maximum flow is $f^{*}$, then the while loop executes a maximum of $|f^{*}|$ times, because at least 1 increases in traffic each time, the cost of each add-on path is $o (E) $, so the total complexity is $o (e|f^{*}|) $

2 Edmonds-karp algorithm. The EDMONDS-KARP algorithm is an improvement to the Ford-fulkerson, which is to find the shortest path of s to T when looking for augmented paths (the length of the route is 1). Set $\delta_{f} (U,V) $ indicates the shortest path from $u$ to $v$ in the surviving network

3 If the EDMONDS-KARP algorithm runs on the stream network G, then for all nodes $v\in v-\{s,t\}$, the shortest Path distance $\delta_{f} (s,v) in the remaining network $g_{f}$ increases monotonically with each traffic increment.

4 If the EDMONDS-KARP algorithm is running on stream network G, the total number of traffic that the algorithm performs is $o (VE) $

5 Edmonds-karp algorithm every time the complexity of finding the shortest path is $o (E) $, so the total complexity is $o (ve^{2}) $

The following is proof

Proof of 3

Assuming that for a node $v\in v-\{s,t\}$, there is a flow increment operation that makes the source point to $v$ smaller. Set $f$ is the shortest path reduction before the traffic, the corresponding residual network for the $g_{f}$, $f ^{'}$ is the increment after the traffic, corresponding to the remaining network $g_{f^{'}}$, set $v$ for all the shortest distance reduction in the node, $\delta_{f^{'}} (S,V) $ The smallest node. There are $\delta_{f^{'}} (S,v) <\delta_{f} (s,v) $.

Set $p=s\sim U\rightarrow v$ as the surviving network $g_{f^{'}}$ a shortest path from the source node s to $v$, so $ (u,v) \in g_{f^{'}}$, and $\delta_{f^{'}} (S,u) =\delta_{ F^{'}} (S,v) -1$

The distance from the source node to $u$ is not reduced, so $\delta_{f^{'}} (S,u) \geq \delta_{f} (s,u) $

Then there must be $ (u,v) \notin e_{f}$, otherwise:

$\DELTA_{F} (S,V) \leq \delta_{f} (s,u) +1$

$\leq \delta_{f^{'}} (S,u) +1$

$=\delta_{f^{'}} (S,V) $

This contradicts $\delta_{f^{'}} (S,v) <\delta_{f} (s,v) $.

So now $ (u,v) \notin e_{f}$ but $ (u,v) \in e_{f^{'}}$, this incremental operation must have increased $v$ to $u$ traffic. And because the EDMONDS-KARP algorithm always increases the flow along the shortest path, the last edge on the shortest path from S to $u$ in $g_{f}$ is $ (v,u) $, so

$\DELTA_{F} (S,v) =\delta_{f} (S,u) -1$

$\leq \delta_{f^{'}} (S,u) -1$

$=\delta_{f^{'}} (S,v) -2$

This contradicts $\delta_{f^{'}} (S,v) <\delta_{f} (s,v) $. So the assumption at the outset is not correct.

Proof of 4

In $g_{f}$, if the remaining capacity of a path $p$ is the remaining capacity of the Edge $ (u,v) $ on that path, that is $c_{f} (p) =c_{f} (U,V) $, then we call $ (U,V) $ as the critical edge. The following first proves that for each edge, the maximum number of times to become a key edge is $\frac{| v|} {2}$

When $ (u,v) $ first becomes critical edge when there is $\delta_{f} (s,v) =\delta_{f} (S,u) +1$

The side $ (u,v) $ will disappear from the surviving network. The next time $ (u,v) $ becomes a critical edge, it must be before $ (v,u) $ appears on the path $p$, assuming that this event occurs when $f^{'}$ is a stream of G, then there is

$\delta_{f^{'}} (S,u) =\delta_{f^{'}} (S,v) +1$

Because $\delta_{f} (s,v) \leq \delta_{f^{'}} (S,V) $

Then there are $\delta_{f^{'}} (S,u) =\delta_{f^{'}} (S,v) +1\geq \delta_{f} (s,v) +1=\delta_{f} (S,u) +2$, that is, the distance to $u$ is increased by at least 2

The initial distance to $u$ is at least 0, and the last to $u$ is up to $| v|-2$ ($ (u,v) $ appears on the augmented path means $u\neq t$, while $u\neq S $). So in $ (u,v) $ for the first time after becoming a key side can also be a maximum of $\frac{| v|-2}{2}=\frac{| v|} {2}-1$ times off, so the total becomes $\frac{| v|} {2}$-time off-build edge.

There are $|. e|$, so a total of up to $\frac{| v| | e|} {2}$ The edge, each augmented road appears at least one off-built edge, so the total number of times is $o (VE) $

Max Stream Learning Notes (2)

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.