#13972: Implement the inverse of the method area_dinv_to_bounce_area_map in
dyck_word.py
---------------------------------+------------------------------------------
Reporter: zabrocki | Owner: zabrocki
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-5.7
Component: combinatorics | Resolution:
Keywords: dyck_words | Work issues:
Report Upstream: N/A | Reviewers:
Authors: zabrocki | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Changes (by zabrocki):
* cc: stumpc5 (added)
Old description:
> In ticket #13550 we implemented Haglund's map which sends dinv/area to
> area/bounce but did not implement the inverse. This ticket adds the
> method bounce_area_to_area_dinv_map to dyck_word.py. The map
> area_dinv_to_bounce_area_map is also modified and made slightly shorter.
New description:
In ticket #13550 we implemented Haglund's map which sends dinv/area to
area/bounce but did not implement the inverse. This ticket adds the
method bounce_area_to_area_dinv_map to dyck_word.py.
--
Comment:
I restored the code for {{{area_dinv_to_bounce_area_map}}} because of the
following timing tests.
Original:
{{{
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(8)]')
5 loops, best of 3: 62.3 ms per loop
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(9)]')
5 loops, best of 3: 220 ms per loop
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(10)]')
5 loops, best of 3: 793 ms per loop
}}}
My version:
{{{
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(8)]')
5 loops, best of 3: 82.2 ms per loop
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(9)]')
5 loops, best of 3: 303 ms per loop
sage: timeit('[D.area_dinv_to_bounce_area_map() for D in DyckWords(10)]')
5 loops, best of 3: 1.1 s per loop
}}}
The difference is probably due to the fact that my version had to call
{{{to_area_sequence}}} and then output the {{{DyckWord}}} using the area
sequence that it constructed.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13972#comment:2>
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.