#1314: graphs: calculate tutte polynomial
--------------------------------+-------------------------------------------
       Reporter:  jason         |         Owner:  rlm          
           Type:  enhancement   |        Status:  new          
       Priority:  major         |     Milestone:  sage-wishlist
      Component:  graph theory  |    Resolution:               
       Keywords:                |   Work issues:               
Report Upstream:  N/A           |     Reviewers:               
        Authors:                |     Merged in:               
   Dependencies:                |      Stopgaps:               
--------------------------------+-------------------------------------------

Comment (by jeremy.l.martin):

 Replying to [comment:12 mhansen]:

 > I had some old code from awhile back for computing this which I've
 attached, along with some commented out possible optimizations.  I think I
 remember when doing this in practice, avoiding copying the graph saved
 quite a bit of time (hence the unmerge function).

 mhansen, thanks for sharing this code.  Unfortunately, it does not seem to
 give the right answer for K_4:

 sage: G = graphs.[wiki:CompleteGraph](4); G.allow_loops(true);
 G.allow_multiple_edges(true); tp = tutte_polynomial(G,x,y); tp

 x^2^*y^2^ + x*y^3^ + x^3^ + x^2^*y + x*y^2^ + x^2^ + x*y

 The actual Tutte polynomial of K4 is x^3^ + 3*x^2^ + y^3^ + 4*x*y + 3*y^2^
 + 2*x + 2*y.

 I currently do not see a way to implement the Tutte polynomial without
 making lots of copies of graphs, but maybe someone else can.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1314#comment:13>
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