#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 lkeough):
I timed both Jeremy's code and mhansen's code and it seems that mhansen's
is much faster.
The two codes give two different looking (but potentially the same)
answers on the Petersen graph.
This is about a third of the tutte.sage output
14*x^4 + 22*(x + y)^2*x + 8*(x + y)*((x + y)*x + y^2 + x + y)*x + (x^4 +
x^3 + (x + y)*(x^2 + x + y) + x^2 + x + y)*x^2 + ((x + y)^2*x + (x +
y)^2 + y^3 + ((x + y)*x^2 + (x + y)*x + y^2 + x + y)*x + y^2 + x +
y)*x^2 + 22*(x + y)^2 + 13*(y^2 + x + y)^2 + 14*x^3 + 22*y^3 + 14*(x +
y)*(x^2 + x + y) + 4*(y^2 + x + y)*((x + y)^2 + y^3 + y^2 + x + y) +
5*((x + y)*x + (x^2 + x + y)*x + y^2 + x + y)*y + 9*((x + y)*x^2 + (x +
y)*x + y^2 + x + y)*x + 9*(x^4 + x^3 + x^2 + x + y)*x + ((x + y)^2*x +
(x + y)^2 + y^3 + ((x + y)*x^2 + (x + y)*x + y^2 + x + y)*x + y^2 + x +
y)*x + (x^4 + (x^4 + x^3 + x^2 + x + y)*x^2 + x^3 + (x + y)*(x^2 + x +
y) + (x^4 + x^3 + x^2 + x + y)*x + x^2 + x + y)*x + 4*(x^4 + (x + y)^2*x
+ (x + y)^2 + x^3 + y^3 + (x + y)*(x^2 + x + y) + ((x + y)*x^2 + (x +
y)*x + y^2 + x + y)*x + (x^4 + x^3 + x^2 + x + y)*x + x^2 + y^2 + 2*x +
2*y)*x + 2*(x^4 + (x + y)^2*x + (x + y)^2 + x^3 + y^3 + (x + y)*(x^2 + x
+ y) + ((x + y)*x^2 + (x + y)*x + y^2 + x + y)*x + (x^4 + x^3 + x^2 + x
+ y)*x + (x^4 + x^3 + (x + y)*(x^2 + x + y) + (x^4 + x^3 + x^2 + x +
y)*x + x^2 + x + y)*x + x^2 + y^2 + 2*x + 2*y)*x + 2*(x^4 + 2*(x +....
And this is the output of Jeremy's:
x^9 + 6*x^8 + 21*x^7 + 56*x^6 + 12*x^5*y + 114*x^5 + y^6 + 70*x^4*y +
30*x^3*y^2 + 15*x^2*y^3 + 10*x*y^4 + 170*x^4 + 180*x^3 + 120*x^2 + 9*y^5
+ 170*x^3*y + 105*x^2*y^2 + 65*x*y^3 + 35*y^4 + 240*x^2*y + 171*x*y^2 +
75*y^3 + 168*x*y + 84*y^2 + 36*x + 36*y
Although they are both showing up funny looking here...
Is there an easy way to multiply out and gather like terms in sage?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/1314#comment:15>
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.