Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

All pair Maximum Flow

Given a directed weighted graph, how to find the Maximum Flow ( or Minimum Edge Cut ) between all pairs of vertices.
The naive approach is simply to call a Max Flow algorithm like Dinic's, whose complexity is O((V^2)*E), for each pair.
Hence for all pairs it is O((V^4)*E).

Is it possible to reduce the complexity to O((V^3)*E) or to O(V^3) by some optimizations?

like image 277
sabari Avatar asked Dec 21 '12 12:12

sabari


2 Answers

Gomory-Hu Tree does not work with directed graphs, putting that aside, Gomory-Hu Tree will form a Graph maximum flow by applying minimum cuts.

The time complexity is:

O(|V|-1 * T(minimum-cut)) = O(|V|-1 * O(2|V|-2)) ~ O(|V|^2)

* using an optimal minimum-cut algorithm (Max-Flow Min-Cut Reduction)

This example illustrate how Gomory-Hu Tree is constructed from a given Graph

like image 92
Khaled.K Avatar answered Oct 22 '22 13:10

Khaled.K


Gomory-Hu tree does not work for directed weighted graph.

It is an open problem whether there exist an algorithm to solve all pair maximum flow faster than running n^2 maximum flows on directed graphs.

like image 24
Chao Xu Avatar answered Oct 22 '22 14:10

Chao Xu