Counting and verifying maximal palindromes

  • Authors:
  • I. Tomohiro;Shunsuke Inenaga;Hideo Bannai;Masayuki Takeda

  • Affiliations:
  • Department of Informatics, Kyushu University;Graduate School of Information Science and Electrical Engineering, Kyushu University, Fukuoka, Japan;Department of Informatics, Kyushu University;Department of Informatics, Kyushu University

  • Venue:
  • SPIRE'10 Proceedings of the 17th international conference on String processing and information retrieval
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

A palindrome is a symmetric string that reads the same forward and backward. Let Pals(w) denote the set of maximal palindromes of a string w in which each palindrome is represented by a pair (c, r), where c is the center and r is the radius of the palindrome. We say that two strings w and z are pal-distinct if Pals(w) ≠ Pals(z). Firstly, we describe the number of pal-distinct strings, and show that we can enumerate all pal-distinct strings in time linear in the output size, for alphabets of size at most 3. These results follow from a close relationship between maximal palindromes and parameterized matching. Secondly, we present a linear time algorithm which finds a string w such that Pals(w) is identical to a given set of maximal palindromes.