Palindrome Pattern Matching

  • Tomohiro I.
  • Shunsuke Inenaga
  • Masayuki Takeda
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6661)


A palindrome is a string that reads the same forward and backward. For a string x, let Pals(x) be the set of all maximal palindromes of x, where each maximal palindrome in Pals(x) is encoded by a pair (c, r) of its center c and its radius r. Given a text t of length n and a pattern p of length m, the palindrome pattern matching problem is to compute all positions i of t such that Pals(p) = Pals(t[i:i + m − 1]). We present linear-time algorithms to solve this problem.


Linear Time Active Point Edge Label Empty String Alphabet Size 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Allouche, J.P., Baake, M., Cassaigne, J., Damanik, D.: Palindrome complexity. Theoretical Computer Science 292(1), 9–31 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  2. 2.
    Anisiu, M.C., Anisiu, V., Kása, Z.: Total palindrome complexity of finite words. Discrete Mathematics 310(1), 109–114 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Baker, B.S.: Parameterized pattern matching: Algorithms and applications. Journal of Computer and System Sciences 52(1), 28–42 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Brlek, S., Hamel, S., Nivat, M., Reutenauer, C.: On the palindromic complexity of infinite words. International Journal of Foundations of Computer Science 15(2), 293–306 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Burrows, M., Wheeler, D.J.: A block-sorting lossless data compression algorithm. Tech. rep., DIGITAL System Research Center (1994)Google Scholar
  6. 6.
    Droubay, X., Justin, J., Pirillo, G.: Episturmian words and some constructions of de Luca and Rauzy. Theoretical Computer Science 255(1–2), 539–553 (2001)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Glen, A., Justin, J., Widmer, S., Zamboni, L.Q.: Palindromic richness. European Journal of Combinatorics 30(2), 510–531 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Groult, R., Prieur, É., Richomme, G.: Counting distinct palindromes in a word in linear time. Information Processing Letters 110(20), 908–912 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Gusfield, D.: Algorithms on Strings, Trees, and Sequences. Cambridge University Press, New York (1997)CrossRefzbMATHGoogle Scholar
  10. 10.
    Hsu, P.H., Chen, K.Y., Chao, K.M.: Finding all approximate gapped palindromes. In: Dong, Y., Du, D.-Z., Ibarra, O. (eds.) ISAAC 2009. LNCS, vol. 5878, pp. 1084–1093. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    I, T., Inenaga, S., Bannai, H., Takeda, M.: Counting and verifying maximal palindromes. In: Chavez, E., Lonardi, S. (eds.) SPIRE 2010. LNCS, vol. 6393, pp. 135–146. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  12. 12.
    Kolpakov, R., Kucherov, G.: Searching for gapped palindromes. Theoretical Computer Science 410(51), 5365–5373 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Manacher, G.: A new linear-time “on-line” algorithm for finding the smallest initial palindrome of a string. Journal of the ACM 22(3), 346–351 (1975)CrossRefzbMATHGoogle Scholar
  14. 14.
    Massé, A.B., Brlek, S., Frosini, A., Labbé, S., Rinaldi, S.: Reconstructing words from a fixed palindromic length sequence. Proc. TCS 2008. IFIP 273, 101–114 (2008)MathSciNetGoogle Scholar
  15. 15.
    Morris, J.H., Pratt, V.R.: A linear pattern-matching algorithm. Tech. Rep. 40, University of California, Berkeley (1970)Google Scholar
  16. 16.
    Restivo, A., Rosone, G.: Burrows-Wheeler transform and palindromic richness. Theoretical Computer Science 410(30–32), 3018–3026 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Ukkonen, E.: On-line construction of suffix trees. Algorithmica 14(3), 249–260 (1995)MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Tomohiro I.
    • 1
  • Shunsuke Inenaga
    • 2
  • Masayuki Takeda
    • 1
  1. 1.Department of InformaticsKyushu UniversityNishikuJapan
  2. 2.Graduate School of Information Science and Electrical EngineeringKyushu UniversityNishikuJapan

Personalised recommendations