Basic flow definitions: Difference between revisions

From Algowiki
Jump to navigation Jump to search
Line 15: Line 15:
== Flow-augmenting path ==
== Flow-augmenting path ==


A '''flow-augmenting path''' from some node <math>s\in V</math> to some node <math>t\in V</math> is an [[Basic graph definitions#Paths|ordinary path]] in <math>G_f</math>. Equivalently, a flow-augmenting path is a [[Basic graph definitions#Paths|generalized path]] such that:
A '''flow-augmenting path''' (or '''augmenting path''' for short) from some node <math>s\in V</math> to some node <math>t\in V</math> is an [[Basic graph definitions#Paths|ordinary path]] in the residual network <math>G_f</math>. Equivalently, a flow-augmenting path is a [[Basic graph definitions#Paths|generalized path]] such that:
# <math>f(a)<u(a)</math> if <math>a\in A</math> is a forward arc;
# <math>f(a)<u(a)</math> if <math>a\in A</math> is a forward arc;
# <math>f(a)>0</math> if <math>a\in A</math> is a backward arc.
# <math>f(a)>0</math> if <math>a\in A</math> is a backward arc.


Augmenting
'''Augmenting along a path:'''
# Let <math>p</math> denote the current path of the traversal (which is an <math>(s,t)</math>-path in this case).
Let <math>p</math> denote some flow-augmenting path, and let <math>\varepsilon>0</math> such that
# Let <math>x</math> denote the minimum of the values <math>c(a)-f(a)</math> on all forward arcs of <math>p</math>.
# <math>f(a)+\varepsilon\leq u(a)</math> if <math>a\in A</math> is a forward arc;
# Let <math>y</math> denote the minimum of the values <math>f(a)</math> on all backward arcs of <math>p</math>.
# <math>f(a)-\varepsilon\geq 0</math> if <math>a\in A</math> is a backward arc.
# For each arc <math>a \in A</math> on <math>p</math>, increase the flow value by <math>\min \{x,y \}</math> if <math>a</math> is a forward arc on <math>p</math>, otherwise, decrease the flow value by <math>\min \{x,y \}</math>.
''Augmentation'': For each arc <math>a \in A</math> on <math>p</math>:
 
# Increase the flow value by <math>\varepsilon</math> if <math>a</math> is a forward arc on <math>p</math>.
 
# Decrease the flow value by <math>\min \{x,y \}</math> if <math>a</math> is a backward arc on <math>p</math>.
By definition of <math>x</math> and <math>y</math>, the capacity constraints are preserved. To see that the flow conservation conditions are preserved as well, only the internal nodes of <math>p</math> are relevant. Let <math>v</math> be such an internal node, and let <math>u</math> and <math>w</math> denote the immediate predecessor and successor of <math>v</math> on <math>p</math>, respectively. Basically, there are four cases:
Obviously, the capacity constraints are preserved. The flow conservation conditions are preserved at every [[Basic graph definitions#Paths|internal node]] of <math>p</math>. To see that, let <math>v</math> be such an internal node, and let <math>u</math> and <math>w</math> denote the immediate predecessor and successor of <math>v</math> on <math>p</math>, respectively. Basically, there are four cases:
*Either <math>(u,v)</math> is on <math>p</math> as a forward arc or <math>(v,u)</math> is on <math>p</math>  as a backward arc.
*Either <math>(u,v)</math> is on <math>p</math> as a forward arc or <math>(v,u)</math> is on <math>p</math>  as a backward arc.
*Either <math>(v,w)</math> is on <math>p</math> as a forward arc or <math>(w,v)</math> is on <math>p</math> as a backward arc.
*Either <math>(v,w)</math> is on <math>p</math> as a forward arc or <math>(w,v)</math> is on <math>p</math> as a backward arc.
It is easy to check preservation of the flow conservation conditions for each of these four cases.
It is easy to check preservation of the flow conservation conditions at <math>v</math> for each of these four cases.
 
'''Augmenting up to saturation:'''
Again, let <math>p</math> denote some flow-augmenting path.
# Let <math>\varepsilon_1>0</math> denote the minimum of the values <math>c(a)-f(a)</math> on all forward arcs of <math>p</math>.
# Let <math>\varepsilon_2>0</math> denote the minimum of the values <math>f(a)</math> on all backward arcs of <math>p</math>.
# Let <math>\varepsilon
Augmenting the flow <math>f</math> along <math>p</math> by <math>\varepsilon</math> yields at least one saturated arc.


== Preflow ==
== Preflow ==

Revision as of 08:31, 9 November 2014

Definition

On this page and all dependent pages, [math]\displaystyle{ G=(V,A) }[/math] is a symmetric, simple directed graph, unless said otherwise. For [math]\displaystyle{ a\in A }[/math], there are real values [math]\displaystyle{ u(a) }[/math] and [math]\displaystyle{ f(a) }[/math] such that [math]\displaystyle{ 0\leq f(a)\leq u(a) }[/math]. The value [math]\displaystyle{ u(a) }[/math] is the upper bound of [math]\displaystyle{ a }[/math].

Remark: Simplicity and symmetry do not reduce generality. In fact, parallel arcs can be united with the upper bounds summed up. And if [math]\displaystyle{ (w,v)\not\in A }[/math] for some [math]\displaystyle{ (v,w)\in A }[/math], we may add [math]\displaystyle{ (w,v) }[/math] with zero upper bound.

Residual network

The residual network of [math]\displaystyle{ (G,u) }[/math] with respect to [math]\displaystyle{ f }[/math] is the pair [math]\displaystyle{ (G_f,u_f) }[/math], where [math]\displaystyle{ u_f }[/math] is defined by [math]\displaystyle{ u_f(v,w):=u(v,w)-f(v,w)+f(w,v) }[/math] for all [math]\displaystyle{ (v,w)\in A' }[/math]. The value [math]\displaystyle{ u_f(a) }[/math] is called the residual capacity of [math]\displaystyle{ a\in A }[/math] with respect to [math]\displaystyle{ f }[/math]. The graph [math]\displaystyle{ G_f }[/math] consists of all nodes of [math]\displaystyle{ G }[/math] and, specifically, of all arcs of [math]\displaystyle{ G }[/math] with positive residual capacities.

Remarks:

  1. Roughly speaking, the residual capacity of an arc [math]\displaystyle{ (v,w)\in A }[/math] is the amount by which the net flow from [math]\displaystyle{ v }[/math] to [math]\displaystyle{ w }[/math] could be increased within the capacity constraints solely by increasing the flow value of [math]\displaystyle{ (v,w) }[/math] and decreasing the flow value of [math]\displaystyle{ (w,v) }[/math].
  2. Changes of [math]\displaystyle{ f }[/math] in [math]\displaystyle{ G }[/math] and changes of [math]\displaystyle{ u_f }[/math] in [math]\displaystyle{ G_f }[/math] are equivalent in a one-to-one correspondence. So, the view on [math]\displaystyle{ G }[/math] and [math]\displaystyle{ f }[/math] is exchangeable with the view on [math]\displaystyle{ G_f }[/math] and [math]\displaystyle{ u_f }[/math]. We will adopt both views in the discussion of the individual algorithms.

Flow-augmenting path

A flow-augmenting path (or augmenting path for short) from some node [math]\displaystyle{ s\in V }[/math] to some node [math]\displaystyle{ t\in V }[/math] is an ordinary path in the residual network [math]\displaystyle{ G_f }[/math]. Equivalently, a flow-augmenting path is a generalized path such that:

  1. [math]\displaystyle{ f(a)\lt u(a) }[/math] if [math]\displaystyle{ a\in A }[/math] is a forward arc;
  2. [math]\displaystyle{ f(a)\gt 0 }[/math] if [math]\displaystyle{ a\in A }[/math] is a backward arc.

Augmenting along a path: Let [math]\displaystyle{ p }[/math] denote some flow-augmenting path, and let [math]\displaystyle{ \varepsilon\gt 0 }[/math] such that

  1. [math]\displaystyle{ f(a)+\varepsilon\leq u(a) }[/math] if [math]\displaystyle{ a\in A }[/math] is a forward arc;
  2. [math]\displaystyle{ f(a)-\varepsilon\geq 0 }[/math] if [math]\displaystyle{ a\in A }[/math] is a backward arc.

Augmentation: For each arc [math]\displaystyle{ a \in A }[/math] on [math]\displaystyle{ p }[/math]:

  1. Increase the flow value by [math]\displaystyle{ \varepsilon }[/math] if [math]\displaystyle{ a }[/math] is a forward arc on [math]\displaystyle{ p }[/math].
  2. Decrease the flow value by [math]\displaystyle{ \min \{x,y \} }[/math] if [math]\displaystyle{ a }[/math] is a backward arc on [math]\displaystyle{ p }[/math].

Obviously, the capacity constraints are preserved. The flow conservation conditions are preserved at every internal node of [math]\displaystyle{ p }[/math]. To see that, let [math]\displaystyle{ v }[/math] be such an internal node, and let [math]\displaystyle{ u }[/math] and [math]\displaystyle{ w }[/math] denote the immediate predecessor and successor of [math]\displaystyle{ v }[/math] on [math]\displaystyle{ p }[/math], respectively. Basically, there are four cases:

  • Either [math]\displaystyle{ (u,v) }[/math] is on [math]\displaystyle{ p }[/math] as a forward arc or [math]\displaystyle{ (v,u) }[/math] is on [math]\displaystyle{ p }[/math] as a backward arc.
  • Either [math]\displaystyle{ (v,w) }[/math] is on [math]\displaystyle{ p }[/math] as a forward arc or [math]\displaystyle{ (w,v) }[/math] is on [math]\displaystyle{ p }[/math] as a backward arc.

It is easy to check preservation of the flow conservation conditions at [math]\displaystyle{ v }[/math] for each of these four cases.

Augmenting up to saturation: Again, let [math]\displaystyle{ p }[/math] denote some flow-augmenting path.

  1. Let [math]\displaystyle{ \varepsilon_1\gt 0 }[/math] denote the minimum of the values [math]\displaystyle{ c(a)-f(a) }[/math] on all forward arcs of [math]\displaystyle{ p }[/math].
  2. Let [math]\displaystyle{ \varepsilon_2\gt 0 }[/math] denote the minimum of the values [math]\displaystyle{ f(a) }[/math] on all backward arcs of [math]\displaystyle{ p }[/math].
  3. Let [math]\displaystyle{ \varepsilon Augmenting the flow \lt math\gt f }[/math] along [math]\displaystyle{ p }[/math] by [math]\displaystyle{ \varepsilon }[/math] yields at least one saturated arc.

Preflow

Preflows generalize ordinary flows as follows: Instead of an equation, the following inequality is to be fulfilled:

[math]\displaystyle{ \sum_{w:(v,w)\in A}f(v,w)\leq\sum_{w:(w,v)\in A}f(w,v) }[/math].

The excess of [math]\displaystyle{ v\in V }[/math] is the difference between the right-hand side and the left-hand side of that inequality.

Pseudoflow

Valid distance labeling

Definition:

  1. Let [math]\displaystyle{ G=(V,A)) }[/math] be a directed graph, and for each arc [math]\displaystyle{ a\in A }[/math] let [math]\displaystyle{ u(a) }[/math] and [math]\displaystyle{ f(a) }[/math] be defined such that [math]\displaystyle{ 0\leq f(a)\leq u(a) }[/math]. An assignment of a value [math]\displaystyle{ d(v) }[/math] to each node [math]\displaystyle{ v\in V }[/math] is a valid distance labeling if the following two conditions ar fulfilled:
    1. It is [math]\displaystyle{ d(t)=0 }[/math].
    2. For each arc [math]\displaystyle{ (v,w)\in A }[/math] in the residual network, it is [math]\displaystyle{ d(v)\leq d(w)+1 }[/math].
  2. If even [math]\displaystyle{ d(v)=d(w)+1 }[/math], [math]\displaystyle{ (v,w) }[/math] is called an admissible arc.

Blocking flow

Definition: Let [math]\displaystyle{ G=(V,A) }[/math] be a directed graph, let [math]\displaystyle{ s,t\in V }[/math], and for each arc [math]\displaystyle{ a\in A }[/math] let [math]\displaystyle{ u(a) }[/math] and [math]\displaystyle{ f(a) }[/math] be real values such that [math]\displaystyle{ 0\leq f(a)\leq u(a) }[/math]. We say that [math]\displaystyle{ f }[/math] is a blocking flow if every flow augmenting [math]\displaystyle{ (s,t) }[/math]-path contains at least one backward arc.

Remarks:

  1. The name refers to an alternative, equivalent definition: Every ordinary [math]\displaystyle{ (s,t) }[/math]-path contains at least one saturated arc, which "blocks" the augmentation.
  2. Obviously, maximum flows are blocking flows, but not vice versa.

Cuts and saturated cuts

  1. Let [math]\displaystyle{ G=(V,A) }[/math] be a directed graph and [math]\displaystyle{ s,t\in V }[/math]. An [math]\displaystyle{ (s,t) }[/math]-cut (or cut for short) is a bipartition [math]\displaystyle{ (S,T) }[/math] of [math]\displaystyle{ V }[/math] such that [math]\displaystyle{ s\in S }[/math] and [math]\displaystyle{ t\in T }[/math].
  2. For [math]\displaystyle{ a\in A }[/math], let [math]\displaystyle{ u(a) }[/math] and [math]\displaystyle{ f(a) }[/math] be real values such that [math]\displaystyle{ 0\leq f(a)\leq u(a) }[/math] ([math]\displaystyle{ f }[/math] need not be a flow here). A cut [math]\displaystyle{ (S,T) }[/math] is saturated if:
    1. [math]\displaystyle{ f(v,w)=u(v,w) }[/math] for every arc [math]\displaystyle{ (v,w)\in A }[/math] such that [math]\displaystyle{ v\in S }[/math] and [math]\displaystyle{ w\in T }[/math].
    2. [math]\displaystyle{ f(v,w)=0 }[/math] for every arc [math]\displaystyle{ (v,w)\in A }[/math] such that [math]\displaystyle{ v\in T }[/math] and [math]\displaystyle{ w\in S }[/math].