Dinic: Difference between revisions
No edit summary |
|||
Line 28: | Line 28: | ||
'''Abstract view:''' | '''Abstract view:''' | ||
# Construct the [[Basic graph definitions|subgraph]] <math>G'=(V,A')</math> of the residual network that contains an arc if, and only if, the arc is on at least one <math>(s,t)</math>-path with smallest number of arcs. | # Construct the [[Basic graph definitions|subgraph]] <math>G'=(V,A')</math> of the residual network that contains an arc if, and only if, the arc is on at least one <math>(s,t)</math>-path with smallest number of arcs. | ||
# | # Use one of the algorithms for das [[Blocking flow|blocking low]] problem to construct a blocking flow <math>f'</math> in <math>G'</math> with respect to the residual capacities for <math>f</math>. | ||
# For all arcs <math>a\in A</math>, add <math>f'</math> to <math>f</math>. | # For all arcs <math>a\in A</math>, add <math>f'</math> to <math>f</math>. | ||
'''Proof:''' Obvious. | '''Proof:''' Obvious. | ||
== Correctness == | |||
Feasibility of <math>f</math> follows immediately from the invariant. If the algorithm terminates, the break condition immediately proves maximality along with the [[Max-flow min-cut|max-flow min-cut theorem]]. Termination follows immediately from following considerations. | |||
== Complexity == | |||
'''Statement:''' | |||
The asymptotic complexity is in <math>\mathcal{O}(n\cdot T(n))</math>, where <math>T(n)</math> is the asymptotic complexity of the locking-flow algorithm. | |||
'''Proof:''' | |||
Evidenty, the smallest number of arcs on a flow-augmenting <mah>(s,t)<math>-path cannot exceed <math>n-1</math>. Therefore, the variant implies that the algorithm terminates after <math>n-1</math> iterations. Tje complexity of a single iteration is dominated by he computation of a blocking flow. |
Revision as of 13:57, 13 October 2014
General Information
Algorithmic problem: Max-Flow Problems
Type of algorithm : loop.
Break condition: There is no flow-augmenting [math]\displaystyle{ (s,t) }[/math]-path anymore.
Abstract View
Invariant: After [math]\displaystyle{ i \ge 0 }[/math] iterations: The flow [math]\displaystyle{ f }[/math] is feasible. If all upper bounds are integral, the [math]\displaystyle{ f }[/math]-values are integral as well.
Variant: The smallest number of arcs on a flow-augmenting [math]\displaystyle{ (s,t) }[/math]-path strictly increases.
Induction basis
Abstract view: Initialize [math]\displaystyle{ f }[/math] as an arbitrary feasible flow, for example, the zero flow.
Proof: Nothing to show.
Induction step
Abstract view:
- Construct the subgraph [math]\displaystyle{ G'=(V,A') }[/math] of the residual network that contains an arc if, and only if, the arc is on at least one [math]\displaystyle{ (s,t) }[/math]-path with smallest number of arcs.
- Use one of the algorithms for das blocking low problem to construct a blocking flow [math]\displaystyle{ f' }[/math] in [math]\displaystyle{ G' }[/math] with respect to the residual capacities for [math]\displaystyle{ f }[/math].
- For all arcs [math]\displaystyle{ a\in A }[/math], add [math]\displaystyle{ f' }[/math] to [math]\displaystyle{ f }[/math].
Proof: Obvious.
Correctness
Feasibility of [math]\displaystyle{ f }[/math] follows immediately from the invariant. If the algorithm terminates, the break condition immediately proves maximality along with the max-flow min-cut theorem. Termination follows immediately from following considerations.
Complexity
Statement: The asymptotic complexity is in [math]\displaystyle{ \mathcal{O}(n\cdot T(n)) }[/math], where [math]\displaystyle{ T(n) }[/math] is the asymptotic complexity of the locking-flow algorithm.
Proof: Evidenty, the smallest number of arcs on a flow-augmenting <mah>(s,t)[math]\displaystyle{ -path cannot exceed \lt math\gt n-1 }[/math]. Therefore, the variant implies that the algorithm terminates after [math]\displaystyle{ n-1 }[/math] iterations. Tje complexity of a single iteration is dominated by he computation of a blocking flow.