String Range Matching

  • Juha Kärkkäinen
  • Dominik Kempa
  • Simon J. Puglisi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8486)


Given strings X and Y the exact string matching problem is to find the occurrences of Y as a substring of X. An alternative formulation asks for the lexicographically consecutive set of suffixes of X that begin with Y. We introduce a generalization called string range matching where we want to find the suffixes of X that are in an arbitrary lexicographical range bounded by two strings Y and Z. The problem has applications in distributed suffix sorting, where Y and Z are themselves suffixes of X. Exact string matching can be solved in linear time and constant extra space under the standard comparison model. Our conjecture is that string range matching is a harder problem and cannot be solved within the same time–space complexity. In this paper, we trace the upper bound on the complexity of string range matching by describing algorithms that are within a logarithmic factor of the time–space complexity of exact string matching, as well as variants of the problem and the model that can be solved in linear time and constant extra space.


Linear Time Space Complexity String Match Extra Space Match Length 
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.
    Burrows, M., Wheeler, D.J.: A block sorting lossless data compression algorithm. Technical Report 124, Digital Equipment Corporation, Palo Alto, California (1994)Google Scholar
  2. 2.
    Crochemore, M.: String-matching on ordered alphabets. Theor. Comp. Sci. 92, 33–47 (1992)CrossRefzbMATHMathSciNetGoogle Scholar
  3. 3.
    Crochemore, M., Perrin, D.: Two-way string matching. J. ACM 38(3), 651–675 (1991)CrossRefzbMATHMathSciNetGoogle Scholar
  4. 4.
    Crochemore, M., Rytter, W.: Squares, cubes, and time-space efficient string searching. Algorithmica 13(5), 405–425 (1995)CrossRefzbMATHMathSciNetGoogle Scholar
  5. 5.
    Faro, S., Lecroq, T.: The exact online string matching problem: A review of the most recent results. ACM Comp. Surv. 45(2), 13 (2013)CrossRefGoogle Scholar
  6. 6.
    Ferragina, P., Gagie, T., Manzini, G.: Lightweight data indexing and compression in external memory. Algorithmica 63(3), 707–730 (2012)CrossRefzbMATHMathSciNetGoogle Scholar
  7. 7.
    Fine, N.J., Wilf, H.S.: Uniqueness theorems for periodic functions. Proc. Amer. Math. Soc. 16(1), 109–114 (1965)CrossRefzbMATHMathSciNetGoogle Scholar
  8. 8.
    Galil, Z., Seiferas, J.: Saving space in fast string-matching. SIAM J. Comp. 9(2), 417–438 (1980)CrossRefzbMATHMathSciNetGoogle Scholar
  9. 9.
    Galil, Z., Seiferas, J.: Time-space optimal string matching. J. Comp. Sys. Sci. 26, 280–294 (1983)CrossRefMathSciNetGoogle Scholar
  10. 10.
    Kärkkäinen, J.: Fast BWT in small space by blockwise suffix sorting. Theor. Comp. Sci. 387(3), 249–257 (2007)CrossRefzbMATHGoogle Scholar
  11. 11.
    Kärkkäinen, J., Kempa, D., Puglisi, S.J.: Crochemore’s string matching algorithm: Simplification, extensions, applications. In: Proc. PSC 2013, pp. 168–175. Czech Technical University (2013)Google Scholar
  12. 12.
    Knuth, D., Morris, J.H., Pratt, V.: Fast pattern matching in strings. SIAM J. Comp. 6(2), 323–350 (1977)CrossRefzbMATHMathSciNetGoogle Scholar
  13. 13.
    Manber, U., Myers, G.W.: Suffix arrays: a new method for on-line string searches. SIAM J. Comp. 22(5), 935–948 (1993)CrossRefzbMATHMathSciNetGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Juha Kärkkäinen
    • 1
    • 2
  • Dominik Kempa
    • 1
    • 2
  • Simon J. Puglisi
    • 1
    • 2
  1. 1.Department of Computer ScienceUniversity of HelsinkiFinland
  2. 2.Helsinki Institute for Information Technology HIITFinland

Personalised recommendations