Advertisement

Longest \(\alpha \)-Gapped Repeat and Palindrome

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9210)

Abstract

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.

Keywords

Basic Factor Suffix Tree Input Word Suffix Array Common Prefix 
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.

References

  1. 1.
    Bannai, H., Tomohiro, I., Inenaga, S., Nakashima, Y., Takeda, M., Tsuruta, K.: A new characterization of maximal repetitions by lyndon trees. In: Proceedings of the SODA, pp. 562–571 (2015)Google Scholar
  2. 2.
    Brodal, G.S., Lyngsø, R.B., Pedersen, C.N.S., Stoye, J.: Finding maximal pairs with bounded gap. In: Crochemore, M., Paterson, M. (eds.) CPM 1999. LNCS, vol. 1645, pp. 134–149. Springer, Heidelberg (1999) CrossRefGoogle Scholar
  3. 3.
    Crochemore, M.: An optimal algorithm for computing the repetitions in a word. Inf. Process. Lett. 12(5), 244–250 (1981)CrossRefMathSciNetMATHGoogle Scholar
  4. 4.
    Crochemore, M., Iliopoulos, C.S., Kubica, M., Rytter, W., Waleń, T.: Efficient algorithms for two extensions of LPF table: the power of suffix arrays. In: van Leeuwen, J., Muscholl, A., Peleg, D., Pokorný, J., Rumpe, B. (eds.) SOFSEM 2010. LNCS, vol. 5901, pp. 296–307. Springer, Heidelberg (2010) CrossRefGoogle Scholar
  5. 5.
    Crochemore, M., Rytter, W.: Usefulness of the Karp-Miller-Rosenberg algorithm in parallel computations on strings and arrays. Theoret. Comput. Sci. 88(1), 59–82 (1991). http://dx.doi.org/10.1016/0304-3975(91)90073-B CrossRefMathSciNetMATHGoogle Scholar
  6. 6.
    Crochemore, M., Tischler, G.: Computing longest previous non-overlapping factors. Inf. Process. Lett. 111(6), 291–295 (2011)CrossRefMathSciNetMATHGoogle Scholar
  7. 7.
    Gawrychowski, P.: Pattern matching in Lempel-Ziv compressed strings: fast, simple, and deterministic. In: Demetrescu, C., Halldórsson, M.M. (eds.) ESA 2011. LNCS, vol. 6942, pp. 421–432. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  8. 8.
    Gusfield, D.: Algorithms on strings, trees, and sequences: computer science and computational biology. Cambridge University Press, New York (1997) CrossRefMATHGoogle Scholar
  9. 9.
    Kärkkäinen, J., Sanders, P., Burkhardt, S.: Linear work suffix array construction. J. ACM 53, 918–936 (2006)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Kociumaka, T., Radoszewski, J., Rytter, W., Waleń, T.: Efficient data structures for the factor periodicity problem. In: Calderón-Benavides, L., González-Caro, C., Chávez, E., Ziviani, N. (eds.) SPIRE 2012. LNCS, vol. 7608, pp. 284–294. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  11. 11.
    Kolpakov, R., Kucherov, G.: Finding maximal repetitions in a word in linear time. In: Proceedings of the FOCS, pp. 596–604 (1999)Google Scholar
  12. 12.
    Kolpakov, R., Kucherov, G.: Searching for gapped palindromes. Theor. Comput. Sci. 410(51), 5365–5373 (2009)CrossRefMathSciNetMATHGoogle Scholar
  13. 13.
    Kolpakov, R., Podolskiy, M., Posypkin, M., Khrapov, N.: Searching of gapped repeats and subrepetitions in a word. In: Kulikov, A.S., Kuznetsov, S.O., Pevzner, P. (eds.) CPM 2014. LNCS, vol. 8486, pp. 212–221. Springer, Heidelberg (2014) Google Scholar
  14. 14.
    Kolpakov, R.M., Kucherov, G.: Finding repeats with fixed gap. In: Proceedings of the SPIRE, pp. 162–168 (2000)Google Scholar
  15. 15.
    Manacher, G.K.: A new linear-time on-line algorithm for finding the smallest initial palindrome of a string. J. ACM 22(3), 346–351 (1975)CrossRefMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Institute of InformaticsUniversity of WarsawWarsawPoland
  2. 2.Department of Computer ScienceKiel UniversityKielGermany

Personalised recommendations