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
1 answer

Finding the maximum number of vertex disjoint from source to destination

I am aware that the problem has been discussed here more than once. However, I need to find the maximum number K of vertex-disjoint paths in a directed graph with a running time of |V| x |E|. I know the algorithm of transforming each vertex into…
Joanna
  • 1
  • 3
0
votes
0 answers

Role of foreground points in pcl::MinCutSegmentation

I am trying to understand how does MinCutSegmentation work in PCL. I am setting some points as foreground points, but regardless of what points I chose as my foreground points, I get the same result. The segmentation basically crops some part of my…
0
votes
0 answers

networkx maximum_flow crashes on some pairs of nodes

I have a graph composed of 742 edges, and 360 nodes. I want to compute max flow between some pairs of nodes and it happens, for some of them the nx.maximum_flow ends with the pasted error, despite the fact that a path exists between the two…
radar
  • 500
  • 1
  • 6
  • 24
0
votes
1 answer

Number of min cuts in max flow

I have this question that I am stuck at. Given a network N,find the number of min cuts. required time complexity:Poly(|N|) * #(min cuts). I didn't success in finding anything useful, only how to find the first min cut by using BFS starting from…
omar kh
  • 11
  • 4
0
votes
2 answers

Is it possible to sell all items with given costs to people with given amount of money

Recently I ran into a real problem, which I can refolmulate as the following algorithmic task: Problem: Given a set of N persons, each having some amount of money, and a set of M items, each having some cost, is it possible to sell all of the…
Grigor Gevorgyan
  • 6,753
  • 4
  • 35
  • 64
0
votes
0 answers

boost maximum flow doesn't compile when template directedgraph is used?

I want to calc a max flow with the boost graph libary. UPDATE Due to request here is the full code:+ CPP: #include #include "PPINetwork.h" #include #include #include…
malger
  • 173
  • 1
  • 2
  • 7
0
votes
1 answer

USACO Cow Steeplechase: Dinic's Algorithm/Changes to Pointer Not Registering

Disclaimer: Not all of the code I used to attempt to solve the problem is needed to answer my question, but I will provide the rest if it is needed. Problem (If Context is Needed): http://www.usaco.org/index.php?page=viewproblem2&cpid=93 #include…
vamaddur
  • 65
  • 1
  • 8
0
votes
1 answer

Java MaxFlow Algorithm, Trouble Generating Edges

I'm trying to solve the max flow problem with the graph having unlimited weight edges but each node has a capacity. I solved the problem using ford fulkerson algorithm and splitting each node into an in node and an out node with the capacity being…
walker60
  • 1
  • 1
0
votes
1 answer

Initializing Graph for Push-Relabel Algorithm

Given the Push-Relabel Graph Cut algorithm described in this article I wish to perform binary image segmentation. My question is regarding initialisation of the graph. When representing the image as a graph with a lattice structure(MRF), one would…
Jack H
  • 2,440
  • 4
  • 40
  • 63
0
votes
1 answer

Directionality of mincut on a flow network

I'm not sure if I have a misunderstanding of mincut, but I've wrote a mincut algorithm using edmond-karps followed by a BFS on the flow network. If I tell it to do a mincut from A to B, it works, since the residual flow A->B = 0, so it produces the…
matts1
  • 857
  • 1
  • 9
  • 20
0
votes
1 answer

Max Flow Given Constraints on Edges

Hey so I have a graph such as where 3 edges go into a node, and 3 edges come out, however I only need the outgoing edge to activate if a particular in-going edge had capacity. For instance if we have: A -> N B -> N C -> N N -> N' N' -> A' N' ->…
user3892614
  • 95
  • 1
  • 1
  • 5
0
votes
2 answers

Error in an approach to Maximum Bipartite matching

A bipartite graph with a source and sink is given as shown below. The capacity of every edge is 1 unit : Source : GeeksforGeeks I'm trying to find the maximum flow from source to sink. One approach would be using the Ford-Fulkerson Algorithm for…
gautamk
  • 15
  • 1
  • 3
0
votes
2 answers

3 max flow prove or disprove small questions

The questions are : for (a) it seems like it is not true, we can fin an example of the flow growing without e being saturated. for (b) it seems true, yet i am not sure how to prove it. Maybe because of the min cut max flow theorm, it was on the min…
NotSure
  • 651
  • 2
  • 7
  • 24
0
votes
1 answer

Minimum cut over all pairs of vertices in directed and strongly connected graph

I have a graph G that is a directed and strongly connected graph, and I am asked to find a minimum cut over all pairs of vertices, meaning for every pair of S and T in the graph. This should be done in O(m2 × n2) time. The best I came up with was to…
Saik
  • 993
  • 1
  • 16
  • 40
0
votes
0 answers

Does the dinic's algorithm work for bidirectional edge?

Ford-fulkerson algorithm does work for bidirectional edges with a slight modification.But I'm confuesd about dinic's algorithm.Is this algorithm works fine as well for bidirectional edges ?
user3708629
  • 153
  • 1
  • 1
  • 7