Algorithmica

, Volume 69, Issue 2, pp 384–396 | Cite as

Substring Range Reporting

Article

Abstract

We revisit various string indexing problems with range reporting features, namely, position-restricted substring searching, indexing substrings with gaps, and indexing substrings with intervals. We obtain the following main results.
  • We give efficient reductions for each of the above problems to a new problem, which we call substring range reporting. Hence, we unify the previous work by showing that we may restrict our attention to a single problem rather than studying each of the above problems individually.

  • We show how to solve substring range reporting with optimal query time and little space. Combined with our reductions this leads to significantly improved time-space trade-offs for the above problems. In particular, for each problem we obtain the first solutions with optimal time query and O(nlogO(1)n) space, where n is the length of the indexed string.

  • We show that our techniques for substring range reporting generalize to substring range counting and substring range emptiness variants. We also obtain non-trivial time-space trade-offs for these problems.

Our bounds for substring range reporting are based on a novel combination of suffix trees and range reporting data structures. The reductions are simple and general and may apply to other combinations of string indexing with range reporting.

Keywords

String indexing Range reporting Gaps Position-restricted substring searching 

References

  1. 1.
    Alstrup, S., Brodal, G., Rauhe, T.: Optimal static range reporting in one dimension. In: Proc. of the 33rd Symposium on Theory of Computing, pp. 476–482 (2001) Google Scholar
  2. 2.
    Alstrup, S., Stølting Brodal, G., Rauhe, T.: New data structures for orthogonal range searching. In: Proc. of the 41st Symposium on Foundations of Computer Science, pp. 198–207 (2000) CrossRefGoogle Scholar
  3. 3.
    Amir, A., Chencinski, E., Iliopoulos, C.S., Kopelowitz, T., Zhang, H.: Property matching and weighted matching. Theor. Comput. Sci. 395(2–3), 298–310 (2008) CrossRefMATHMathSciNetGoogle Scholar
  4. 4.
    Bose, P., He, M., Maheshwari, A., Morin, P.: Succinct orthogonal range search structures on a grid with applications to text indexing. In: Proc. of the 11th Workshop on Algorithms and Data Structures. Lecture Notes in Computer Science, vol. 5664, pp. 98–109 (2009) CrossRefGoogle Scholar
  5. 5.
    Chan, T.M., Larsen, K., Pǎtraşcu, M.: Orthogonal range searching on the RAM, revisited. In: Proc. of the 27th Symposium on Computational Geometry, pp. 1–10 (2011) Google Scholar
  6. 6.
    Chazelle, B.: Filtering search: a new approach to query-answering. SIAM J. Comput. 15(3), 703–724 (1986) CrossRefMATHMathSciNetGoogle Scholar
  7. 7.
    Cohen, H., Porat, E.: Range non-overlapping indexing. In: Proc. of the 20th International Symposium on Algorithms and Computation. Lecture Notes in Computer Science, vol. 5878, pp. 1044–1053 (2009) CrossRefGoogle Scholar
  8. 8.
    Crochemore, M., Iliopoulos, C.S., Kubica, M., Rahman, M.S., Tischler, G., Walen, T.: Improved algorithms for the range next value problem and applications. Theor. Comput. Sci. 434, 23–34 (2012) CrossRefMATHMathSciNetGoogle Scholar
  9. 9.
    Crochemore, M., Iliopoulos, C.S., Kubica, M., Rahman, M.S., Walen, T.: Improved algorithms for the range next value problem and applications. In: Proc. of the 25th Symposium on Theoretical Aspects of Computer Science. Leibniz International Proceedings in Informatics, vol. 1, pp. 205–216 (2008) Google Scholar
  10. 10.
    Crochemore, M., Iliopoulos, C.S., Kubica, M., Rahman, M.S., Walen, T.: Finding patterns in given intervals. Fundam. Inform. 101(3), 173–186 (2010) MATHMathSciNetGoogle Scholar
  11. 11.
    Crochemore, M., Iliopoulos, C.S., Rahman, M.S.: Optimal prefix and suffix queries on texts. Inf. Process. Lett. 108(5), 320–325 (2008) CrossRefMathSciNetGoogle Scholar
  12. 12.
    Crochemore, M., Tischler, G.: The gapped suffix array: A new index structure. In: Proc. of the 17th Symposium on String Processing and Information Retrieval. Lecture Notes in Computer Science, vol. 6393, pp. 359–364 (2010) CrossRefGoogle Scholar
  13. 13.
    Farach-Colton, M., Ferragina, P., Muthukrishnan, S.: On the sorting-complexity of suffix tree construction. J. ACM 47(6), 987–1011 (2000) CrossRefMATHMathSciNetGoogle Scholar
  14. 14.
    Fredman, M.L., Komlós, J., Szemerédi, E.: Storing a sparse table with O(1) worst case access time. J. ACM 31, 538–544 (1984) CrossRefMATHGoogle Scholar
  15. 15.
    Gusfield, D.: Algorithms on strings, trees, and sequences: computer science and computational biology. Cambridge University Press, Cambridge (1997) CrossRefMATHGoogle Scholar
  16. 16.
    Hagerup, T., Miltersen, P.B., Pagh, R.: Deterministic dictionaries. J. Algorithms 41(1), 69–85 (2001) CrossRefMATHMathSciNetGoogle Scholar
  17. 17.
    Han, Y.: Deterministic sorting in O(nloglogn) time and linear space. J. Algorithms 50(1), 96–105 (2004) CrossRefMATHMathSciNetGoogle Scholar
  18. 18.
    Iliopoulos, C.S., Rahman, M.S.: Faster index for property matching. Inf. Process. Lett. 105(6), 218–223 (2008) CrossRefMATHMathSciNetGoogle Scholar
  19. 19.
    Iliopoulos, C.S., Rahman, M.S.: Indexing factors with gaps. Algorithmica 55(1), 60–70 (2009) CrossRefMATHMathSciNetGoogle Scholar
  20. 20.
    JáJá, J., Mortensen, C.W., Shi, Q.: Space-efficient and fast algorithms for multidimensional dominance reporting and counting. In: Proc. of the 15th International Symposium on Algorithms and Computation. Lecture Notes in Computer Science, vol. 3341, pp. 558–568 (2004) CrossRefGoogle Scholar
  21. 21.
    Juan, M., Liu, J., Wang, Y.: Errata for “Faster index for property matching”. Inf. Process. Lett. 109(18), 1027–1029 (2009) CrossRefMATHMathSciNetGoogle Scholar
  22. 22.
    Mäkinen, V., Navarro, G.: Position-restricted substring searching. In: Proc. of the 7th Latin American Symposium on Theoretical Informatics, pp. 703–714 (2006) Google Scholar
  23. 23.
    Mäkinen, V., Navarro, G.: Rank and select revisited and extended. Theor. Comput. Sci. 387(3), 332–347 (2007) CrossRefMATHGoogle Scholar
  24. 24.
    Mehlhorn, K., Nähler, S.: Bounded ordered dictionaries in O(loglogN) time and O(n) space. Inf. Process. Lett. 35(4), 183–189 (1990) CrossRefMATHGoogle Scholar
  25. 25.
    Mortensen, C.W., Pagh, R., Pǎtraçcu, M.: On dynamic range reporting in one dimension. In: Proc. of the 37th Symposium on Theory of Computing, pp. 104–111 (2005) Google Scholar
  26. 26.
    Pǎtraşcu, M.: Lower bounds for 2-dimensional range counting. In: Proc. of the 39th Symposium on Theory of Computing, pp. 40–46 (2007) Google Scholar
  27. 27.
    Pǎtraşcu, M., Thorup, M.: Time-space trade-offs for predecessor search. In: Proc. of the 38th Symposium on Theory of Computing, pp. 232–240 (2006) Google Scholar
  28. 28.
    Porat, E.: Personal communication (2011) Google Scholar
  29. 29.
    Thorup, M.: Space efficient dynamic stabbing with fast queries. In: Proc. of the 33rd Symposium on Theory of Computing, pp. 649–658 (2003) Google Scholar
  30. 30.
    van Emde Boas, P.: Preserving order in a forest in less than logarithmic time and linear space. Inf. Process. Lett. 6(3), 80–82 (1977) CrossRefMATHGoogle Scholar
  31. 31.
    van Emde Boas, P., Kaas, R., Zijlstra, E.: Design and implementation of an efficient priority queue. Math. Syst. Theory 10, 99–127 (1977) CrossRefMATHGoogle Scholar
  32. 32.
    Yu, C.-C., Hon, W.-K., Wang, B.-F.: Improved data structures for the orthogonal range successor problem. Comput. Geom. 44(3), 148–159 (2011) CrossRefMATHMathSciNetGoogle Scholar

Copyright information

© Springer Science+Business Media New York 2013

Authors and Affiliations

  1. 1.DTU InformaticsTechnical University of DenmarkKgs. LyngbyDenmark

Personalised recommendations