In this problem we'll analyze a different augmenting path-based algorithm for the maximum flow problem. Consider a flow network with integral edge capacities. Suppose we modify the Edmonds-Karp algorithm (Lecture #2) so that, instead of choosing a shortest augmenting path in the residual network G_(f), it chooses an augmenting path on which it can push the most flow. (That is, it maximizes the minimum residual capacity of an edge in the path.) For example, in the network in Figure 1, this algorithm would push 3 units of flow on the path s rarr v rarr w rarr t in the first iteration. (And 2 units on s rarr w rarr v rarr t in the second iteration.) Figure 1: Problem
(a) Prove that the running time of the algorithm, suitably implemented, is O(mn). (As always, m denotes [E| and n denotes [V|.) [Hint: How many times can Retreat be called? How many times can Augment be called? How many times can Advance be called before a call to Retreat or Augment?] Recall that a forward edge in BFS goes from layer i to layer (i + 1), for some i.
2
(b) Prove that the algorithm terminates with a blocking flow g in Ly. [For example, you could argue by contradiction.] (c) Suppose that every edge of Ly has capacity 1 (ef., Exercise #4). Prove that the algorithm above computes a blocking flow in linear (i.e., O(m)) time. [Hint: can an edge (, w) be chosen in two different calls to Advance?]
Problem 3 In this problem well analyze a different augmenting path-based algorithm for the maximum flow problem. Consider a flow network with integral edge capacities. Suppose we modify the Edmonds-Karp algorithm (Lecture #2) so that, instead of choosing a shortest augmenting path in the residual network Gy, it chooses an augmenting path on which it can push the most flow. (That is, it maximizes the minimum residual capacity of an edge in the path.) For example, in the network in Figure 1, this algorithm would push 3 units of flow on the path s t in the first iteration. (And 2 units on s t in the second iteration.)
3 (3)
5 (3)
)
Figure 1: Problem 3. Edges are labeled with their capacities, with flow amounts in parentheses
(a) Show how to modify Dijkstra's shortest-path algorithm, without affecting its asymptotic running time, so that it computes an s-t path with the maximum-possible minimum residual edge capacity. (b) Suppose the current flow f has value F and the maximum flow value in G is F*. Prove that there is an augmenting path in G such that every edge has residual capacity at least (F* F)/m, where mE. [Hint: if is the maximum amount of flow that can be pushed on any s-f path of Gy, consider the set of vertices reachable from s along edges in Gy with residual capacity more than . Relate the residual capacity of this (s, t)-cut to F* F.]
(c) Prove that this variant of the Edmonds-Karp algorithm terminates within O(m log F*) iterations, where F* is definod as in the previous problem. Hint: you might find the inequality 1 z e for z [0,1] useful.] (d) Assume that all edge capacities are integers in {1, 2,. . . , U). Give an upper bound on the running time of your algorithm as a function of n = |V|, m, and U. Is this bound polynomial in the input size?
Problem 4 In this problem we'll revisit the spocial case of unit-copocity networks, where every edge has capacity 1 (see also Exercise 4).
(a) Recall the notation d(f) for the length (in hops) of a shortest s-f path in the residual network Gy. Suppose G is a unit-capacity network and f is a flow with value F. Prove that the maximum flow
[Hint: use the layered graph Ly discussed in Problem 2 to identify an s-f cut of the residual graph that has small residual capacity. Then argue along the lines of Problem 3(b).] (b) Explain how to compute a maximum flow in a unit-capacity network in O(m3/2) time.