More Common Definitions
The Residual Capacity is more commonly defined as:
- or
Also here we require that the flow network is bidirectional, which is not a common requirement.
Flow Network
- A network is a directed graph with a non-negative capacity function
- A flow network is a network with a source vertex and a sink vertex , and it is denoted by .
- A flow in a flow network is a function that satisfies the following properties:
- Capacity constraint: .
- Bidirectional Network: .
- (If , but , then we add the edge with capacity )
- Flow conservation: , where:
- .
- Opposite Flow Offset: For each edge , At most one of and is positive.
- (If , then we adjust a new flow as follows: , )
- The value of a flow is (Usually, )
Residual Network
-
The residual network (of a flow network with a flow ) is defined as , where, is the residual capacity function defined as .
-
An augmenting path is a path in such that . - The bottleneck of an augmenting path is the minimum residual capacity of the edges in the path: .
Cut
- A cut in a flow network is a set such that and .
- The set is the set of edges from to .
- The set is the set of edges from to .
- is the capacity of the cut.
- A minimum cut is a cut such that is minimized.
- , for any cut and flow .
- , for any cut and flow .
- If , then is a maximum flow and is a minimum cut.
- (Max-Flow Min-Cut Theorem) For any flow , the following are equivalent:
- is a maximum flow
- There is no augmenting path in the residual network of
- There is a cut such that
- When the Ford-Fulkerson algorithm terminates, the current flow is the maximum flow.
- If and are minimum cuts, then both and are minimum cuts.
Maximal Flow Problem
- Input: A flow network .
- Output: A flow of maximum value.
Ford-Fulkerson Algorithm
Augmenting Paths
Augment(f,P):
b = bottleneck(P)
for all e in P:
if e is forward in P:
f(e) += b
else:
f(e) -= b
Naive Implementation
Ford_Fulkerson(G=(V,E), c, s, t):
for all e ∈ E # Initialize flow on all edges to 0
f(e) ← 0
while there exists an augmenting path P do
augment(f, P) # Augment the flow along the path P
return f
- (Theorem) At every intermediate stage of the Ford-Fulkerson algorithm, the flow values are integers.
- (Theorem) The Ford-Fulkerson algorithm terminates in at most iterations, where .
Scaling Ford-Fulkerson Algorithm
Scaling_Max_Flow(G=(V,E), c, s, t):
C ← max{c(e) : e ∈ E} # The maximum capacity in the network
for all e ∈ E # Initialize flow on all edges to 0
f(e) ← 0
# Iterate over powers of 2
for i=floor(log C) downto i=0, do: # O(log C) iterations
# Set the current width threshold
Δ ← 2^i
while there exists an augmenting path P with width ≥ Δ do # O(E)
# Augment the flow along the path P
Augment(f, P, Δf(P)) # O(E)
# Return the computed max flow
return f
Edmonds-Karp Algorithm
- stronger polynomial time complexity
- Uses BFS to find the shortest augmenting path
Edmonds_Karp(G=(V,E), c, s, t):
while there exists an augmenting path do
P ← BFS(G_f, s, t) # Find the shortest augment path
Augment(f, P) # Augment the flow along the path P
return f
Edge-disjoint paths
- Edge-disjoint paths are paths that do not share any edges.
- Internally node-disjoint paths are paths that do not share any internal nodes.
- An integral flow is a flow where all flow values are integers.
- An unit capacity flow network is a flow network where all edge capacities are 1.
Observation: If capacities are integers, the Ford-Fulkerson algorithm computes an integral flow, ensuring the existence of a maximum integral flow.
-
(Flow Decomposition Theorem) For a unit capacity flow network with a maximum integral flow of value , the saturated edges form a union of edge-disjoint paths and some cycles.
- (This is based on the principle that in a directed graph where in-degree equals out-degree for all nodes, there exists a collection of cycles covering all edges.)
- The maximum number of edge-disjoint paths from the source to the sink equals the value of the maximum flow.
-
There exists an algorithm with time complexity for the following problems:
- Decomposing a directed graph into edge-disjoint cycles.
- Decomposing an integral flow into edge-disjoint paths.
- Finding the maximum number of edge-disjoint paths.
-
A seperating set (of edges) of is a set such that the removal of disconnects from .
-
A seperating set (or vertex separator) of is a set such that the removal of disconnects from .
-
In flow networks with unit capacities, the following quantities are equal:
- The minimum size of a seperating set of and .
- The minimum size of edges in a cut.
- The maximum flow value.
- The maximum number of edge-disjoint paths.
Menger’s Theorem
Menger’s theorem has four main formulations:
-
Directed Graph, Edge Version:
In a directed graph, the maximum number of edge-disjoint paths from to equals the minimum size of an edge set that separates from . -
Undirected Graph, Edge Version:
In an undirected graph, the maximum number of edge-disjoint paths from to equals the minimum size of an edge set that separates from . -
Directed Graph, Vertex Version:
In a directed graph without a direct edge from to , the maximum number of internally vertex-disjoint paths from to equals the minimum size of a vertex set (excluding and ) that separates from . -
Undirected Graph, Vertex Version:
In an undirected graph without a direct edge from to , the maximum number of internally vertex-disjoint paths from to equals the minimum size of a vertex set (excluding and ) that separates from .
Mathematical Notation
- : Maximum number of paths from to in , where no two paths share an edge or vertex in .
- : Minimum size of a set such that removing disconnects all paths from to .
Simplified Formulation
For vertices in a graph :
- : Involving edge-disjoint paths and edge separators.
- If there is no edge : : Involving internally vertex-disjoint paths and vertex separators.
Notes
- The symbol is used here instead of to avoid confusion with the letter .
- When is the focus, or may be used for brevity, assuming are clear from context.