Palindrome Recognition In The Streaming Model

A palindrome is defined as a string which reads forwards the same as backwards, like, for example, the string "racecar". In the Palindrome Problem, one tries to find all palindromes in a given string. In contrast, in the case of the Longest Palindromic Substring Problem, the goal is to find an arbitrary one of the longest palindromes in the string. In this paper we present three algorithms in the streaming model for the the above problems, where at any point in time we are only allowed to use sublinear space. We first present a one-pass randomized algorithm that solves the Palindrome Problem. It has an additive error and uses square root of n space. We also give two variants of the algorithm which solve related and practical problems. The second algorithm determines the exact locations of all longest palindromes using two passes and square root of n space. The third algorithm is a one-pass randomized algorithm, which solves the Longest Palindromic Substring Problem. It has a multiplicative error using only O(log(n)) space.

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

[2]  Richard M. Karp,et al.  Efficient Randomized Pattern-Matching Algorithms , 1987, IBM J. Res. Dev..

[3]  David Sankoff,et al.  RNA secondary structures and their prediction , 1984 .

[4]  M. Giel-Pietraszuk,et al.  Palindromes in Proteins , 2003, Journal of protein chemistry.

[5]  C. E. SHANNON,et al.  A mathematical theory of communication , 1948, MOCO.

[6]  Russ Bubley,et al.  Randomized algorithms , 1995, CSUR.

[7]  Zvi Galil,et al.  Real-Time Streaming String-Matching , 2014, TALG.

[8]  Ely Porat,et al.  Exact and Approximate Pattern Matching in the Streaming Model , 2009, 2009 50th Annual IEEE Symposium on Foundations of Computer Science.

[9]  Zvi Galil,et al.  Parallel Detection of all Palindromes in a String , 1994, STACS.

[10]  Funda Ergün,et al.  Periodicity in Streams , 2010, APPROX-RANDOM.