FIFO preflow-push

From Algowiki
Revision as of 13:05, 10 November 2014 by Weihe (talk | contribs) (→‎Complexity)
Jump to navigation Jump to search

Abstract view

This is a specialization of the generic preflow-push algorithm:

  1. The set of all active nodes is stored in a FIFO queue [math]\displaystyle{ Q }[/math].
  2. Always choose the first node in [math]\displaystyle{ Q }[/math] (recall from the generic preflow-push that this node is not extracted from [math]\displaystyle{ Q }[/math] as long as it is active).

Complexity

Statement: The asymptotic complexity is in [math]\displaystyle{ \mathcal{O}(n^3) }[/math], where [math]\displaystyle{ n=|V| }[/math].

Proof: The complexity considerations for the generic preflow-push algorithm yield [math]\displaystyle{ \mathcal{O}(n^2) }[/math] relabel operations and [math]\displaystyle{ \mathcal{O}(n\!\cdot\!m)\subseteq\mathcal{O}(n^3) }[/math] saturating push operations, where [math]\displaystyle{ m=|A| }[/math]. There it was also shown that the total number of changes of outgoing arcs is in [math]\displaystyle{ \mathcal{O}(n^3) }[/math]. Hence, it remains to show that the total number of non-saturating push operations is in [math]\displaystyle{ \mathcal{O}(n^3) }[/math].

Conceptually, we may partition the iterations of the main loop into phases. The first phase commences with the very first iteration. A new phase commences as soon as all nodes that were in [math]\displaystyle{ Q }[/math] at the beginning of the last phase, have been extracted once from [math]\displaystyle{ Q }[/math]. Before and after each iteration, let [math]\displaystyle{ D }[/math] denote the maximum label [math]\displaystyle{ d(v) }[/math] of any active node [math]\displaystyle{ v\in V\setminus\{s,t\} }[/math]. In particular, it is always [math]\displaystyle{ 0\leq D\leq 2n }[/math]. Clearly, only relabel operations can increase [math]\displaystyle{ \Delta }[/math], and the sum of all increases of [math]\displaystyle{ \Delta }[/math], taken over all relabel operations, cannot increase [math]\displaystyle{ \Delta }[/math] by more than [math]\displaystyle{ 2n }[/math] in total.

This observation immediately implies that the number of phases in which at least one relabeling operation takes place, is in [math]\displaystyle{ \mathcal{O}(n^2) }[/math]. On the other hand, [math]\displaystyle{ D }[/math] is decreased in every iteration without relabel operation, because in this case, all excess is pushed from each active node to a node with smaller [math]\displaystyle{ d }[/math]-label. Due to the bound [math]\displaystyle{ \mathcal{O}(n) }[/math] on all increases of [math]\displaystyle{ \Delta }[/math], the number of decreases of [math]\displaystyle{ \Delta }[/math] and, hence, the number of phases without relabel operations is in [math]\displaystyle{ \mathcal{O}(n^2) }[/math] as well. The claim now follows from the observation that, in each phase, at most one non-saturating push is performed with each node because a non-saturating push makes a node inactive.