Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Time complexity of the Ford-Fulkerson method in a flow network with unit capacity edges

Will the Ford-Fulkerson algorithm find a maximum flow of a unit-capacity flow network (all edges have unit capacity) with n vertices and m edges in O(mn) time?

like image 492
Jay Patel Avatar asked Nov 06 '15 11:11

Jay Patel


People also ask

What is the order of running time for Ford-Fulkerson?

Running time of Ford-Fulkerson Each iteration of Ford-Fulkerson takes O(E) time to find an augmenting path (Gf has at least E and at most 2E edges, so the time is O(V+2E) = O(E+E) = O(E)). Each iteration also increases the flow by at least 1, assuming all capacities are integers.

What is flow network find the maximum flow through the given network using Ford-Fulkerson algorithm?

Ford-Fulkerson algorithm is a greedy approach for calculating the maximum possible flow in a network or a graph. A term, flow network, is used to describe a network of vertices and edges with a source (S) and a sink (T). Each vertex, except S and T, can receive and send an equal amount of stuff through it.

Is Ford-Fulkerson polynomial time?

For instance, the basic Ford- Fulkerson algorithm is not a polynomial-time algorithm for network flow when edge capacities are written in binary, but both of the Edmonds-Karp algorithms are polynomial-time.


1 Answers

O(M*f) is a known running time estimation for Ford-Fulkerson on graphs with integer capacities, where M is the number of edges and f the value of maximal flow, just because it is easy to find augmenting paths in O(M) each, and each such path increases the flow by at least 1.

If your graph has no duplicate edges (that is, there is no pair of edges that has the same start and end vertices), and each edge has unit capacity, then the the maximal flow f is no more than the number of vertices N (just because there is no more than N-1 edges going from the source), and therefore the complexity is indeed O(N*M).

However, if your graph is allowed to have duplicate edges (but still each edge has capacity of 1), then f can be bigger than N, and up to M, and the time complexity can become O(M*M), and it is not difficult to come with an example where such complexity takes place.

like image 57
Petr Avatar answered Sep 29 '22 23:09

Petr