Preflow-push: Difference between revisions
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
== Induction basis == | == Induction basis == | ||
# Set | '''Abstract view:''' | ||
# For all arcs <math>a\in A</math>, set <math>f(a):=0</math>. | |||
# For each arc <math>(s,v)\in A</math>, overwrite this value by <math>f(a):=u(a)</math>. | |||
# Compute a valid distance labeling <math>d</math>, for example, the true distances from all nodes to <math>t</math> in the residual network. | |||
# Set <math>d(s):=n</math>. | |||
'''Proof:''' | |||
Obvious. | |||
== Induction step == | == Induction step == |
Revision as of 17:08, 26 October 2014
Abstract view
Algorithmic problem: max-flow problem (standard version)
Type of algorithm: loop.
Definition:
- For [math]\displaystyle{ a\in A }[/math], let [math]\displaystyle{ f(a) }[/math] be a real number (not necessarily foring a flow). For [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math], the excess of [math]\displaystyle{ v }[/math] with respect to [math]\displaystyle{ f }[/math] is defined by [math]\displaystyle{ e_f(v):=\sum_{w:(w,v)\in A}f(w,v)-\sum_{w:(v,w)\in A}f(v,w) }[/math].
- A node [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math] is called active it its excess is positive.
- Let [math]\displaystyle{ \Delta }[/math] denote the sum of the distance labels [math]\displaystyle{ d(v) }[/math] of all active nodes [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math].
Invariant: Before and after each iteration:
- For each arc [math]\displaystyle{ a\in A }[/math], it is [math]\displaystyle{ 0\leq f(a)\leq u(a) }[/math] .
- For each node [math]\displaystyle{ v\in V }[/math], it is [math]\displaystyle{ e_f(v)\geq 0 }[/math].
- The node labels [math]\displaystyle{ d }[/math] form a valid distance labeling, and it is [math]\displaystyle{ d(s)=|V| }[/math].
Variant: At least one
- The label [math]\displaystyle{ d(v) }[/math] of at least one node [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math] is increased.
- A saturating push is performed.
- The value of [math]\displaystyle{ \Delta }[/math] decreases (in case of a non-saturating push).
Induction basis
Abstract view:
- For all arcs [math]\displaystyle{ a\in A }[/math], set [math]\displaystyle{ f(a):=0 }[/math].
- For each arc [math]\displaystyle{ (s,v)\in A }[/math], overwrite this value by [math]\displaystyle{ f(a):=u(a) }[/math].
- Compute a valid distance labeling [math]\displaystyle{ d }[/math], for example, the true distances from all nodes to [math]\displaystyle{ t }[/math] in the residual network.
- Set [math]\displaystyle{ d(s):=n }[/math].
Proof: Obvious.