Longest α-Gapped Repeat and Palindrome

We propose an efficient algorithm finding, for a word w and an integer \(\alpha >0\), the longest word u such that w has a factor uvu, with \(|uv|\le \alpha |u|\) (i.e., the longest \(\alpha \)-gapped repeat of w). Our algorithm runs in \({\mathcal O}(\alpha n)\) time. Moreover, it can be easily adapted to find the longest u such that w has a factor \(u^Rvu\), with \(|uv|\le \alpha |u|\) (i.e., the longest \(\alpha \)-gapped palindrome), again in \({\mathcal O}(\alpha n)\) time.

[1]  Wojciech Rytter,et al.  Efficient Algorithms for Two Extensions of LPF Table: The Power of Suffix Arrays , 2010, SOFSEM.

[2]  Dan Gusfield,et al.  Algorithms on Strings, Trees, and Sequences - Computer Science and Computational Biology , 1997 .

[3]  Gregory Kucherov,et al.  Finding maximal repetitions in a word in linear time , 1999, 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039).

[4]  Kazuya Tsuruta,et al.  A new characterization of maximal repetitions by Lyndon trees , 2015, SODA.

[5]  Wojciech Rytter,et al.  Efficient Data Structures for the Factor Periodicity Problem , 2012, SPIRE.

[6]  Gregory Kucherov,et al.  Searching for gapped palindromes , 2008, Theor. Comput. Sci..

[7]  Jens Stoye,et al.  Finding Maximal Pairs with Bounded Gap , 1999, CPM.

[8]  Maxime Crochemore,et al.  Computing Longest Previous non-overlapping Factors , 2011, Inf. Process. Lett..

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

[10]  Mikhail Posypkin,et al.  Searching of Gapped Repeats and Subrepetitions in a Word , 2014, CPM.

[11]  Gregory Kucherov,et al.  Finding repeats with fixed gap , 2000, Proceedings Seventh International Symposium on String Processing and Information Retrieval. SPIRE 2000.

[12]  Wojciech Rytter,et al.  Usefulness of the Karp-Miller-Rosenberg Algorithm in Parallel Computations on Strings and Arrays , 1991, Theor. Comput. Sci..

[13]  Peter Sanders,et al.  Linear work suffix array construction , 2006, JACM.

[14]  Glenn K. Manacher,et al.  A New Linear-Time ``On-Line'' Algorithm for Finding the Smallest Initial Palindrome of a String , 1975, JACM.

[15]  Pawel Gawrychowski,et al.  Pattern Matching in Lempel-Ziv Compressed Strings: Fast, Simple, and Deterministic , 2011, ESA.