Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase flow by changing only one edge after Ford-Fulkerson

Suppose that I've run the Ford-Fulkerson algorithm on a graph G = (V,E) and the result is a max-flow fmax, which is associated to a min-cut Xmin. I'm interested in increasing the flow as much as possible by increasing the capacity of any one edge in the graph. How can I identify this edge?

One strategy might be: given the the initial vertex s and the final vertex t, consider all the paths from s to t and verify the edge with lower capacity. For example, if I have an edge with 1/1, this is the vertex that I have to increase the capacity.

Is there a general algorithm for solving this problem?

like image 916
Richard Gasol Avatar asked May 29 '13 01:05

Richard Gasol


People also ask

Is minimum cut same for the graph after increasing edge capacity by 1 for all edges?

When all the edges have the same capacity, increasing the capacity of every edge by 1 will not change the minimum cut. The basic idea behind the proof is that the capacity of a cut is nc where n is the number of edges cut, and c is the capacity of each edge.

How do you find the maximum flow in a graph after decrementing an edge capacity?

You can do this by essentially finding a path from source to sink along your flow that goes through the decremented edge (this is not hard to do, just start from the decremented edge and "follow" the flow). Then, subtract 1 from your flow for each edge in that path.

What is the drawback of Ford-Fulkerson method for maximum network flow problem?

The complexity of Ford-Fulkerson algorithm cannot be accurately computed as it all depends on the path from source to sink. For example, considering the network shown below, if each time, the path chosen are S − A − B − T and S − B − A − T alternatively, then it can take a very long time.

How do you increase your maximum flow?

In some cases, you would need to increase the capacity of all edges of the graph in order to increase the max-flow. A way to test that is to compute the min-cut, then try and increase the capacity on one or several edges of this min-cut, and recompute the flow to compare to its previous value.


1 Answers

Once you have found the maximum flow in the graph, increasing the capacity of an edge (u, v) will only increase the maximum flow if there is a positive-capacity path from s to u and from v to t in the residual graph. If this isn't the case, then there won't be an augmenting path in the residual graph after making the increase, and therefore the maximum flow will remain maximum.

Of the edges (u, v) that have this property, the maximum amount of extra flow that you can push from s to t after increasing the capacity of (u, v) will be bounded. If you can push any flow across this edge, you'll have to do so by finding a path from s to u and a path from v to t. When doing so, there will always be a bottleneck edge in each of the two paths, and the flow can't increase by more than this. Accordingly, one option for solving the problem is to do the following:

  • Find the maximum-bottleneck path from s to each other node reachable from s in the residual graph.
  • Find the maximum-bottleneck path from each node that can reach t to t in the residual graph.
  • For each edge (u, v) crossing the path, the maximum amount of extra flow that can be pushed across the edge is given by the minimum of the max-bottleneck path from s to u and the max-bottleneck path from v to t.

In other words, if you can compute maximum-bottleneck paths in the graph, you can find the edge that should be increased in time O(B(m, n) + m), where B(m, n) is the cost of computing maximum-bottleneck paths in the graph.

Fortunately, this is a well-studied problem and can be solved using a variant of Dijkstra's algorithm where instead of storing minimum-cost paths to each node, you store maximum-bottleneck paths to each node. A quick Google search should turn up some additional information on this. Using a Fibonacci heap, you can implement this search in time O(m + n log n), and therefore the overall runtime for identifying the edge whose capacity should be increased should be O(m + n log n) as well.

Hope this helps!

like image 191
templatetypedef Avatar answered Sep 29 '22 21:09

templatetypedef