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

block_and_cut_vertices is inconsistent when graph has one vertex #7853

Closed
jasongrout opened this issue Jan 6, 2010 · 7 comments
Closed

block_and_cut_vertices is inconsistent when graph has one vertex #7853

jasongrout opened this issue Jan 6, 2010 · 7 comments

Comments

@jasongrout
Copy link
Member

Currently, block_and_cut_vertices says that the vertex in a single-vertex graph is a cut vertex:

sage: Graph(1).blocks_and_cut_vertices()
([0], [0])

According to the definition of cut vertices given in the documentation of the function, a cut vertex, when removed, increases the connected components of the graph. Either that documentation should be changed to mention a corner case, or (preferably), the above computation should look like:

sage: Graph(1).blocks_and_cut_vertices()
([0], [])

CC: @sagetrac-hartke @rlmill @nathanncohen

Component: graph theory

Author: Nathann Cohen

Reviewer: Robert Miller

Merged: sage-4.3.1.alpha2

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

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jan 6, 2010

comment:1

Here it is ! Actually the answer [0],[0] seemed deliberate in the code, but my tests with the patch applied did not show any error coming from the fix :-)

( Apply on top of patches from #7634 )

Nathann

@nathanncohen nathanncohen mannequin added the s: needs review label Jan 6, 2010
@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jan 6, 2010

Apply on top of patches from #7634

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 6, 2010

Author: Nathann Cohen

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 6, 2010

Reviewer: Robert Miller

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 6, 2010

comment:2

Attachment: trac_7853.patch.gz

Looks good to me.

@rlmill rlmill mannequin added s: positive review and removed s: needs review labels Jan 6, 2010
@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 13, 2010

Merged: 4.3.1.alpha2

@rlmill rlmill mannequin removed the s: positive review label Jan 13, 2010
@rlmill rlmill mannequin closed this as completed Jan 13, 2010
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Jan 13, 2010

Changed merged from 4.3.1.alpha2 to sage-4.3.1.alpha2

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

1 participant