#15577: Making braid groups independent on the global option for order of
permutations
-------------------------------------+-------------------------------------
Reporter: darij | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.1
Component: group theory | Resolution:
Keywords: groups, combinat, | Merged in:
braid group, permutations | Reviewers:
Authors: Darij Grinbrg | Work issues:
Report Upstream: N/A | Commit:
Branch: | a7c6f73692851604c4bf8ef952dfa9923abe9ef4
public/ticket/15577 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by darij):
* status: new => needs_review
* commit: => a7c6f73692851604c4bf8ef952dfa9923abe9ef4
* branch: => public/ticket/15577
Comment:
Finished. Some timings:
before:
{{{
sage: B5 = BraidGroup(5)
sage: %timeit B5.one().permutation()
100000 loops, best of 3: 15.3 us per loop
sage: %timeit B5([1,-2,1]).permutation()
1000 loops, best of 3: 619 us per loop
sage: %timeit B5([1,-4,2,-3,2,1,2]).permutation()
1000 loops, best of 3: 1.13 ms per loop
sage: %timeit B5([1,2,4,1,-3,-1,2,1,-3]).permutation()
1000 loops, best of 3: 1.38 ms per loop
sage: %timeit B5.one().left_normal_form()
1000000 loops, best of 3: 266 ns per loop
sage: %timeit B5([1,-2,1]).left_normal_form()
100 loops, best of 3: 2.67 ms per loop
sage: %timeit B5([1,-4,2,-3,2,1,2]).left_normal_form()
100 loops, best of 3: 6.67 ms per loop
sage: %timeit B5([1,2,4,1,-3,-1,2,1,-3]).left_normal_form()
100 loops, best of 3: 7.94 ms per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([1,2,3,4,5]))
10000 loops, best of 3: 38 us per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([3,1,4,2,5]))
1000 loops, best of 3: 381 us per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([5,4,3,2,1]))
1000 loops, best of 3: 1.1 ms per loop
}}}
after:
{{{
sage: B5 = BraidGroup(5)
sage: %timeit B5.one().permutation()
10000 loops, best of 3: 44.6 us per loop
sage: %timeit B5([1,-2,1]).permutation()
1000 loops, best of 3: 349 us per loop
sage: %timeit B5([1,-4,2,-3,2,1,2]).permutation()
1000 loops, best of 3: 490 us per loop
sage: %timeit B5([1,2,4,1,-3,-1,2,1,-3]).permutation()
1000 loops, best of 3: 566 us per loop
sage: %timeit B5.one().left_normal_form()
1000000 loops, best of 3: 418 ns per loop
sage: %timeit B5([1,-2,1]).left_normal_form()
100 loops, best of 3: 2.16 ms per loop
sage: %timeit B5([1,-4,2,-3,2,1,2]).left_normal_form()
100 loops, best of 3: 5.06 ms per loop
sage: %timeit B5([1,2,4,1,-3,-1,2,1,-3]).left_normal_form()
100 loops, best of 3: 6.29 ms per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([1,2,3,4,5]))
10000 loops, best of 3: 46.6 us per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([3,1,4,2,5]))
10000 loops, best of 3: 50.9 us per loop
sage: %timeit B5._permutation_braid_Tietze(Permutation([5,4,3,2,1]))
10000 loops, best of 3: 58.8 us per loop
}}}
If you are wondering why `B5.one().permutation()` is taking that long...
well, it used to give the identity permutation in the `0`-th symmetric
group; now it gives that in the `5`-th symmetric group. I think the latter
makes more sense.
----
New commits:
||[[http://git.sagemath.org/sage.git/commit/?id=a7c6f73|a7c6f73]]||{{{various
changes to sage/groups/braid.py, mostly to make it less dependent on the
global variable governing product order of multiplications}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/15577#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.