Skip to main content

Short Labels for Lowest Common Ancestors in Trees

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5757))

Abstract

We evaluate the practical performance of labeling schemes for lowest common ancestors in trees. We develop different variants for encoding the labels. We then perform a thorough experimental evaluation of these schemes on a variety of tree shapes and sizes. We find that in general non-prefix-free codes lead to shorter labels than those that are prefix-free, while having roughly the same query time.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Kannan, S., Naor, M., Rudich, S.: Implicit representation of graphs. SIAM J. Discrete Math. 5(4), 596–603 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  2. Abiteboul, S., Alstrup, S., Kaplan, H., Milo, T., Rauhe, T.: Compact labeling scheme for ancestor queries. SIAM J. Comput. 35(6), 1295–1309 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  3. Kaplan, H., Milo, T., Shabo, R.: Compact labeling scheme for xml ancestor queries. Theory Comput. Syst. 40(1), 55–99 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  4. Alstrup, S., Bille, P., Rauhe, T.: Labeling schemes for small distances in trees. SIAM J. Discrete Math. 19(2), 448–462 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  5. Gavoille, C., Peleg, D., Pérennes, S., Raz, R.: Distance labeling in graphs. J. Algorithms 53(1), 85–112 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  6. Cohen, E., Halperin, E., Kaplan, H., Zwick, U.: Reachability and distance queries via 2-hop labels. SIAM J. Comput. 32(5), 1338–1355 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  7. Harel, D., Tarjan, R.E.: Fast algorithms for finding nearest common ancestors. SIAM J. Comput. 13(2), 338–355 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  8. Alstrup, S., Gavoille, C., Kaplan, H., Rauhe, T.: Nearest common ancestors: A survey and a new algorithm for a distributed environment. Theory Comput. Syst. 37, 441–456 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  9. Peleg, D.: Informative labeling schemes for graphs. Theor. Comput. Sci. 340(3), 577–593 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  10. Caminiti, S., Finocchi, I., Petreschi, R.: Engineering tree labeling schemes: A case study on least common ancestors. In: Halperin, D., Mehlhorn, K. (eds.) ESA 2008. LNCS, vol. 5193, pp. 234–245. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  11. Ferragina, P., Venturini, R.: A simple storage scheme for strings achieving entropy bounds. Theor. Comput. Sci. 372(1), 115–121 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  12. Gilbert, E.N., Moore, E.F.: Variable length binary encodings. Bell System Tech. J. 38, 933–968 (1959)

    Article  MathSciNet  Google Scholar 

  13. Hu, T.C., Tucker, A.C.: Optimum computer search trees. SIAM J. Appl. Math. 21, 514–532 (1971)

    Article  MathSciNet  MATH  Google Scholar 

  14. Hu, T.C., Larmore, L.L., Morgenthaler, J.D.: Optimal integer alphabetic trees in linear time. In: Brodal, G.S., Leonardi, S. (eds.) ESA 2005. LNCS, vol. 3669, pp. 226–237. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  15. Mehlhorn, K.: The best possible bound for the weighted path length of binary search trees. SIAM J. Comput. 6(2), 235–239 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  16. Knuth, D.E.: Optimum binary search trees. Act Informatica 1, 14–25 (1971)

    Article  MATH  Google Scholar 

  17. Munro, J.I.: Tables. In: Chandru, V., Vinay, V. (eds.) FSTTCS 1996. LNCS, vol. 1180, pp. 37–42. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  18. Gog, S.: Broadword computing and Fibonacci code speed up compressed suffix arrays. In: Gog, S., Vahrenhold, J. (eds.) SEA 2009. LNCS, vol. 5526, pp. 161–172. Springer, Heidelberg (2009)

    Google Scholar 

  19. Witten, I.H., Moffat, A., Bell, T.C.: Managing Gigabytes: Compressing and Indexing Documents and Images, 2nd edn. Morgan Kaufmann, San Francisco (1999)

    MATH  Google Scholar 

  20. Garsia, A.M., Wachs, M.L.: A new algorithm for minimum cost binary trees. SIAM J. Comput. 6(4), 622–642 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  21. Rémy, J.L.: Un procédé itératif de dénombrement d’arbres binaires et son application a leur génération aléatoire. Informatique Théorique et Applications 19(2), 179–195 (1985)

    Article  MATH  Google Scholar 

  22. Fischer, J., Heun, V.: Theoretical and practical improvements on the RMQ-problem, with applications to LCA and LCE. In: Lewenstein, M., Valiente, G. (eds.) CPM 2006. LNCS, vol. 4009, pp. 36–48. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Fischer, J. (2009). Short Labels for Lowest Common Ancestors in Trees. In: Fiat, A., Sanders, P. (eds) Algorithms - ESA 2009. ESA 2009. Lecture Notes in Computer Science, vol 5757. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-04128-0_67

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-04128-0_67

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-04127-3

  • Online ISBN: 978-3-642-04128-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics