by Maarten Behn
Group 5
Exercise 5.1 (Ford-Fulkerson with thickest paths) (5 Points)
Let be an integer s-t-network and be a feasible flow in .
A thickest s-t-path in is an s-t-path with a maximal bottleneck capacity.(a) Prove that the number of augmentations needed by the variant of the Ford-Fulkerson algorithm that always augments along a thickest s-t-path in for a network with vertices, edges, and integer capacities in is in .
Hint: use Exercise 4.3 and the fact that for all .(b) Describe an efficient algorithm to find a thickest s-t-path in , and analyze its running time.
Hint: recall Dijkstra’s algorithm.
a)
Let be a maximum Flow in .
From a) we can say that a flow can be decomposed into the sum flows.
The Ford-Fulkerson algorithm chooses always the “thickest” s-t-path.
Let be the flow of of the s-t-path from the th iteration.
We know therefore
Thus gets per iteration reduced by at least .
The algorithm stops when .
can be at most
b)
The original Dijkstra’s algorithm written in pseudo code:
Input: G = (V, E), w(u, v) ≥ 0, s
Inital:
∀ v ∈ V: dist(v) := ∞
dist(s) := 0
pred(v) := undefiniert
Q := min-priority queue storing (v, dist(v))
Algorithm:
while Q ≠ ∅ do
u := Get-Min(Q)
for each (u, v) ∈ E do
if dist(v) > (dist(u) + w(u, v)) then
dist(v) := dist(u) + w(u, v)
pred(v) := u
Set(Q, v, dist(v))
Output:
dist(v): length of path
pred(v): linked list of reverse path
We can modify the algorithm
by using the maximum bottelneck capacity as the value instead of the length.
Also we will use a max-priority queue insetad of an min-priority queue to find the path with the maximum bottleneck capacity.
Input: N_f = (V, E, c, s, t)
Inital:
∀ v ∈ V: bottleneck(v) := 0
bottleneck(s) := ∞
pred(v) := undefiniert
Q := max-priority queue storing (v, bottleneck(v))
Algorithm:
while Q ≠ ∅ do
u := Get-Max(Q)
for each (u, v) ∈ E do
cap := c(u, v)
new_b := min(bottleneck(u), cap)
if new_b > bottleneck(v) then
bottleneck(v) := new_b
pred(v) := u
Set(Q, v, bottleneck(v))
Output:
bottleneck(t): bottleneck capacity of the s-t-path
pred(v): linked list of reverse s-t-path
Using a binary heap as priority queue,
Dijkstra’s algorithm has a runtime of .
The modifications don’t change anything that effects the runtime,
therfore the modified algorithm has the same runtime.
Exercise 5.2 (Blocking vs Maximum) (5 Points)
Let be an s-t-network.
Prove or disprove the following statements.
(a) Every maximum flow in is also a blocking flow in .
(b) Every blocking flow in is also a maximum flow in .
a)
A blocking flow is a flow that saturates at least one edge on every s-t-path.
So every residual Graph where there is no path from s to t, is considered blocking.
A maximum Flow is a flow that has no augmenting s-t-path to increase the flow.
So in the residual Graph there is no path from s to t.
Therefore every maximum Flow is a blocking flow.
b)
No, here is an example:
Transclude of AA-UE-05.2.excalidraw
This flow is blocking, because all three s-t-paths
, and have an saturated edge.
But it is not maximum.
A maximum flow in this Graph has a value of two.
and
Exercise 5.3 (Number of Iterations of Dinitz Algorithm) (5 Points)
For every natural number , describe an s-t-network on which Dinitz algorithm needs at least iterations, i.e., computes at least successive blocking flows.
Explain why at least iterations are needed
Construct the graph like this:
Transclude of AA-UE-05.3.excalidraw
All edes have a capacity of one.
The maximum flow of these graph setup is .
Because there are disjunkt paths from to :
Note the Graph has for every rows but only collums of vertecies.
In this Graph setup it is possible to always choose a blocking flow that only adds one to the flow sum.
Therfore it takes iterations to compute the maximum flow of .
The blocking flow is choosen after this pattern:
-
Choose the first outgoing edge from . (top to bottom)
where -
Choose the edges in a stair pattern down (starting with a vertical edge)
-
Choose every edge straight up till it is possible go right.
where -
Choose all horizontal edges till hitting
The s-v edge and the stair case pattern block all other s-t-paths.
Its always possible to find a path fom to because the previous stair case pattern produce vertical paths up to a where it is possible to go horizontaly over to .