3

I have the following two questions.

  1. True or false: We can always find a sequence of flow augmenting s-t paths in the Ford-Fulkerson algorithm such that we reach the maximum flow in a polynomial number of iterations.
  2. True or false: We can always find a sequence of flow augmenting s-t paths in the Ford-Fulkerson algorithm such that we reach the maximum flow only after an exponential number of iterations.
Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
arkham knight
  • 373
  • 7
  • 18

2 Answers2

1

The first answer is definitely false. Because the running time of the Ford-Fulkerson algorithm is not polynomial - it's exponential.

Hence in order to find all s-t paths to reach the maximum flow will take exponential time.

The running time of the Ford-Fulkerson algorithm is O(nV), more precisely O((n+m)V), where n is the number of nodes, m is the number of edges in the graph. And V is the maximum capacity the graph is having.

Hence, it might look like a polynomial time algorithm. However, if V is large and let us assume that this large number can be expressed as 2^k, then the running time becomes O(n. 2^k) - which is exponential.

The second answer is not true in some cases as well, but mostly true if you are considering integer/rational numbers for the capacity values in the graph. We know that the algorithm takes exponential time - there is no problem with that. However, if the capacity values of the graph are irrational, then the Ford-Fulkerson algorithm does not guarantee to terminate. Hence the second statement is somewhat false as well. However, it is true for most of the cases as in most cases, the capacities are either integer or rational values.

Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
0

The first claim is True. The second claim is False.

G_f denotes G residual network, c_f is the capacity in G_f. This is the Ford fulkerson method, as I know it:

1) Define: f(u,v) = 0, for all (u,v) in E.

2) while there exits a path p from s to t, in G_f:

    3)     c_f(p) = min{c_f(e) : for all e in p}

    4)     for (u,v) in p:

        5)         if (u,v) in E:

            6)             f(u,v) += c_f(p)

        7)         else:

            8)             f(u,v) -= c_f(p)

By the end of the process, f is a maximum flow. (You can read the proof in "Introduction to Algorithm", By CLRS)

The running time of that algorithm is O(X(V+E)), X being the number of times the while loop iterates.

Now - we can find p, on line (2) using a BFS search. Such method, ensures that we iterate the while loop O(VE) times. This implementation is also known as Edmonds-Karp algorithm. Overall running time is, thus: O(VE*(E+V)).

This should answer your first question - We can always find the maximum flow by augmenting paths s-t in polynomial time.

About your second question: Consider a graph G, where all capacities are of value 1. Clearly, the maximum flow value is less than |E|.

Since each iteration of the while loop increment the current value of flow f by a positive integer (by one actually. If you need a prove, go to the CLRS), we have that the while loop iterates at most |E| times. We thus have a running time of O(E*(E+V), regardless of how we choose the augmenting paths. This graph contradict the second claim.

NG_
  • 255
  • 3
  • 9