Abstract
We observe that a standard transformation between ordinal trees (arbitrary rooted trees with ordered children) and binary trees leads to interesting succinct binary tree representations. There are four symmetric versions of these transformations. Via these transformations we get four succinct representations of n-node binary trees that use \(2n + n/(\log n)^{\Theta (1)}\) bits and support (among other operations) navigation, inorder numbering, one of preorder or postorder numbering, subtree size and lowest common ancestor queries. While this functionality, and more, is also supported in O(1) time using \(2n + o(n)\) bits by Davoodi et al. (Phil Trans R Soc A 372:20130131, 2014) extension of a representation by Farzan and Munro (Algorithmica 6), their redundancy, or the o(n) term, is much larger, and their approach may not be suitable for practical implementations. One of these transformations is related to the Zaks’ sequence (Theor Comput Sci 10:63–82, 1980) for encoding binary trees, and we thus provide the first succinct binary tree representation based on Zaks’ sequence. The ability to support inorder numbering is crucial for the well-known range-minimum query problem on an array A of n ordered values. Another of these transformations is equivalent to Fischer and Heun’s (SIAM J Comput 40(2):465–492, 2011) 2d-Min-Heap structure for this problem. Yet another variant allows an encoding of the Cartesian tree of A to be constructed from A using only \(O(\sqrt{n} \log n)\) bits of working space.
Similar content being viewed by others
References
Abouelhoda, M.I., Kurtz, S., Ohlebusch, E.: Replacing suffix trees with enhanced suffix arrays. J. Discrete Algorithms 2(1), 53–86 (2004)
Arroyuelo, D., Cánovas, R., Navarro, G., Sadakane, K.: Succinct trees in practice. In: Blelloch, G.E., Halperin, D. (eds.) ALENEX, pp. 84–97. SIAM, New Delhi (2010)
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)
Chen, G., Puglisi, S.J., Smyth, W.F.: Lempel-Ziv factorization using less time and space. Math. Comput. Sci. 1, 605–623 (2008)
Davoodi, P., Navarro, G., Raman, R., Satti, S.R.: Encoding range minima and range top-2 queries. Philos. Trans. R. Soc. A 372, 20130131 (2014)
Farzan, A., Munro, J. I.: A uniform approach towards succinct representation of trees. In: Proceedings 11th Scandinavian Workshop on Algorithm Theory, pp. 173–184. Springer-Verlag (2008)
Farzan, A., Raman, R., Rao, S.S.: Universal succinct representations of trees? In: Proceedings 36th International Colloquium on Automata, Languages and Programming, pp. 451–462. Springer (2009)
Fischer, J., Heun, V.: Space-efficient preprocessing schemes for range minimum queries on static arrays. SIAM J. Comput. 40(2), 465–492 (2011)
Gabow, H.N., Bentley, J.L., Tarjan, R.E.: Scaling and related techniques for geometry problems. In: Proceedings 16th Annual ACM Symposium on Theory of computing, pp. 135–143. ACM Press (1984)
Geary, R.F., Rahman, N., Raman, R., Raman, V.: A simple optimal representation for balanced parentheses. Theor. Comput. Sci. 368(3), 231–246 (2006)
Georgiadis, L., Tarjan, R.E.: Finding dominators revisited: extended abstract. In Proceedings 15th Annual ACM-SIAM Symposium on Discrete algorithms, pp. 869–878. SIAM (2004)
Gog, S., Beller, T., Moffat, A., Petri, M.: From theory to practice: Plug and play with succinct data structures. CoRR, abs/1311.1249, (2013)
Grossi, R., Ottaviano, G.: Design of practical succinct data structures for large data collections. In: Bonifaci, V., Demetrescu, C., Marchetti-Spaccamela, A. (eds.) SEA, volume 7933 of Lecture Notes in Computer Science, pp. 5–17. Springer, Berlin (2013)
Iliopoulos, C.S., Crochemore, M., Kubica, M., Rahman, M.S., Walen, T.: Improved algorithms for the range next value problem and applications. In: Proceedings 25th International Symposium on Theoretical Aspects of Computer Science, Volume 1 of Leibniz International Proceedings in Informatics, pp. 205–216. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik (2008)
Jacobson, G.: Succinct Static Data Structures. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA (1989)
Munro, J.I., Raman, V.: Succinct representation of balanced parentheses and static trees. SIAM J. Comput. 31(3), 762–776 (2001)
Muthukrishnan, S.: Efficient algorithms for document retrieval problems. In: Proceedings 13th Annual ACM-SIAM Symposium on Discrete algorithms, pp. 657–666. SIAM (2002)
Navarro, G., Sadakane, K.: Fully functional static and dynamic succinct trees. ACM Trans. Algorithms 10(3), 16:1–16:39 (2014)
Patrascu, M.: Succincter. In: FOCS, pp. 305–313. IEEE Computer Society (2008)
Raman, R., Rao, S.S.: Succinct representations of ordinal trees. In: Brodnik, A., López-Ortiz, A., Raman, V., Viola, A. (eds.) Space-Efficient Data Structures, Streams, and Algorithms, Volume 8066 of Lecture Notes in Computer Science, pp. 319–332. Springer, Berlin (2013)
Sadakane, K.: Compressed suffix trees with full functionality. Theory Comput. Syst. 41(4), 589–607 (2007)
Sadakane, K.: Succinct data structures for flexible text retrieval systems. J. Discrete Algorithms 5(1), 12–22 (2007)
Saxena, S.: Dominance made simple. Inf. Process. Lett. 109(9), 419–421 (2009)
Välimäki, N., Mäkinen, V.: Space-efficient algorithms for document retrieval. In: Proceedings 18th Annual Symposium on Combinatorial Pattern Matching, volume 4580 of LNCS, pp. 205–215. Springer-Verlag (2007)
Vuillemin, J.: A unifying look at data structures. Commun. ACM 23(4), 229–239 (1980)
Zaks, S.: Lexicographic generation of ordered trees. Theor. Comput. Sci. 10, 63–82 (1980)
Author information
Authors and Affiliations
Corresponding author
Additional information
An abstract of some of the results in this paper appeared in Computing and Combinatorics: Proceedings of the 18th Annual International Conference COCOON 2012, Sydney, Australia, 2022 August 2012 (eds. J. Gudmundsson, J. Mestre, T. Viglas), pp. 396407. Lecture Notes in Computer Science, vol. 7434. Berlin, Germany: Springer.
Rights and permissions
About this article
Cite this article
Davoodi, P., Raman, R. & Satti, S.R. On Succinct Representations of Binary Trees. Math.Comput.Sci. 11, 177–189 (2017). https://doi.org/10.1007/s11786-017-0294-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11786-017-0294-4