#13391: WeylCharacterRing improvement
------------------------------------------+---------------------------------
Reporter: bump | Owner: sage-combinat
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-5.3
Component: combinatorics | Resolution:
Keywords: WeylCharacterRing, Lie | Work issues:
Report Upstream: N/A | Reviewers: Anne Schilling
Authors: Daniel Bump | Merged in:
Dependencies: | Stopgaps:
------------------------------------------+---------------------------------
Comment (by bump):
I was wondering about these exact points. There would be some minor
overhead involved in deciding whether to switch a and b before computing
a*b. I think in many cases it would be worthwhile.
I was also wondering about the power, and there ... watch this!
{{{
sage: B4=WeylCharacterRing("B4",style="coroots"); spin=B4(0,0,0,1)
sage: time spin^8
1001*B4(0,0,0,0) + 3003*B4(1,0,0,0) + 5460*B4(0,1,0,0) + 7644*B4(0,0,1,0)
+ 8918*B4(0,0,0,2) + 3388*B4(2,0,0,0) + 8085*B4(1,1,0,0) +
12474*B4(1,0,1,0) + 15092*B4(1,0,0,2) + 5775*B4(0,2,0,0) +
11550*B4(0,1,1,0) + 15092*B4(0,1,0,2) + 6300*B4(0,0,2,0) +
10290*B4(0,0,1,2) + 4116*B4(0,0,0,4) + 1716*B4(3,0,0,0) + 4550*B4(2,1,0,0)
+ 7371*B4(2,0,1,0) + 9100*B4(2,0,0,2) + 4290*B4(1,2,0,0) +
9009*B4(1,1,1,0) + 12012*B4(1,1,0,2) + 5460*B4(1,0,2,0) + 9100*B4(1,0,1,2)
+ 3822*B4(1,0,0,4) + 1540*B4(0,3,0,0) + 3564*B4(0,2,1,0) +
4928*B4(0,2,0,2) + 2835*B4(0,1,2,0) + 4900*B4(0,1,1,2) + 2268*B4(0,1,0,4)
+ 825*B4(0,0,3,0) + 1540*B4(0,0,2,2) + 924*B4(0,0,1,4) + 210*B4(0,0,0,6) +
330*B4(4,0,0,0) + 924*B4(3,1,0,0) + 1540*B4(3,0,1,0) + 1925*B4(3,0,0,2) +
972*B4(2,2,0,0) + 2100*B4(2,1,1,0) + 2835*B4(2,1,0,2) + 1344*B4(2,0,2,0) +
2268*B4(2,0,1,2) + 980*B4(2,0,0,4) + 462*B4(1,3,0,0) + 1100*B4(1,2,1,0) +
1540*B4(1,2,0,2) + 924*B4(1,1,2,0) + 1617*B4(1,1,1,2) + 770*B4(1,1,0,4) +
300*B4(1,0,3,0) + 567*B4(1,0,2,2) + 350*B4(1,0,1,4) + 84*B4(1,0,0,6) +
84*B4(0,4,0,0) + 210*B4(0,3,1,0) + 300*B4(0,3,0,2) + 196*B4(0,2,2,0) +
350*B4(0,2,1,2) + 175*B4(0,2,0,4) + 84*B4(0,1,3,0) + 162*B4(0,1,2,2) +
105*B4(0,1,1,4) + 28*B4(0,1,0,6) + 14*B4(0,0,4,0) + 28*B4(0,0,3,2) +
20*B4(0,0,2,4) + 7*B4(0,0,1,6) + B4(0,0,0,8)
Time: CPU 20.33 s, Wall: 20.34 s
}}}
[Exit and restart sage to avoid caching effects ...]
{{{
sage: B4=WeylCharacterRing("B4",style="coroots"); spin=B4(0,0,0,1)
sage: time spin*(spin*(spin*(spin*(spin*(spin*(spin*spin))))))
1001*B4(0,0,0,0) + 3003*B4(1,0,0,0) + 5460*B4(0,1,0,0) + 7644*B4(0,0,1,0)
+ 8918*B4(0,0,0,2) + 3388*B4(2,0,0,0) + 8085*B4(1,1,0,0) +
12474*B4(1,0,1,0) + 15092*B4(1,0,0,2) + 5775*B4(0,2,0,0) +
11550*B4(0,1,1,0) + 15092*B4(0,1,0,2) + 6300*B4(0,0,2,0) +
10290*B4(0,0,1,2) + 4116*B4(0,0,0,4) + 1716*B4(3,0,0,0) + 4550*B4(2,1,0,0)
+ 7371*B4(2,0,1,0) + 9100*B4(2,0,0,2) + 4290*B4(1,2,0,0) +
9009*B4(1,1,1,0) + 12012*B4(1,1,0,2) + 5460*B4(1,0,2,0) + 9100*B4(1,0,1,2)
+ 3822*B4(1,0,0,4) + 1540*B4(0,3,0,0) + 3564*B4(0,2,1,0) +
4928*B4(0,2,0,2) + 2835*B4(0,1,2,0) + 4900*B4(0,1,1,2) + 2268*B4(0,1,0,4)
+ 825*B4(0,0,3,0) + 1540*B4(0,0,2,2) + 924*B4(0,0,1,4) + 210*B4(0,0,0,6) +
330*B4(4,0,0,0) + 924*B4(3,1,0,0) + 1540*B4(3,0,1,0) + 1925*B4(3,0,0,2) +
972*B4(2,2,0,0) + 2100*B4(2,1,1,0) + 2835*B4(2,1,0,2) + 1344*B4(2,0,2,0) +
2268*B4(2,0,1,2) + 980*B4(2,0,0,4) + 462*B4(1,3,0,0) + 1100*B4(1,2,1,0) +
1540*B4(1,2,0,2) + 924*B4(1,1,2,0) + 1617*B4(1,1,1,2) + 770*B4(1,1,0,4) +
300*B4(1,0,3,0) + 567*B4(1,0,2,2) + 350*B4(1,0,1,4) + 84*B4(1,0,0,6) +
84*B4(0,4,0,0) + 210*B4(0,3,1,0) + 300*B4(0,3,0,2) + 196*B4(0,2,2,0) +
350*B4(0,2,1,2) + 175*B4(0,2,0,4) + 84*B4(0,1,3,0) + 162*B4(0,1,2,2) +
105*B4(0,1,1,4) + 28*B4(0,1,0,6) + 14*B4(0,0,4,0) + 28*B4(0,0,3,2) +
20*B4(0,0,2,4) + 7*B4(0,0,1,6) + B4(0,0,0,8)
Time: CPU 0.33 s, Wall: 0.34 s
}}}
Conclusion: don't binary!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13391#comment:11>
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.