#12134: is_planar(set_pos=True) doesn't work with small graphs
----------------------------+-----------------------------------------------
   Reporter:  brunellus     |          Owner:  jason, ncohen, rlm
       Type:  defect        |         Status:  new               
   Priority:  major         |      Milestone:  sage-4.8          
  Component:  graph theory  |       Keywords:                    
Work_issues:                |       Upstream:  N/A               
   Reviewer:                |         Author:                    
     Merged:                |   Dependencies:                    
----------------------------+-----------------------------------------------
 {{{
 sage: graphs.PathGraph(2).is_planar(set_pos=True)
 Traceback (click to the left of this block for traceback)
 ...
 NotImplementedError: _triangulate() only accepts graphs with more than 2
 vertices as input.
 }}}

 It is interesting that _triangulate raises NotImplementedError. The usual
 definition of a triangulation says something like "maximal planar graph",
 so it seems like PathGraph(2) is already triangulated, but if you ask
 [http://mathworld.wolfram.com/TriangulatedGraph.html Mathematica] or
 [http://oeis.org/A000109 OEIS], they don't accept this: according to this
 source there aren't any triangulated graphs on two vertices, so
 _triangulate should scream "This can't be done" and is_planar should avoid
 use _triangulate in this scenario, because there is no doubt that
 PathGraph(2) is planar.

 The error is only present when set_pos=True. Also, notice that

 {{{
 sage: graphs.PathGraph(1).is_planar(set_pos=True)
 True
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12134>
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.

Reply via email to