Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Edmonds Karp Algorithm for maximum flows not returning the labels for the s-t min cut #10

Closed
CBongiova opened this issue Feb 6, 2018 · 8 comments

Comments

@CBongiova
Copy link

Hello,
I am running the maximum_flow function (Edmonds Karp Algorithm) but I have noticed that the function does not return the labelling associated with the minimum cut.
Is there a way to return this output?
Thanks!

@matbesancon
Copy link
Member

you're right, from some quick research, this is an information you can extract from the dual variables at the optimum.
From an API perspective, a mincost function could be called, using maxflow under the hood but returning a set of arcs corresponding to this min cut
If you want to give it a try, don't hesistate to PR ;)

@CBongiova
Copy link
Author

Actually I have just found out that it is possible to extract the mincut with the Erdos package (https://carlolucibello.github.io/Erdos.jl/latest/flow/). So the problem is solved :)

@matbesancon matbesancon reopened this Feb 6, 2018
@matbesancon
Copy link
Member

I'll keep this open since having a min-cut format of the flow algorithms still seems interesting for LightGraphs

@sbromberger
Copy link

Are we sure we don't have this functionality already? If not, Erdos would be a good reference.

@matbesancon
Copy link
Member

there is a mincut function in LG, but it does not seem to be the same concept (or I don't understand it). Nothing of the kind in LGFlows yet

@CBongiova
Copy link
Author

@mbesancon Indeed it is not the same concept. You want to retrieve the labelling associated with the mincut from a source-sink maximum flow problem. This link should explain the concept:
https://www.geeksforgeeks.org/minimum-cut-in-a-directed-graph/

@matbesancon
Copy link
Member

matbesancon commented Feb 6, 2018

thanks @CBongiova, I was thinking about how to solve this one but the residual flow approach seems to be the simplest. I'll start working on this

@matbesancon matbesancon reopened this Feb 6, 2018
@matbesancon matbesancon mentioned this issue Feb 7, 2018
@matbesancon
Copy link
Member

See the #11 PR ;)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants