Skip to main content

Counting and Verifying Maximal Palindromes

  • Conference paper
String Processing and Information Retrieval (SPIRE 2010)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 6393))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Allouche, J.P., Baake, M., Cassaigne, J., Damanik, D.: Palindrome complexity. Theoretical Computer Science 292(1), 9–31 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  2. Anisiu, M.C., Anisiu, V., Kása, Z.: Total palindrome complexity of finite words. Discrete Mathematics 310(1), 109–114 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  3. Apostolico, A., Breslauer, D., Galil, Z.: Optimal parallel algorithms for periods, palindromes and squares. In: Kuich, W. (ed.) ICALP 1992. LNCS, vol. 623, pp. 296–307. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  4. Apostolico, A., Breslauer, D., Galil, Z.: Parallel detection of all palindromes in a string. Theoretical Computer Science 141, 163–173 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  5. Baker, B.S.: Parameterized pattern matching: Algorithms and applications. Journal of Computer and System Sciences 52(1), 28–42 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  6. Bannai, H., Inenaga, S., Shinohara, A., Takeda, M.: Inferring strings from graphs and arrays. In: Rovan, B., Vojtáš, P. (eds.) MFCS 2003. LNCS, vol. 2747, pp. 208–217. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Breslauer, D., Galil, Z.: Finding all periods and initial palindromes of a string in parallel. Algorithmica 14(4), 355–366 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  8. Clément, J., Crochemore, M., Rindone, G.: Reverse engineering prefix tables. In: Proc. STACS 2009, pp. 289–300 (2009)

    Google Scholar 

  9. Crochemore, M., Iliopoulos, C., Pissis, S., Tischler, G.: Cover array string reconstruction. In: Amir, A., Parida, L. (eds.) Combinatorial Pattern Matching. LNCS, vol. 6129, pp. 251–259. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  10. Currie, J.D.: Palindrome positions in ternary square-free words. Theoretical Computer Science 396(1-3), 254–257 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  11. Droubay, X.: Palindromes in the Fibonacci word. Information Processing Letters 55(4), 217–221 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  12. Droubay, X., Pirillo, G.: Palindromes and Sturmian words. Theoretical Computer Science 223(1-2), 73–85 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  13. Duval, J.P., Lecroq, T., Lefebvre, A.: Efficient validation and construction of border arrays and validation of string matching automata. RAIRO - Theoretical Informatics and Applications 43(2), 281–297 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  14. Duval, J.P., Lecroq, T., Lefevre, A.: Border array on bounded alphabet. Journal of Automata, Languages and Combinatorics 10(1), 51–60 (2005)

    MathSciNet  MATH  Google Scholar 

  15. Duval, J.P., Lefebvre, A.: Words over an ordered alphabet and suffix permutations. Theoretical Informatics and Applications 36, 249–259 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  16. Franek, F., Gao, S., Lu, W., Ryan, P.J., Smyth, W.F., Sun, Y., Yang, L.: Verifying a border array in linear time. J. Comb. Math. and Comb. Comp. 42, 223–236 (2002)

    MathSciNet  MATH  Google Scholar 

  17. Gasieniec, L., Karpinski, M., Plandowski, W., Rytter, W.: Efficient algorithms for Lempel-Ziv encoding. In: Karlsson, R., Lingas, A. (eds.) SWAT 1996. LNCS, vol. 1097, pp. 392–403. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  18. Gawrychowski, P., Jez, A., Jez, L.: Validating the Knuth-Morris-Pratt failure function, fast and online. In: Ablayev, F., Mayr, E.W. (eds.) Computer Science – Theory and Applications. LNCS, vol. 6072, pp. 132–143. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  19. Glen, A.: Occurrences of palindromes in characteristic Sturmian words. Theoretical Computer Science 352(1), 31–46 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  20. Gusfield, D.: Algorithms on Strings, Trees, and Sequences. Cambridge University Press, New York (1997)

    Book  MATH  Google Scholar 

  21. 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)

    Chapter  Google Scholar 

  22. I, T., Inenaga, S., Bannai, H., Takeda, M.: Counting parameterized border arrays for a binary alphabet. In: Dediu, A.H., Ionescu, A.M., Martín-Vide, C. (eds.) LATA 2009. LNCS, vol. 5457, pp. 422–433. Springer, Heidelberg (2009)

    Google Scholar 

  23. I, T., Inenaga, S., Bannai, H., Takeda, M.: Verifying a parameterized border array in O(n 1.5) time. In: Amir, A., Parida, L. (eds.) Combinatorial Pattern Matching. LNCS, vol. 6129, pp. 238–250. Springer, Heidelberg (2010)

    Google Scholar 

  24. Knuth, D.E., Morris, J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  25. Kolpakov, R., Kucherov, G.: Searching for gapped palindromes. Theoretical Computer Science 410(51), 5365–5373 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  26. de Luca, A., Luca, A.D.: Palindromes in Sturmian words. In: De Felice, C., Restivo, A. (eds.) DLT 2005. LNCS, vol. 3572, pp. 199–208. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  27. 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)

    Article  MATH  Google Scholar 

  28. Matsubara, W., Inenaga, S., Ishino, A., Shinohara, A., Nakamura, T., Hashimoto, K.: Efficient algorithms to compute compressed longest common substrings and compressed palindromes. Theoretical Computer Science 410(8–10), 900–913 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  29. Moore, D., Smyth, W.F., Miller, D.: Counting distinct strings. Algorithmica 23(1), 1–13 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  30. Porto, A.H.L., Barbosa, V.C.: Finding approximate palindromes in strings. Pattern Recognition 35(11), 2581–2591 (2002)

    Article  MATH  Google Scholar 

  31. Schürmann, K.B., Stoye, J.: Counting suffix arrays and strings. Theoretical Computer Science 395(2-1), 220–234 (2008)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

I, T., Inenaga, S., Bannai, H., Takeda, M. (2010). Counting and Verifying Maximal Palindromes. In: Chavez, E., Lonardi, S. (eds) String Processing and Information Retrieval. SPIRE 2010. Lecture Notes in Computer Science, vol 6393. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16321-0_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-16321-0_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-16320-3

  • Online ISBN: 978-3-642-16321-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics