Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #25613: Graph.is_gallai_tree() method has an error in the code
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": {{{#!python gg=graphs.CycleGraph(5) gg.add_edge(0,5) gg.is_gallai_tree() }}} should return: True. URL: https://trac.sagemath.org/25613 Reported by: gh-math1um Ticket author(s): Frédéric Chapoton Reviewer(s): Travis Scrimshaw
- Loading branch information