#13546: Bug in is_perfect
-------------------------------------------+--------------------------------
Reporter: azi | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-5.7
Component: graph theory | Resolution:
Keywords: is_perfect,graph theory | Work issues:
Report Upstream: N/A | Reviewers: Jernej Azarija,
Sébastien Labbé
Authors: Nathann Cohen | Merged in:
Dependencies: #8952 | Stopgaps:
-------------------------------------------+--------------------------------
Comment (by ncohen):
Yo !
> What confuses me is this. Suppose I allow multiple edges from a graph G
why is it then not treated as being non-simple.
There's nothing called "simple" graph is Sage. What we have is 4 methods :
has_loops, allows_loops, has_multiple_edges, allows_multiple_edges. I
don't know why that's how it got written, but that's how it is. We can
change that of course, and even define a is_simple function. But well,
that's how it is.
> What about the remark on handling sparse6 strings? If a sparse6 string
represents a simple graph there is no need to return a graph allowing
multiple edges?
It means that whether a graph allows loops depends on whether the sparse6
string you feed it with allows it. So if you store 1000 sparse6 string and
load them all, some of the graphs you get will allow multiple edges and
loops, some others will not. I think that this would be dirty.
What could be done is this :
{{{
Graph(my_string, allow_loops = True, allow_multiple_edges = True)
}}}
returs graphs allowing loops and multiple edges.
{{{
Graph(my_string, allow_loops = False)
}}}
raises an exception if the string does not correspond to a non-simple
graph.
The point is that you wouldn't create graphs allowing loops and multiple
edges by mistake.
Nathann
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13546#comment:30>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.