Advertisement

Succinct Data Structures for Path Queries

  • Meng He
  • J. Ian Munro
  • Gelin Zhou
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7501)

Abstract

Consider a tree T on n nodes, each having a weight drawn from [1..σ]. In this paper, we design succinct data structures to encode T using \(n H(W_T) + o(n\lg \sigma)\) bits of space, such that we can support path counting queries in \(O(\frac{\lg \sigma}{\lg\lg n} + 1)\) time, path reporting queries in \(O((occ+1)(\frac{\lg \sigma}{\lg\lg n} + 1))\) time, and path median and path selection queries in \(O(\frac{\lg \sigma}{\lg\lg \sigma})\) time, where H(W T ) is the entropy of the multiset of the weights of the nodes in T. Our results not only improve the best known linear space data structures [15], but also match the lower bounds for these path queries [18,19,16] when \(\sigma = \Omega(n / \textrm{polylog}(n))\).

Keywords

Query Time Path Query Space Cost Lower Common Ancestor Cover Element 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Alon, N., Schieber, B.: Optimal preprocessing for answering on-line product queries. Tech. rep., Tel Aviv University (1987)Google Scholar
  2. 2.
    Barbay, J., Golynski, A., Munro, J.I., Rao, S.S.: Adaptive Searching in Succinctly Encoded Binary Relations and Tree-Structured Documents. In: Lewenstein, M., Valiente, G. (eds.) CPM 2006. LNCS, vol. 4009, pp. 24–35. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  3. 3.
    Barbay, J., He, M., Munro, J.I., Rao, S.S.: Succinct indexes for strings, binary relations and multilabeled trees. ACM Transactions on Algorithms 7(4), 52 (2011)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Bille, P.: A survey on tree edit distance and related problems. Theor. Comput. Sci. 337(1-3), 217–239 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  5. 5.
    Bose, P., He, M., Maheshwari, A., Morin, P.: Succinct Orthogonal Range Search Structures on a Grid with Applications to Text Indexing. In: Dehne, F., Gavrilova, M., Sack, J.-R., Tóth, C.D. (eds.) WADS 2009. LNCS, vol. 5664, pp. 98–109. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  6. 6.
    Brodal, G.S., Gfeller, B., Jørgensen, A.G., Sanders, P.: Towards optimal range medians. Theor. Comput. Sci. 412(24), 2588–2601 (2011)zbMATHCrossRefGoogle Scholar
  7. 7.
    Chazelle, B.: Computing on a free tree via complexity-preserving mappings. Algorithmica 2, 337–361 (1987)MathSciNetzbMATHCrossRefGoogle Scholar
  8. 8.
    Farzan, A., Munro, J.I.: A Uniform Approach Towards Succinct Representation of Trees. In: Gudmundsson, J. (ed.) SWAT 2008. LNCS, vol. 5124, pp. 173–184. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  9. 9.
    Farzan, A., Raman, R., Rao, S.S.: Universal Succinct Representations of Trees? In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S., Thomas, W. (eds.) ICALP 2009, Part I. LNCS, vol. 5555, pp. 451–462. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  10. 10.
    Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Compressing and indexing labeled trees, with applications. J. ACM 57(1) (2009)Google Scholar
  11. 11.
    Ferragina, P., Manzini, G., Mäkinen, V., Navarro, G.: Compressed representations of sequences and full-text indexes. ACM Transactions on Algorithms 3(2) (2007)Google Scholar
  12. 12.
    Geary, R.F., Raman, R., Raman, V.: Succinct ordinal trees with level-ancestor queries. ACM Transactions on Algorithms 2(4), 510–534 (2006)MathSciNetCrossRefGoogle Scholar
  13. 13.
    Hagerup, T.: Parallel preprocessing for path queries without concurrent reading. Inf. Comput. 158(1), 18–28 (2000)MathSciNetzbMATHCrossRefGoogle Scholar
  14. 14.
    He, M., Munro, J.I., Rao, S.S.: Succinct Ordinal Trees Based on Tree Covering. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 509–520. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    He, M., Munro, J.I., Zhou, G.: Path Queries in Weighted Trees. In: Asano, T., Nakano, S.-I., Okamoto, Y., Watanabe, O. (eds.) ISAAC 2011. LNCS, vol. 7074, pp. 140–149. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  16. 16.
    Jørgensen, A.G., Larsen, K.G.: Range selection and median: Tight cell probe lower bounds and adaptive data structures. In: SODA, pp. 805–813 (2011)Google Scholar
  17. 17.
    Krizanc, D., Morin, P., Smid, M.H.M.: Range mode and range median queries on lists and trees. Nord. J. Comput. 12(1), 1–17 (2005)MathSciNetzbMATHGoogle Scholar
  18. 18.
    Pǎtraşcu, M.: Lower bounds for 2-dimensional range counting. In: STOC, pp. 40–46 (2007)Google Scholar
  19. 19.
    Pǎtraşcu, M.: Unifying the landscape of cell-probe lower bounds. SIAM J. Comput. 40(3), 827–847 (2011)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Transactions on Algorithms 3(4) (2007)Google Scholar
  21. 21.
    Sadakane, K., Navarro, G.: Fully-functional succinct trees. In: SODA, pp. 134–149 (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Meng He
    • 1
  • J. Ian Munro
    • 2
  • Gelin Zhou
    • 2
  1. 1.Faculty of Computer ScienceDalhousie UniversityCanada
  2. 2.David R. Cheriton School of Computer ScienceUniversity of WaterlooCanada

Personalised recommendations