Questions tagged [max-flow]

The maximum-flow problem, a problem in computer science over a flow network

The maximum flow (max-flow) problem is a problem in computer science, studied in the theory of s, involving finding the maximum flow over a given flow network. It is closely related to the problem for graphs.

214 questions
2
votes
2 answers

Ford-Fulkerson algorithm on graph with Two-Way Edges

Im having some trouble understanding the Ford-Fulkerson algorithm for fidning maximum flow and was hoping for some help. If we look at the following graph with source A and sink F where the edge capacities are listed on every edge. You will notice…
wazus
  • 103
  • 1
  • 7
2
votes
0 answers

BOOST min-cut/max-flow on undirected graph with source and target

Can I use any algorithms from Boost on an undirected graph which must have a source and target (two nodes which must be in separate cuts). The preflow_relabel says it requires a directed graph. Stoer_wagner_min_cut says it works on undirected…
kreitz
  • 58
  • 6
2
votes
1 answer

Dinic’s algorithm for Maximum Flow with non-integer edge capacities

There is a C++ implementation of Dinic’s algorithm for Maximum Flow Problem that I was trying to use. In that C++ code, it is assumed that all parameters are integer. I tryied to convert the code to an equivalent one in which capacity of edges can…
rasul
  • 1,009
  • 9
  • 14
2
votes
0 answers

Recompute maxflow efficiently

Can anyone please recommend a way to efficiently recompute maxflow in the flow network if one edge of capacity one is deleted? Theoretically, I know the linear time algorithm, but how to do it really fast in python? I use igraph package to compute…
ivan
  • 311
  • 1
  • 4
  • 13
2
votes
1 answer

How to construct Level Graph for Dinic's Algorithm for computing Max Flow?

I was reading about Dinic's Algorithm to solve the Max Flow problem and the algorithm states the following for a graph G given source S and sink T: Set the flow of every edge to 0 Construct the level graph GL from Gf (where Gf is residual…
Arat254
  • 449
  • 2
  • 5
  • 17
2
votes
0 answers

Goldberg-Rao maximum flow algorithm - why some arcs are never admissible?

I'm trying to implement Goldberg-Rao maxflow algorithm described in "Beyond the Flow Decomposition Barrier, 1988". The paper says that we are searching for the flow on admissible arcs. The arc(vw) is admissible if distance(v) > distance(w) +…
tats
  • 21
  • 2
2
votes
2 answers

Calculating maximum flow value with networks for directed graph

I have a directed network with 27000 arcs, each with a weight. With the code: G=nx.Graph(G) nx.maximum_flow(G,'CHN',"CHL") I get the error: NetworkXUnbounded: Infinite capacity path, flow unbounded above. Does anyone know how to get the maximum…
Chi
  • 43
  • 6
2
votes
1 answer

How to find final stored amount in each sink in a flow network?

I have a flow network with single source and multiple sinks. If I flow 1 gallon of water from the source then all water split at nodes and finally store in different sinks. Here each edge weight c(u,v) represents the water splitting ratio from u.…
enggiqbal
  • 39
  • 4
2
votes
1 answer

Algorithmic Complexity for Max Flow Algorithm

I'm studying computer science/operations research, and right now I am interested in the maximum flow problem. I wrote an algorithm that solves the problem, but am having trouble figuring out the computational complexity. Python-esque pseudo-code…
Austin
  • 31
  • 2
2
votes
0 answers

Is there a procedural way to find minimum s-t cut without guessing cuts?

I was reading about max flow theorem and there I saw scenario where the min s-t cut is found. But wherever I searched they did it after knowing the max flow (like here) or by guessing the cuts by iterating almost all (like here). Is there a logical…
learner
  • 21
  • 2
2
votes
1 answer

how to use Dinic's algorithm to find min-cut edges in undireted graph?

I am looking for an algorithm, when a given two nodes 's' and 't' in a undiredted graph, to find min-cut edges, which partitions the graph into two A and B, 's' will in A and 't' will in B. I see most people suggesting for Ford–Fulkerson algorithm…
arslan
  • 2,034
  • 7
  • 34
  • 61
2
votes
0 answers

Optimal sequence to join N pieces of different sizes, provided the cost of joining two pieces of sizes x and y is abs(x-y)

There are N pieces each having size Ai. The cost of joining a piece of size x and a piece of size y is abs(x-y). What is the most optimal way to join all the pieces ? Can it be solved using the max-flow algorithm ?
Tushar Poddar
  • 169
  • 1
  • 8
2
votes
0 answers

Maximum flow with time criteria

I have a Flow network. Each edge has capacity = 1. I have to transport all the stuff from the S to the T in the minimum time. Is there any way to reduce classical Maximum flow problem to time criteria version?
David
  • 674
  • 6
  • 19
2
votes
0 answers

Adapting a Ford-Fulkerson solver to include minimum weights

I have implemented a solution using Ford-Fulkerson to solve an allocation problem Say a system where there are multiple people wanting to take part in multiple activities. Each person has a list of activities they want to do but can only be assigned…
Hector
  • 1,170
  • 2
  • 10
  • 27
2
votes
1 answer

Unique max-flow algorithm

How can I check that a graph network contains an unique maximal flow? Are there any polynomial-time algorithms which can do that? Thanks! Description: Find all cuts between source and sink. For every cut, if there are two edges with minimum…