#12150: upgrade defect() of a finite word
---------------------------------+------------------------------------------
   Reporter:  sstarosta          |          Owner:  sstarosta                   
                     
       Type:  enhancement        |         Status:  needs_review                
                     
   Priority:  trivial            |      Milestone:  sage-4.8                    
                     
  Component:  combinatorics      |       Keywords:  finite word, defect, 
palindrome, pseudopalindrome
Work_issues:                     |       Upstream:  N/A                         
                     
   Reviewer:  Vincent Delecroix  |         Author:  Stepan Starosta             
                     
     Merged:                     |   Dependencies:                              
                     
---------------------------------+------------------------------------------

Comment(by sstarosta):

 Hi Sébastien,

 thanks for the comment.

 >  On two letters a and b, am I right to say that abababab... and
 babababab... are the only two words that are E-full where E is the
 exchange of a and b?

 Yes. To have finite defect implies some other properties, for instance,
 there have to be overlaps at some point (in the infinite word).


 > This is already done by the method lacunas (from which you can
 regenerate the above list of repeated numbers). A lacuna is a position
 where there are no new palindrome finishing there or equivalently, the
 defect goes up by one. Here are some examples from the doctests :
 >
 > {{{
 > sage: w = Word([0,1,1,2,3,4,5,1,13,3])
 > sage: w.lacunas()
 > [7, 9]
 > sage: words.ThueMorseWord()[:100].lacunas()
 > [8, 9, 24, 25, 32, 33, 34, 35, 36, 37, 38, 39, 96, 97, 98, 99]
 > sage: f = WordMorphism({0:[1],1:[0]})
 > sage: words.ThueMorseWord()[:50].lacunas(f)
 > [0, 2, 4, 12, 16, 17, 18, 19, 48, 49]
 > }}}

 Ok, thanks! I forgot about that. I should maybe update the comment in that
 method also and check if it works fine with the modifications done.

 > Stepan, could you please post a another patch which would replace the
 third and that would apply on the first two and that would contain only
 modification made without merge?

 My bad, I will do it as you suggest, I can replace the file so it should
 be fine.

 Thanks,
 Stepan

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12150#comment:10>
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.

Reply via email to