Universal Succinct Representations of Trees?

  • Arash Farzan
  • Rajeev Raman
  • S. Srinivasa Rao
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5555)


We consider the succinct representation of ordinal and cardinal trees on the RAM with logarithmic word size. Given a tree T, our representations support the following operations in O(1) time: (i) \(\mbox{{\tt BP-substring}}(i,b)\), which reports the substring of length b bits (b is at most the wordsize) beginning at position i of the balanced parenthesis representation of T, (ii) \(\mbox{{\tt DFUDS-substring}}(i,b)\), which does the same for the depth first unary degree sequence representation, and (iii) a similar operation for tree-partition based representations of T. We give:

  • an asymptotically space-optimal 2n + o(n) bit representation of n-node ordinal trees that supports all the above operations with b = Θ(logn), answering an open question from [He et al., ICALP’07].

  • an asymptotically space-optimal C(n,k) + o(n)-bit representation of k-ary cardinal trees, that supports (with \(b = \Theta(\sqrt{\log n})\)) the operations (ii) and (iii) above, on the ordinal tree obtained by removing labels from the cardinal tree, as well as the usual label-based operations. As a result, we obtain a fully-functional cardinal tree representation with the above space complexity. This answers an open question from [Raman et al, SODA’02].

Our new representations are able to simultaneously emulate the BP, DFUDS and partitioned representations using a single instance of the data structure, and thus aim towards universality. They not only support the union of all the ordinal tree operations supported by these representations, but will also automatically inherit any new operations supported by these representations in the future.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Benoit, D., Demaine, E.D., Munro, J.I., Raman, R., Raman, V., Rao, S.S.: Representing trees of higher degree. Algorithmica 43(4), 275–292 (2005)MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Chuang, R.C., Garg, A., He, X., Kao, M., Lu, H.: Compact encodings of planar graphs via canonical orderings and multiple parentheses. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, pp. 118–129. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  3. 3.
    Delpratt, O., Raman, R., Rahman, N.: Engineering succinct DOM. In: EDBT. ACM Intl. Conference Proceeding Series, vol. 261, pp. 49–60. ACM Press, New York (2008)Google Scholar
  4. 4.
    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
  5. 5.
    Ferragina, P., Luccio, F., Manzini, G., Muthukrishnan, S.: Structuring labeled trees for optimal succinctness, and beyond. In: FOCS, pp. 184–196. IEEE Computer Society Press, Los Alamitos (2005)Google Scholar
  6. 6.
    Geary, R.F., Raman, R., Raman, V.: Succinct ordinal trees with level-ancestor queries. ACM Transactions on Algorithms 2(4), 510–534 (2006)CrossRefMathSciNetGoogle Scholar
  7. 7.
    Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete Mathematics: A Foundation for Computer Science. Addison-Wesley Longman Publishing Co., Inc., Boston (1994)MATHGoogle Scholar
  8. 8.
    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
  9. 9.
    Jacobson, G.J.: Succinct static data structures. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1988)Google Scholar
  10. 10.
    Jacobson, G.J.: Space-efficient static trees and graphs. In: IEEE Symposium on Foundations of Computer Science, 1989, pp. 549–554 (1989)Google Scholar
  11. 11.
    Jansson, J., Sadakane, K., Sung, W.: Ultra-succinct representation of ordered trees. In: SODA, pp. 575–584. SIAM, Philadelphia (2007)Google Scholar
  12. 12.
    Lu, H., Yeh, C.: Balanced parentheses strike back. ACM Trans. Algorithms 4(3), 1–13 (2008)CrossRefMathSciNetGoogle Scholar
  13. 13.
    Munro, J.I., Raman, V.: Succinct representation of balanced parentheses, static trees and planar graphs. In: IEEE Symposium on Foundations of Computer Science, pp. 118–126 (1997)Google Scholar
  14. 14.
    Munro, J.I., Raman, V., Storm, A.J.: Representing dynamic binary trees succinctly. In: SODA, pp. 529–536. SIAM, Philadelphia (2001)Google Scholar
  15. 15.
    Munro, J.I., Rao, S.S.: Succinct Representation of Data Structures. In: Handbook of Data Structures and Applications, ch. 37, Chapman & Hall/CRC (2004)Google Scholar
  16. 16.
    Munro, J.I., Rao, S.S.: Succinct representations of functions. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 1006–1015. Springer, Heidelberg (2004)Google Scholar
  17. 17.
    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), 43 (2002); Preliminary version in SODA 2002CrossRefMathSciNetGoogle Scholar
  18. 18.
    Raman, R., Rao, S.S.: Succinct dynamic dictionaries and trees. In: Baeten, J.C.M., Lenstra, J.K., Parrow, J., Woeginger, G.J. (eds.) ICALP 2003. LNCS, vol. 2719, pp. 357–368. Springer, Heidelberg (2003)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Arash Farzan
    • 1
  • Rajeev Raman
    • 2
  • S. Srinivasa Rao
    • 3
  1. 1.David R. Cheriton School of Computer ScienceUniversity of WaterlooCanada
  2. 2.Department of Computer ScienceUniversity of LeicesterUK
  3. 3.School of Computer Science and EngineeringSeoul National UniversityS. Korea

Personalised recommendations