Florent Hivert <[email protected]> writes:

> On Tue, Jun 07, 2011 at 06:16:09PM +0200, Martin Rubey wrote:
>> Anne Schilling <[email protected]> writes:
>> 
>> >> Sure; Sorry for the typo. Here is what my current code does:
>> >>
>> >> sage: for i in DyckWords(3):
>> >> ....:     print i, i.return_to_zero()
>> >> ....:
>> >> /\/\/\ [0, 2, 4, 6]
>> >>     /\
>> >> /\/  \ [0, 2, 6]
>> >>   /\
>> >> /  \/\ [0, 4, 6]
>> >>   /\/\
>> >> /    \ [0, 6]
>> >>    /\
>> >>   /  \
>> >> /    \ [0, 6]
>> >>
>> >
>> > position_of_zeroes?
>> 
>> I would prefer number_of_returns.
>
> I think you would prefer returns: as you can see this is the position not
> their number that I am computing. Also, I'm not sure including 0 is a good
> idea. 

Ah, yes, I agree.  You certainly want to have [len(D.returns()) for D in
DyckWords] and [D.number_of_initial_rises() for D in DyckWords] to give
the same multiset, so I guess you want to leave out the initial zero.

>> > number_of_initial_rises
>> 
>> Isn't that misleading? Wouldn't it be length_of_initial_rise?  In any
>> case, I know it as height_of_first_peak :-)
>
> I like the idea that many statistic have their name starting by
> number_of_...

Yes, me too, because of tab completion.

> Next question: any one knows a better name for what I name below a Catalan
> code:
>
>         A Catalan code is a list of integer l such that `l_0 = 0` and
>         `0 \leq l_{i+1} \leq l_i + 1` for `i > 0`

Yes. 6.19 u. :-)

Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" 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-combinat-devel?hl=en.

Reply via email to