Skip to content
This repository was archived by the owner on Jul 28, 2021. It is now read-only.

Cycles #4

Open
BlackGammon opened this issue Nov 16, 2015 · 3 comments
Open

Cycles #4

BlackGammon opened this issue Nov 16, 2015 · 3 comments

Comments

@BlackGammon
Copy link

Hello,

I have executed your code and the result I'm getting has the correct amount of edges but it's still full of cycles. Something has probably gone wrong in the detection of cycles.

EO

@BlackGammon
Copy link
Author

I tried with G = {0: {1: 100.0}, 1: {2: 2.0}, 2: {1: 3.0}} and root = 0

it returns g = {0: {1: 3.0}, 1: {2: 2.0}, 2: {}} which means the values in g are wrong.

@jungokasai
Copy link

jungokasai commented Mar 20, 2018

I ran into the same problem.

@matus-pikuliak
Copy link

Yep, the code is faulty. I found working solution on SO (see David Eisenstat's answer):

https://stackoverflow.com/questions/23988236/chu-liu-edmonds-algorithm-for-minimum-spanning-tree-on-directed-graphs

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