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

Graph.is_gallai_tree() method has an error in the code #25613

Closed
math1um opened this issue Jun 19, 2018 · 8 comments
Closed

Graph.is_gallai_tree() method has an error in the code #25613

math1um opened this issue Jun 19, 2018 · 8 comments

Comments

@math1um
Copy link

math1um commented Jun 19, 2018

The Graph.is_gallai_tree() method checks for whether a block's vertices induce a cycle tests if the number of edges is one more than the number of vertices. These should be the same.

The third-to-last-line currently has the test: gg.size() == len(c)+1

It should have the test: gg.size() == len(c)

A graph which is a 5-cycle with an appended edge to an external vertex is a gallai tree. But the existing method returns False. Call this graph "gg":

gg=graphs.CycleGraph(5)
gg.add_edge(0,5)
gg.is_gallai_tree() 

should return: True.

CC: @dcoudert

Component: graph theory

Author: Frédéric Chapoton

Branch/Commit: f8a9c73

Reviewer: Travis Scrimshaw

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

@math1um math1um added this to the sage-8.3 milestone Jun 19, 2018
@nvcleemp

This comment has been minimized.

@fchapoton
Copy link
Contributor

Commit: f8a9c73

@fchapoton
Copy link
Contributor

Branch: public/25613

@fchapoton
Copy link
Contributor

New commits:

f8a9c73fixing is_gallai_tree

@fchapoton
Copy link
Contributor

Author: Frédéric Chapoton

@tscrim
Copy link
Collaborator

tscrim commented Jun 22, 2018

comment:4

LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Jun 22, 2018

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Jun 23, 2018

Changed branch from public/25613 to f8a9c73

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

5 participants