Efficient Seeds Computation Revisited

The notion of the cover is a generalization of a period of a string, and there are linear time algorithms for finding the shortest cover. The seed is a more complicated generalization of periodicity, it is a cover of a superstring of a given string, and the shortest seed problem is of much higher algorithmic difficulty. The problem is not well understood, no linear time algorithm is known. In the paper we give linear time algorithms for some of its versions -- computing shortest left-seed array, longest left-seed array and checking for seeds of a given length. The algorithm for the last problem is used to compute the seed array of a string (i.e., the shortest seeds for all the prefixes of the string) in O(n2) time. We describe also a simpler alternative algorithm computing efficiently the shortest seeds. As a by-product we obtain an O(n log (n/m)) time algorithm checking if the shortest seed has length at least m and finding the corresponding seed. We also correct some important details missing in the previously known shortest-seed algorithm (Iliopoulos et al., 1996).

[1]  Wojciech Rytter,et al.  Extracting Powers and Periods in a String from Its Runs Structure , 2010, SPIRE.

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

[3]  Kunihiko Sadakane,et al.  Succinct data structures for flexible text retrieval systems , 2007, J. Discrete Algorithms.

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

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

[6]  Robert E. Tarjan,et al.  A Linear-Time Algorithm for a Special Case of Disjoint Set Union , 1985, J. Comput. Syst. Sci..

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

[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]  Costas S. Iliopoulos,et al.  Covering a String , 1993, CPM.

[11]  Christian N. S. Pedersen,et al.  Finding Maximal Quasiperiodicities in Strings , 1999, CPM.

[12]  S. Griffis EDITOR , 1997, Journal of Navigation.

[13]  Volker Heun,et al.  A New Succinct Representation of RMQ-Information and Improvements in the Enhanced Suffix Array , 2007, ESCAPE.

[14]  Wojciech Rytter,et al.  Jewels of stringology , 2002 .

[15]  Alberto Apostolico,et al.  Of Periods, Quasiperiods, Repetitions and Covers , 1997, Structures in Logic and Computer Science.

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

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

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