Efficient Algorithms for Shortest Partial Seeds in Words

  • Tomasz Kociumaka
  • Solon P. Pissis
  • Jakub Radoszewski
  • Wojciech Rytter
  • Tomasz Waleń
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8486)


A factor u of a word w is a cover of w if every position in w lies within some occurrence of u in w. A factor u is a seed of w if it is a cover of a superstring of w. Covers and seeds extend the classical notions of periodicity. We introduce a new notion of α-partial seed, that is, a factor covering as a seed at least α positions in a given word. We use the Cover Suffix Tree, introduced recently in the context of α-partial covers (Kociumaka et al, CPM 2013); an \(\mathcal{O}(n\log n)\)-time algorithm constructing such a tree is known. However it appears that partial seeds are more complicated than partial covers—our algorithms require algebraic manipulations of special functions related to edges of the modified Cover Suffix Tree and the border array. We present an algorithm for computing shortest α-partial seeds that works in \(\mathcal{O}(n)\) time if the Cover Suffix Tree is already given.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apostolico, A., Ehrenfeucht, A.: Efficient detection of quasiperiodicities in strings. Theor. Comput. Sci. 119(2), 247–265 (1993)CrossRefzbMATHMathSciNetGoogle Scholar
  2. 2.
    Apostolico, A., Farach, M., Iliopoulos, C.S.: Optimal superprimitivity testing for strings. Inf. Process. Lett. 39(1), 17–20 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  3. 3.
    Breslauer, D.: An on-line string superprimitivity test. Inf. Process. Lett. 44(6), 345–347 (1992)CrossRefzbMATHMathSciNetGoogle Scholar
  4. 4.
    Christodoulakis, M., Iliopoulos, C.S., Park, K., Sim, J.S.: Approximate seeds of strings. Journal of Automata, Languages and Combinatorics 10(5/6), 609–626 (2005)zbMATHMathSciNetGoogle Scholar
  5. 5.
    Crochemore, M., Ilie, L., Rytter, W.: Repetitions in strings: Algorithms and combinatorics. Theor. Comput. Sci. 410(50), 5227–5235 (2009)CrossRefzbMATHMathSciNetGoogle Scholar
  6. 6.
    Crochemore, M., Rytter, W.: Jewels of Stringology. World Scientific (2003)Google Scholar
  7. 7.
    Iliopoulos, C.S., Moore, D.W.G., Park, K.: Covering a string. Algorithmica 16(3), 288–297 (1996)CrossRefzbMATHMathSciNetGoogle Scholar
  8. 8.
    Kociumaka, T., Kubica, M., Radoszewski, J., Rytter, W., Waleń, T.: A linear time algorithm for seeds computation. In: Rabani, Y. (ed.) SODA, pp. 1095–1112. SIAM (2012)Google Scholar
  9. 9.
    Kociumaka, T., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Fast algorithm for partial covers in words. In: Fischer, J., Sanders, P. (eds.) CPM 2013. LNCS, vol. 7922, pp. 177–188. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  10. 10.
    Kociumaka, T., Pissis, S.P., Radoszewski, J., Rytter, W., Waleń, T.: Fast algorithm for partial covers in words. In: ArXiv e-prints, arXiv:1401.0163 [cs.DS] (December 2013)Google Scholar
  11. 11.
    Li, Y., Smyth, W.F.: Computing the cover array in linear time. Algorithmica 32(1), 95–106 (2002)CrossRefzbMATHMathSciNetGoogle Scholar
  12. 12.
    Moore, D., Smyth, W.F.: An optimal algorithm to compute all the covers of a string. Inf. Process. Lett. 50(5), 239–246 (1994)CrossRefzbMATHMathSciNetGoogle Scholar
  13. 13.
    Sim, J.S., Park, K., Kim, S., Lee, J.: Finding approximate covers of strings. Journal of Korea Information Science Society 29(1), 16–21 (2002)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Tomasz Kociumaka
    • 1
  • Solon P. Pissis
    • 2
  • Jakub Radoszewski
    • 1
  • Wojciech Rytter
    • 1
    • 3
  • Tomasz Waleń
    • 1
  1. 1.Faculty of Mathematics, Informatics and MechanicsUniversity of WarsawWarsawPoland
  2. 2.Department of InformaticsKing’s College LondonLondonUK
  3. 3.Faculty of Mathematics and Computer ScienceCopernicus UniversityToruńPoland

Personalised recommendations