The sequence of open and closed prefixes of a Sturmian word

A finite word is closed if it contains a factor that occurs both as a prefix and as a suffix but does not have internal occurrences, otherwise it is open. We are interested in the {\it oc-sequence} of a word, which is the binary sequence whose $n$-th element is $0$ if the prefix of length $n$ of the word is open, or $1$ if it is closed. We exhibit results showing that this sequence is deeply related to the combinatorial and periodic structure of a word. In the case of Sturmian words, we show that these are uniquely determined (up to renaming letters) by their oc-sequence. Moreover, we prove that the class of finite Sturmian words is a maximal element with this property in the class of binary factorial languages. We then discuss several aspects of Sturmian words that can be expressed through this sequence. Finally, we provide a linear-time algorithm that computes the oc-sequence of a finite word, and a linear-time algorithm that reconstructs a finite Sturmian word from its oc-sequence.

[1]  Aldo de Luca,et al.  Periodic-like words, periodicity, and boxes , 2001, Acta Informatica.

[2]  Aldo de Luca,et al.  Some characterizations of finite Sturmian words , 2006, Theor. Comput. Sci..

[3]  J. Karhumäki,et al.  ALGEBRAIC COMBINATORICS ON WORDS (Encyclopedia of Mathematics and its Applications 90) By M. LOTHAIRE: 504 pp., 60.00, ISBN 0 521 81220 8 (Cambridge University Press, 2002) , 2003 .

[4]  Filippo Mignosi,et al.  Some Combinatorial Properties of Sturmian Words , 1994, Theor. Comput. Sci..

[5]  M. Lothaire Applied Combinatorics on Words (Encyclopedia of Mathematics and its Applications) , 2005 .

[6]  Stéphane Fischler Palindromic prefixes and episturmian words , 2006, J. Comb. Theory, Ser. A.

[7]  Jean Berstel,et al.  Sturmian and episturmian words: a survey of some recent results , 2007 .

[8]  Aldo de Luca,et al.  Some extremal Properties of the Fibonacci Word , 2012, Int. J. Algebra Comput..

[9]  M. Lothaire,et al.  Algebraic Combinatorics on Words: Index of Notation , 2002 .

[10]  Zsuzsanna Lipták,et al.  On the Number of Closed Factors in a Word , 2015, LATA.

[11]  Gabriele Fici,et al.  A Classification of Trapezoidal Words , 2011, WORDS.

[12]  Gabriele Fici,et al.  Factorizations of the Fibonacci Infinite Word , 2015, J. Integer Seq..

[13]  Gabriele Fici,et al.  On the structure of bispecial Sturmian words , 2013, J. Comput. Syst. Sci..

[14]  Costas S. Iliopoulos,et al.  Closed Factorization , 2014, Stringology.

[15]  M. Lothaire Algebraic Combinatorics on Words , 2002 .

[16]  Peter Weiner,et al.  Linear Pattern Matching Algorithms , 1973, SWAT.

[17]  Jean Berstel,et al.  Sturmian and Episturmian Words , 2007, CAI.

[18]  Gabriele Fici,et al.  Open and Closed Prefixes of Sturmian Words , 2013, WORDS.

[19]  Luca Q. Zamboni,et al.  Palindromic richness , 2008, Eur. J. Comb..

[20]  Gabriele Fici,et al.  Enumeration and structure of trapezoidal words , 2012, Theor. Comput. Sci..

[21]  Aldo de Luca,et al.  Rich and Periodic-Like Words , 2009, Developments in Language Theory.