Longest Lyndon Substring After Edit

The longest Lyndon substring of a string T is the longest substring of T which is a Lyndon word. LLS(T) denotes the length of the longest Lyndon substring of a string T. In this paper, we consider computing LLS(T') where T' is an edited string formed from T. After O(n) time and space preprocessing, our algorithm returns LLS(T') in O(log n) time for any single character edit. We also consider a version of the problem with block edits, i.e., a substring of T is replaced by a given string of length l. After O(n) time and space preprocessing, our algorithm returns LLS(T') in O(l log sigma + log n) time for any block edit where sigma is the number of distinct characters in T. We can modify our algorithm so as to output all the longest Lyndon substrings of T' for both problems.

[1]  Maxime Crochemore,et al.  Two-way string-matching , 1991, JACM.

[2]  Hideo Bannai,et al.  Faster Lyndon factorization algorithms for SLP and LZ78 compressed text , 2016, Theor. Comput. Sci..

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

[4]  M. Crochemore,et al.  On-line construction of suffix trees , 2002 .

[5]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

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

[7]  Julien Clément,et al.  The standard factorization of Lyndon words: an average point of view , 2005, Discret. Math..

[8]  Hideo Bannai,et al.  On Reverse Engineering the Lyndon Tree , 2017, Stringology.

[9]  Frantisek Franek,et al.  Algorithms to Compute the Lyndon Array , 2016, Stringology.

[10]  Filippo Mignosi,et al.  Simple real-time constant-space string matching , 2011, Theor. Comput. Sci..

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

[12]  Costas S. Iliopoulos,et al.  Longest Common Factor After One Edit Operation , 2017, SPIRE.

[13]  R. Lyndon,et al.  Free Differential Calculus, IV. The Quotient Groups of the Lower Central Series , 1958 .

[14]  R. Lyndon On Burnside’s problem , 1954 .

[15]  Maxime Crochemore,et al.  Fast parallel Lyndon factorization with applications , 1995, Mathematical systems theory.

[16]  Frantisek Franek,et al.  Reconstructing a string from its Lyndon arrays , 2017, Theor. Comput. Sci..

[17]  Christophe Reutenauer,et al.  Lyndon words, permutations and trees , 2003, Theor. Comput. Sci..

[18]  Eric Rivals,et al.  STAR: an algorithm to Search for Tandem Approximate Repeats , 2004, Bioinform..

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

[20]  Kazuya Tsuruta,et al.  The "Runs" Theorem , 2017, SIAM J. Comput..

[21]  Dina Sokol,et al.  Succinct 2D Dictionary Matching , 2012, Algorithmica.

[22]  Costas S. Iliopoulos,et al.  Parallel RAM Algorithms for Factorizing Words , 1994, Theor. Comput. Sci..