Вопрос

I know that the running time of ford fulkerson in general is O(f*(n+m)) where f* is the maximum flow of the network and the n , m are the number of vertices and edges in the network , however what if all edge capacities are bounded by a constant C, how will this affect the running time ?

or will it affect the running time ?

Это было полезно?

Решение

Assuming a simple graph, the given constraint basically means that no more than c*(n-1) leave the source. This means f* <= c*(n-1), and since c is constant, we can conclude that the running time with no modifications will now be O(n^2+nm).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top