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

Fastest min-cut (max-flow) algorithm in actual practice on small weighted DAG

I want to solve the min-cut problem on a lot of small DAGS (8-12 nodes,20-60 edges) very quickly. It looks like the best solution is to solve the max-flow and deduce a cut from that. There are quite a few max-flow algorithms with both theoretical…
DaveTweed
  • 113
  • 4
5
votes
1 answer

Max flow in unweighted graph

Max flow problem is usually solved by edmond-karp algorithm, which is building residual graph, and using BFS to find augmenting paths. But usually max flow problem is defined for weighted graph. For unweighted graph, we can simply treat the weight…
Justin Li
  • 1,035
  • 2
  • 12
  • 19
5
votes
2 answers

Algorithm: Check if max flow is unique

A question to the following exercise: Let N = (V,E,c,s,t) be a flow network such that (V,E) is acyclic, and let m = |E|. Describe a polynomial- time algorithm that checks whether N has a unique maximum flow, by solving ≤ m + 1 max-flow problems. …
Harry
  • 1,105
  • 8
  • 20
5
votes
0 answers

Matching students to courses with course limit (Hungarian, Max Flow, Min-Cost-Flow, ...)

I am currently writing a program which maps students to courses. Currently, I am using a SAT-Solver, but I am trying to implement a polynomial time / non greedy algorithm which solves the following sub-problem: There are students (50-150) There are…
4
votes
0 answers

edmond karps in Boost Graph Library

A part of my algorithm requires to compute maximum flow in a network with integer capacities. I want to use boost::edmonds_karp_max_flow algorithm to find the maximum flow. I tried reading the documentation but it was very difficult for me as I have…
Graddy
  • 2,828
  • 5
  • 19
  • 25
4
votes
2 answers

Best graph algorithm/implementation for dynamic max-flow computation

I have to write a program which requires to maintain some data in a directed flow graph. I need to compute the maximum-flow at runtime. I know that there exist several libraries for handling graphs, implementing almost every classical algorithm, but…
Mokay2k
  • 51
  • 3
4
votes
2 answers

Finding a perfect matching in graphs

I have this question : Airline company has N different planes and T pilots. Every pilot has a list of planes he can fly. Every flight needs 2 pilots. The company want to have as much flights simultaneously as possible. Find an algorithm that finds…
4
votes
1 answer

Mincut upstream and downstream classification

Came across this question while preparing for finals exams. Suppose you’re looking at a flow network G with source s and sink t. We can classify the nodes into 3 categories. We say a node v is upstream if, for all minimum s-t cuts (A,B), v is in…
eatfood
  • 141
  • 5
4
votes
2 answers

Fast maximum bipartite matching in C or Python

Is there a fast off the shelf implementation of maximum cardinality bipartite matching in C or Python? I tried networkx, but it is very slow. I have a two-layer graph with about 1000 nodes in each layer. The density varies. What is the time I can…
ivan
  • 311
  • 1
  • 4
  • 13
4
votes
5 answers

Professor Adam's Kids (determine the maximum-flow)

I need help in understanding how to solve the following problem: Professor Adam has two children who, unfortunately, dislike each other. The problem is so severe that not only do they refuse to walk to school together, but in fact each one refuses…
Jubl
  • 247
  • 3
  • 14
4
votes
2 answers

Update Maximum Flow After Adding an Edge

Consider we have a network flow and using Edmond-Karp algorithm, we already have the maximum flow on the network. Now, if we add an arbitrary edge (with certain capacity) to the network, what is the best way to update the maximum flow? I was…
Nima
  • 276
  • 3
  • 15
4
votes
2 answers

Appropriate graph representation for network flow algorithms

When implementing Ford-Fulkerson or Dinitz algorithms for maximum network flow there are two operations that need to be performed on the graph: Iterate over all neighbours of a given vertex Find the reverse edge of a given edge(this is needed for…
Ivaylo Strandjev
  • 69,226
  • 18
  • 123
  • 176
4
votes
4 answers

Does a Given Network has a Unique Min-Cut?

Let G = (V, E) be a network with s and t being the source and the sink. Let f be a maximum flow in G. Find an algorithm that determines whether there exists a unique min-cut in G. I have managed to find a similar question on this site: Determining…
Robert777
  • 801
  • 3
  • 12
  • 24
4
votes
0 answers

Are any of the state of the art Maximum Flow algorithms practical?

For the maximum flow problem, there seem to be a number of very sophisticated algorithms, with at least one developed as recently as last year. Orlin's Max flows in O(mn) time or better gives an algorithm that runs in O(VE). On the other hand, the…
4
votes
1 answer

Optimal selection election algorithm

Given a bunch of sets of people (similar to): [p1,p2,p3] [p2,p3] [p1] [p1] Select 1 from each set, trying to minimize the maximum number of times any one person is selected. For the sets above, the max number of times a given person MUST be…
RHok
  • 152
  • 1
  • 2
  • 11
1
2
3
14 15