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

Incorrect MinCut result #27

Closed
etiennedeg opened this issue Sep 12, 2019 · 9 comments
Closed

Incorrect MinCut result #27

etiennedeg opened this issue Sep 12, 2019 · 9 comments

Comments

@etiennedeg
Copy link
Member

etiennedeg commented Sep 12, 2019

Hi,
mincut seems to return false result with this graph:
graphe
Non-labeled edges have infinite capacity
edges 1-2, 4-7, 5-7 and 6-7 are saturated after the running of the algorithm

Output:
[1, 3, 6, 5] [2, 4, 7] 3.0
Expected Output
[1, 2, 3, 4, 5, 6] [7] 3.0

The algorithm should find every reachable node from the source by a flow, it instead reaches nodes reachable by non saturated direct edges

How to reproduce:

flow_graph = lg.DiGraph(7)
capacity_matrix = zeros(7,7)
flow_edges = [
(1,2,2),(1,3,2),(2,4,4),(2,5,4),
(3,5,4),(3,6,4),(4,7,1),(5,7,1),(6,7,1)
]
for e in flow_edges
    u, v, f = e
    lg.add_edge!(flow_graph, u, v)
    capacity_matrix[u,v] = f
end
a,b,c= LightGraphsFlows.mincut(flow_graph, 1, 7, capacity_matrix, EdmondsKarpAlgorithm())
println(a)
println(b)
println(c)
@etiennedeg
Copy link
Member Author

etiennedeg commented Sep 19, 2019

I made a PR : #32

@matbesancon
Copy link
Member

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Error while trying to register: "File (Julia)Project.toml not found"

@matbesancon
Copy link
Member

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Error while trying to register: "Tag with name 0.1.0 already exists and points to a different commit"

@matbesancon
Copy link
Member

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Error while trying to register: Changing UUIDs is not allowed

@matbesancon
Copy link
Member

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Registration pull request created: JuliaRegistries/General/9016

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" aa8e14e76daa38cd7ee7291b376f4a722541edbd
git push origin v0.3.1

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