Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks_and_cut_vertices - bug with directed graphs and Boost interface #25994

Closed
meghanamreddy opened this issue Aug 3, 2018 · 7 comments
Closed

Comments

@meghanamreddy
Copy link

While using the Boost interface to compute the blocks and cut vertices, the output is wrong if the input is a directed graph.

sage: from sage.graphs.connectivity import blocks_and_cut_vertices
sage: rings = graphs.CycleGraph(10)
sage: rings.merge_vertices([0, 5])
sage: blocks_and_cut_vertices(rings, algorithm="Tarjan_Boost")
([[0, 1, 4, 2, 3], [0, 6, 9, 7, 8]], [0])
sage: from sage.graphs.connectivity import blocks_and_cut_vertices
sage: rings = graphs.CycleGraph(10)
sage: rings.merge_vertices([0, 5])
sage: rings = rings.to_directed()
sage: blocks_and_cut_vertices(rings, algorithm="Tarjan_Boost")
([[0, 1, 4, 2, 3, 6, 7, 8, 9], [0, 6, 9, 7, 8]], [0, 9, 8, 6, 7])

If the input graph is a directed graph, the blocks and cut vertices are computed on the underlying simple graph.

CC: @dcoudert @dimpase

Component: graph theory

Keywords: connectivity, biconnected components, boost, bc tree, gsoc2018

Author: Meghana M Reddy

Branch/Commit: 7c76517

Reviewer: David Coudert

Issue created by migration from https://trac.sagemath.org/ticket/25994

@meghanamreddy
Copy link
Author

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2018

Branch pushed to git repo; I updated commit sha1. New commits:

7c76517Fixed the bug and added an example related to the bug.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Aug 3, 2018

Commit: 7c76517

@dcoudert
Copy link
Contributor

dcoudert commented Aug 4, 2018

comment:3

Is this patch ready for review ? if so, set it to needs review.

@dcoudert
Copy link
Contributor

dcoudert commented Aug 4, 2018

Reviewer: David Coudert

@dcoudert
Copy link
Contributor

dcoudert commented Aug 4, 2018

comment:5

LGTM.

@vbraun
Copy link
Member

vbraun commented Sep 1, 2018

Changed branch from u/meghanamreddy/25994_boost_interface to 7c76517

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

No branches or pull requests

3 participants