Here it is, ticket number 12155.

http://trac.sagemath.org/sage_trac/ticket/12155

> Yes, it would appear that the generic complement() method is adding
> edges to a bipartite graph object and the error is coming from the
> bipartite graph routines complaining about an illegitimate edge.  I
> would imagine that temporarily you could convert your bipartite graph
> to a generic graph before taking the complement.
>
> Long-term, maybe the bipartite graph object should implement its own
> complement, which creates a generic graph and then calls the generic
> complement on that?  (Though I have not studied the situation too
> carefully.)  Can you make a Trac ticket and point back to this
> discussion?

It appears that BipartiteGraph (bipartite_graph.py) is using the
complement method from Generic graph (generic_graph.py), which when
constructing the complement G of self on line 11933 does

G=copy(self)

Maybe here is where the bipartite property gets transferred to G.

If my counting is right, there are only 8 bipartite graphs whose
complements are also bipartite (and each of them has at most 4
vertices). Would it be useful to preserve the bipartiteness property
when taking complement in any of these instances? If so, maybe
implement this in the BipartiteGraph complement method. I am also
thinking that the complement method in the BipartiteGraph could just
do something like

return Graph(self.edges()).complement()


Thanks,
Fidel

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to