On the Weak Prefix-Search Problem

  • Paolo Ferragina
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6661)

Abstract

The weak-prefix search problem asks for the strings in a dictionary \({\cal S}\) that are prefixed by a pattern P[1,p], if any, otherwise it admits any answer. Strings in \({\cal S}\) have average length ℓ, are n in number, and are given in advance to be preprocessed, whereas pattern P is provided on-line. In this paper we solve this problem in the cache-oblivious model by using the optimal O(n logℓ) bits of space and O(p/B + logBn) I/Os. The searching algorithm is of Monte-Carlo type, so its answer is correct with high probability. We also extend our algorithmic scheme to the case in which a probability distribution over the queried prefixes is known, and eventually address the deterministic case too.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Belazzougui, D., Boldi, P., Pagh, R., Vigna, S.: Fast prefix search in little space, with applications. In: de Berg, M., Meyer, U. (eds.) ESA 2010. LNCS, vol. 6346, pp. 427–438. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  2. 2.
    Bender, M., Farach-Colton, M., Kuszmaul, B.: Cache-oblivious string B-trees. In: Procs. ACM PODS, pp. 233–242 (2006)Google Scholar
  3. 3.
    Brodal, G., Fagerberg, R.: Cache-oblivious string dictionaries. In: ACM-SIAM SODA, pp. 581–590 (2006)Google Scholar
  4. 4.
    Clark, D.R., Munro, J.I.: Efficient suffix trees on secondary storage. In: Procs. ACM-SIAM SODA, pp. 383–391 (1996)Google Scholar
  5. 5.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. MIT Press, Cambridge (1990)MATHGoogle Scholar
  6. 6.
    Demaine, E.D., Iacono, J., Langerman, S.: Worst-case optimal tree layout in a memory hierarchy (2004), available on arXiv:cs.DS/0410048 (manuscript)Google Scholar
  7. 7.
    Ferragina, P.: Data structures: Time, I/Os, entropy, joules! In: de Berg, M., Meyer, U. (eds.) ESA 2010. LNCS, vol. 6347, pp. 1–16. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  8. 8.
    Ferragina, P., Grossi, R.: The string B-tree: A new data structure for string search in external memory and its applications. J. ACM 46(2), 236–280 (1999)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Ferragina, P., Grossi, R., Gupta, A., Shah, R., Vitter, J.S.: On searching compressed string collections cache-obliviously. In: Procs. ACM PODS, pp. 181–190 (2008)Google Scholar
  10. 10.
    Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache-oblivious algorithms. In: Procs. IEEE FOCS, pp. 285–298 (1999)Google Scholar
  11. 11.
    Ko, P., Aluru, S.: Obtaining Provably Good Performance from Suffix Trees in Secondary Storage. In: Lewenstein, M., Valiente, G. (eds.) CPM 2006. LNCS, vol. 4009, pp. 72–83. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  12. 12.
    Maheshwari, A., Zeh, N.: A survey of techniques for designing I/O-efficient algorithms. In: Meyer, U., Sanders, P., Sibeyn, J.F. (eds.) Algorithms for Memory Hierarchies. LNCS, vol. 2625, pp. 36–61. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  13. 13.
    Vitter, J.: Algorithms and Data Structures for External Memory. Series on Foundations and Trends in Theoretical Computer Science. Now Publishers (2008)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Paolo Ferragina
    • 1
  1. 1.Dipartimento di InformaticaUniversità di PisaItaly

Personalised recommendations