On left and right seeds of a string

We consider the problem of finding the repetitive structure of a given string y of length n. A factor u of y is a cover of y, if every letter of y lies within some occurrence of u in y. A string v is a seed of y, if it is a cover of a superstring of y. A left seed of y is a prefix of y, that is a cover of a superstring of y. Similarly, a right seed of y is a suffix of y, that is a cover of a superstring of y. An integer array LS is the minimal left-seed (resp. maximal left-seed) array of y, if LS[i] is the minimal (resp. maximal) length of left seeds of y[0..i]. The minimal right-seed (resp. maximal right-seed) arrayRS of y is defined in a similar fashion. In this article, we present linear-time algorithms for computing all left and right seeds of y, a linear-time algorithm for computing the minimal left-seed array of y, a linear-time solution for computing the maximal left-seed array of y, an O(nlogn)-time algorithm for computing the minimal right-seed array of y, and a linear-time solution for computing the maximal right-seed array of y. All algorithms use linear auxiliary space.

[1]  M. Crochemore,et al.  Algorithms on Strings: Tools , 2007 .

[2]  Arnaud Lefebvre,et al.  Border Array on Bounded Alphabet , 2002, Stringology.

[3]  William F. Smyth,et al.  An Optimal Algorithm to Compute all the Covers of a String , 1994, Inf. Process. Lett..

[4]  Maxime Crochemore,et al.  An Optimal Algorithm for Computing the Repetitions in a Word , 1981, Inf. Process. Lett..

[5]  Costas S. Iliopoulos,et al.  The subtree max gap problem with application to parallel string covering , 1994, SODA '94.

[6]  M. Lothaire,et al.  Applied Combinatorics on Words , 2005 .

[7]  Wojciech Rytter,et al.  Efficient Seeds Computation Revisited , 2011, CPM.

[8]  Dany Breslauer,et al.  An On-Line String Superprimitivity Test , 1992, Inf. Process. Lett..

[9]  Yin Li,et al.  Computing the Cover Array in Linear Time , 2001, Algorithmica.

[10]  Maxime Crochemore,et al.  On the Right-Seed Array of a String , 2011, COCOON.

[11]  Maxime Crochemore,et al.  Algorithms on strings , 2007 .

[12]  Costas S. Iliopoulos,et al.  A Work-Time Optimal Algorithm for Computing All String Covers , 1996, Theor. Comput. Sci..

[13]  Frantisek Franek,et al.  Reconstructing a Suffix Array , 2006, Int. J. Found. Comput. Sci..

[14]  Wojciech Rytter,et al.  A Linear-Time Algorithm for Seeds Computation , 2011, SODA.

[15]  William F. Smyth,et al.  A Correction to "An Optimal Algorithm to Compute all the Covers of a String" , 1995, Inf. Process. Lett..

[16]  Maxime Crochemore,et al.  Reverse Engineering Prefix Tables , 2009, STACS.

[17]  Costas S. Iliopoulos,et al.  Covering a string , 2005, Algorithmica.

[18]  Andrzej Ehrenfeucht,et al.  Efficient Detection of Quasiperiodicities in Strings , 1993, Theor. Comput. Sci..

[19]  W. F. Smyth,et al.  Verifying a border array in linear time , 1999 .

[20]  Donald E. Knuth,et al.  Fast Pattern Matching in Strings , 1977, SIAM J. Comput..

[21]  Costas S. Iliopoulos,et al.  Optimal Superprimitivity Testing for Strings , 1991, Inf. Process. Lett..

[22]  Ayumi Shinohara,et al.  Inferring Strings from Graphs and Arrays , 2003, MFCS.