#12108: is_eulerian doesn't handle disconnected graphs properly
-----------------------------+----------------------------------------------
Reporter: brunellus | Owner: jason, ncohen, rlm
Type: defect | Status: positive_review
Priority: major | Milestone: sage-4.8
Component: graph theory | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Nathann Cohen | Author: Lukáš Lánský
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by newvalueoldvalue):
* status: needs_review => positive_review
* reviewer: => Nathann Cohen
* author: => Lukáš Lánský
Old description:
> Consider following:
>
> {{{
> sage: g = DiGraph({0:[1], 1:[0], 2:[]}); g.is_eulerian()
> False
> }}}
>
> is_eulerian sees two components and refuses to label graph as an eulerian
> one. But the common definition (and the docstring) says that eulerian
> graph has all its edges coverable by one tour -- that permits
> disconnected graphs as long as every component but one don't contains any
> edges.
New description:
Consider following:
{{{
sage: g = DiGraph({0:[1], 1:[0], 2:[]}); g.is_eulerian()
False
}}}
is_eulerian sees two components and refuses to label graph as an eulerian
one. But the common definition (and the docstring) says that eulerian
graph has all its edges coverable by one tour -- that permits disconnected
graphs as long as every component but one don't contains any edges.
Apply:
* [attachment:trac_12108_is_eulerian_fix2.patch]
--
Comment:
Oh ! I did not noticed you updated the patch...... It's good to go ! `:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12108#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.