Questions tagged [edmonds-karp]

The Edmonds-Karp algorithm is a polynomial-time algorithm for finding the maximum flow in a flow network.

37 questions
1
vote
0 answers

Which assignment algorithm should I use?

I have a single set and I need to generate pairs of two elements among this set. The assignments are all weighted. The matching shall be either constricted or perfect, depends on the results. I guess, I need a weighted matching in general graphs…
Ben
  • 1,432
  • 4
  • 20
  • 43
1
vote
1 answer

Complexity of Edmonds-Karp algorithm

Edmonds-Karp algorithm says that shortest distance between source s and sink t is increases monotonically every time shortest path is augmented. With this assumption distance between source s and sink t is going to be not more then |V| - 1. I think…
1
vote
2 answers

Ford-Fulkerson implementation java

I'm trying to learn to implement the Ford-Fulkersons algorithm in java and found some help on the internet but I got stuck at this snippet of code // update residual capacities of the edges and // reverse edges along the path …
1
vote
2 answers

Cormen's "Introduction to algorithms" 3rd Edition - Edmonds-karps-Algorithm - Lemma 26.7

since I think many of us don't have the same edition of "Introduction to algorithms" of Prof. Cormen et al., I'm gonna write the Lemma (and my question) in the following. Edmonds-Karp-Algorithm Lemma 26.7 (in 3rd edition; in 2nd it may be Lemma…
1
vote
1 answer

How does Edmonds-karp algorithm actually computes the shortest path?

I am trying to understand Edmonds-Karp algorithm in more details and was curious to know what algorithm it uses to compute the shortest path (least number of edges) from s to t for each iteration
razshan
  • 1,128
  • 12
  • 41
  • 59
1
vote
1 answer

How do you find the maximum flow on a digraph where capacities may be negative?

Ford-Fulkerson and Edmonds-Karp et. al. start with a zero flow and augment it until it can't be augmented any more. In the case of positive capacities; however, the initial zero flow is guaranteed to be both a legal flow and a flow that satisfies…
jwezorek
  • 8,592
  • 1
  • 29
  • 46
1
vote
1 answer

Creating capacity graph for edmonds karp maximum flow algorithm in Python

before I dive into the question here is some background information of what I already have: -I first created an non-directed adjacency matrix graph based on cities across U.S. with edge weights being the calculated distance (achieved that through…
Baraa
  • 687
  • 1
  • 9
  • 26
0
votes
1 answer

How to start Edmonds-Karp implementation if all the paths have same lengths?

How can I select the starting path for the Edmonds-Karp algorithm if all the paths are the same length? In this case, maximum flow changes according to path sequence decision.
Gary Leather
  • 281
  • 2
  • 6
  • 18
0
votes
1 answer

How to save last BFS of Edmonds-Karp algorithm?

I have implemented the following C++ Edmonds-Karp algorithm: #include // Part of Cosmos by OpenGenus Foundation // #include #include #include using namespace std; #define V 6 /* Returns true if there is a…
user17588210
0
votes
1 answer

How to use custom edge implementation with EdmondsKarp max flow algorithm

I'm trying to implement and simulate a network where I can try some routing methods. My problem is that one of my routing methods is require me to calculate MaxFlow/MinCut. I have a custom implementation for the edges, where I added some new fields…
0
votes
1 answer

Edmonds–Karp time complexity

I am trying to implement a version of the Edmonds–Karp algorithm for an undirected graph. The code below works, but it is very slow when working with big matrices. Is it possible to get the Edmonds–Karp algorithm to run faster, or should I proceed…
0
votes
1 answer

How can I use the Edmonds & Karp Algorithm for residual graph

I am on to solve the Edmonds and Karp Algorithm. On normal Networks I know how to use it, indeed I am unsure / I got no clue how to use the Algorithm on a residual graph, hence there are Back-Edges. Can anyone tell me, how an iteration is done…
0
votes
0 answers

Finding max flow of an undirected graph using Edmonds-Karp

I was recently trying to solve a max flow problem on spoj. I saw an algorithm for max flow here, so I applied it but I was not getting the required answer. The reason was I decreased the capacity of edge towards sink in my implementation and…
0
votes
1 answer

Java JUNG EdmondsKarpMaxFlow getting stuck in infinite loop

I am trying to use JUNG's EdmondsKarpMaxFlow object to find the max flow between all node pairs in a directed graph. I created a simple directed graph and ran it on each combination of nodes with no error. Here's the working example for…
0
votes
1 answer

How to get flow for every edge using Jung's Edmonds Karp?

I am trying to learn the Max-Flow algorithm on Java. When I researched, I found the Jung library for visualization and algorithms and it worked for me. I can calculate the max flow but I can't see the calculated flow for each edge. I want to write…