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
0
votes
2 answers

What does the level graph in Dinic's algorithm represent?

I understand what a residual graph is. But what does a level graph mean? http://en.wikipedia.org/wiki/Dinic%27s_algorithm
0
votes
2 answers

Maximum uniqueness in pairs of numbers with a slight constraint

Here's an algorithmic challenge for you, I have a list of [0..100] pairs of numbers and I need to find the maximum number of unique "left number" while making sure there is no more than 3 of the "right number". Here's an example (1, 1) (2, 1) (3,…
ZogStriP
  • 567
  • 1
  • 9
  • 25
0
votes
1 answer

computer vision: segmentation setup. Graph cut potentials

I have been trying to teach myself some simple computer vision algorithms and am trying to solve a problem where I have some noise corrupted image and all I am trying to do is separate the black background from the foreground which has some signal.…
Luca
  • 10,458
  • 24
  • 107
  • 234
0
votes
1 answer

How to create a graph and call the algorithm with this code

I've been trying to understand this code; it's an implementation of the push-relabel algorithm in C++: // Adjacency list implementation of FIFO push relabel maximum flow // with the gap relabeling heuristic. This implementation is // significantly…
Chiffa
  • 1,486
  • 2
  • 19
  • 38
0
votes
1 answer

All pair maximum flow in Matlab

Is there a way to find the maximum flow between each pair of vertices in matlab? c = sparse([1 1 2 2 3 4 4 5 5 6 7 8 9 9],[2 3 3 4 5 6 7 6 7 8 9 10 8 10],[15 10 3 8 9 7 5 6 2 12 10 6 10 8],10,10) a = [2 3 4 5 6 7 8 9 10] b =…
userABC123
  • 1,460
  • 2
  • 18
  • 31
0
votes
1 answer

Null Pointer Exception in Ford-Fulkerson Algorithm for obtaining Max Flow

I have written a code for obtaining the max flow from a graph which is hardcoded into main. I followed the directions but I keep getting this error and I'm not sure why. I've tried changing many parts and debugging but I can't figure it out. This is…
Mubs123
  • 35
  • 1
  • 5
0
votes
1 answer

Find a network flow solution which maximises the flow from a specific source to a specific sink

My problem is the following and has its roots in the modeling of a gas network. We model a gas network as a graph (E,V) with the sources being the major gas producers and the sinks being the gas consuming countries, both belonging to the V vertices…
Scherrer Vincent
  • 244
  • 1
  • 3
  • 9
0
votes
2 answers

Duality of max-flow and min-cut: when infinite capacity exists

I am wondering if the celebrated duality between max-flow and min-cut actually tolerates infinite valued capacities. Here is a simple example where it seems not: source s, sink t, five other nodes a, b, c, d, e s -> a: capacity 3 s -> b: 3 a -> c:…
Janathan
  • 63
  • 5
0
votes
0 answers

python igraph all_st_mincuts returning 0 cuts

I'm using python igraph's all_st_mincuts function to cut a non-planar, bidirectional graph with ~3000 vertices and ~9000 edges. Depending on what capacities I assign to the edges, sometimes all_st_mincuts returns 0 cuts! It doesn't seem possible to…
rafaelcosman
  • 2,569
  • 7
  • 23
  • 39
0
votes
1 answer

Maximum flow in undirected graph with non-integer weights

If I would want to find maximum flow in undirected graph, how could I do this? On Wikipedia page http://en.wikipedia.org/wiki/Maximum_flow_problem it says that algorithms require directed graphs (I would just convert each edge to a pair of edges)…
Andna
  • 6,539
  • 13
  • 71
  • 120
0
votes
2 answers

Ford-Fulkerson appears to not work on this graph

My analysis of the Ford-Fulkerson algorithm is not coming out correctly. For example, take the following graph: _____>4___>_ | | 0--->1---->3------6 | | | 2--->5--------->--- Node 0 is source, node 6 is the…
Yijie Li
  • 71
  • 3
0
votes
1 answer

Algorithm to assign library books to members such that maximum members are satisfied

I was given a problem in a class test. In a library, each member requested for four books and each book was requested by only two members. This information is given in the form of bipartite graph G = ( X + Y , E ) X : Set of all members Y : Set of…
Shashwat Kumar
  • 5,159
  • 2
  • 30
  • 66
0
votes
1 answer

calculating excess flow and overflowing in max flow algorithm

I am reading push flow algorithms at following link. http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=maxflowPushRelabel It is mentioned that Excess Flow - We define the excess flow e as e(u) = f(V,u), the net flow into u. A vertex u ∊…
venkysmarty
  • 11,099
  • 25
  • 101
  • 184
-1
votes
1 answer

Not sure about algorithm in graph

I have this question : Given directed and connectivity graph G=(V,E) with positive weights define E(t) to be the group of edges whose weight is at most t. Find an algorithm that calculates the minimal t that for him G(t) = (V,E(t)) is…
Daniel16
  • 113
  • 8
-1
votes
1 answer

Error in MAXFLOW-MINCUT code

I have written a Max-Flow class using the edmonds-karp implementation. The code seems to work correctly when I try to get the value of the max flow. I submitted the code on SPOJ TotalFlow so I believe the implementation is correct. But I am trying…
epsilon_0
  • 11
  • 4
1 2 3
14
15