Computing k-th Lyndon Word and Decoding Lexicographically Minimal de Bruijn Sequence

Let Σ be a finite ordered alphabet. We present polynomial-time algorithms for computing the k-th in the lexicographic order Lyndon word of a given length n over Σ and counting Lyndon words of length n that are smaller than a given word. We also use the connections between Lyndon words and minimal de Bruijn sequences (theorem of Fredricksen and Maiorana) to develop the first polynomial time algorithm for decoding minimal de Bruijn sequence of any rank n (it determines the position of an arbitrary word of length n within the de Bruijn sequence). Our tools mostly rely on combinatorics on words and automata theory.

[1]  Harold Fredricksen,et al.  An algorithm for generating necklaces of beads in two colors , 1986, Discret. Math..

[2]  Kenneth G. Paterson,et al.  A method for constructing decodable de Bruijn sequences , 1996, IEEE Trans. Inf. Theory.

[3]  Marcin Mucha,et al.  Lyndon Words and Short Superstrings , 2012, SODA.

[4]  Donald E. Knuth,et al.  The Art of Computer Programming, Volume 4, Fascicle 2: Generating All Tuples and Permutations (Art of Computer Programming) , 2005 .

[5]  Antonio Restivo,et al.  Suffixes, Conjugates and Lyndon Words , 2013, Developments in Language Theory.

[6]  Jean-Pierre Duval,et al.  Generation of a section of conjugation classes and Lyndon word tree of limited length , 1988 .

[7]  Wojciech Rytter,et al.  Text Algorithms , 1994 .

[8]  David Thomas,et al.  The Art in Computer Programming , 2001 .

[9]  Wojciech Rytter,et al.  Extracting powers and periods in a word from its runs structure , 2014, Theor. Comput. Sci..

[10]  Frank Ruskey,et al.  Generating Necklaces , 1992, J. Algorithms.

[11]  Jonathan Tuliani De Bruijn sequences with efficient decoding algorithms , 2001, Discret. Math..

[12]  Fan Chung Graham,et al.  Universal cycles for combinatorial structures , 1992, Discret. Math..

[13]  Jean-Pierre Duval,et al.  Génération d'une Section des Classes de Conjugaison et Arbre des Mots de Lyndon de Longueur Bornée , 1988, Theor. Comput. Sci..

[14]  Jean Pierre Duval,et al.  Factorizing Words over an Ordered Alphabet , 1983, J. Algorithms.

[15]  Tero Harju,et al.  Combinatorics on Words , 2004 .

[16]  Harold Fredricksen,et al.  Necklaces of beads in k colors and k-ary de Bruijn sequences , 1978, Discret. Math..

[17]  Grzegorz Rozenberg,et al.  Developments in Language Theory II , 2002 .