A Uniform Paradigm to Succinctly Encode Various Families of Trees
- 358 Downloads
We propose a uniform method to encode various types of trees succinctly. These families include ordered (ordinal), k-ary (cardinal), and unordered (free) trees. We will show the approach is intrinsically suitable for obtaining entropy-based encodings of trees (such as the degree-distribution entropy). Previously-existing succinct encodings of trees use ad hoc techniques to encode each particular family of trees.
Additionally, the succinct encodings obtained using the uniform approach improve upon the existing succinct encodings of each family of trees; in the case of ordered trees, it simplifies the encoding while supporting the full set of navigational operations. It also simplifies the implementation of many supported operations. The approach applied to k-ary trees yields a succinct encoding that supports both cardinal-type operations (e.g. determining the child label i) as well as the full set of ordinal-type operations (e.g. reporting the number of siblings to the left of a node). Previous work on succinct encodings of k-ary trees does not support both types of operations simultaneously (Benoit et al. in Algorithmica 43(4):275–292, 2005; Raman et al. in ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 233–242, 2002). For unordered trees, the approach achieves the first succinct encoding.
The approach is based on two recursive decompositions of trees into subtrees. Recursive decomposition of a structure into substructures is a common technique in succinct encodings and has even been used to encode (ordered) trees (Geary et al. in ACM Trans. Algorithms 2(4):510–534, 2006; He et al. in ICALP, pp. 509–520, 2007) and dynamic binary trees (Munro et al. in ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 529–536, 2001; Storm in Representing dynamic binary trees succinctly, Master’s thesis, 2000). The main distinction of the approach in this paper is that a tree is decomposed into subtrees in a manner that the subtrees are maximally isolated from each other. This intermediate decomposition result is interesting in its own right and has proved useful in other applications (Farzan et al. in ICALP (1), pp. 451–462, 2009; Farzan and Munro in ICALP (1), pp. 439–450, 2009; Farzan and Kamali in ICALP, 2011).
KeywordsSuccinct data structures Trees Ordered trees Cardinal trees Unordered trees Compact encodings Entropy encoding
- 5.Clark, D.R.: Compact pat trees. Ph.D. thesis, University of Waterloo, Ontario, Canada (1998) Google Scholar
- 6.Clark, D.R., Munro, J.I.: Efficient suffix trees on secondary storage (extended abstract). In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 383–391 (1996) Google Scholar
- 8.Farzan, A.: Succinct representation of trees and graphs. Ph.D. thesis, School of Computer Science, University of Waterloo (2009) Google Scholar
- 9.Farzan, A., Kamali, S.: Compact navigation and distance oracles for graphs with small treewidth. In: Proceedings of the 38th International Colloquim Conference on Automata, Languages and Programming, Zurich, Switzerland, ICALP’11, vol. Part I, pp. 268–280. Springer, Berlin (2011). ISBN 978-3-642-22005-0. http://dl.acm.org/citation.cfm?id=2027127.2027156 CrossRefGoogle Scholar
- 10.Farzan, A., Munro, J.I.: A uniform approach towards succinct representation of trees. In: SWAT (11th Scandinavian Workshop on Algorithm Theory). Lecture Notes in Computer Science, pp. 173–184. Springer, Berlin (2008) Google Scholar
- 11.Farzan, A., Munro, J.I.: Dynamic succinct ordered trees. In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S.E., Thomas, W. (eds.) International Colloquium on Automata, Languages, and Programming (ICALP) (1). Lecture Notes in Computer Science, vol. 5555, pp. 439–450. Springer, Berlin (2009) CrossRefGoogle Scholar
- 12.Farzan, A., Raman, R., Rao, S.S.: Universal succinct representations of trees? In: Albers, S., Marchetti-Spaccamela, A., Matias, Y., Nikoletseas, S.E., Thomas, W. (eds.) ICALP (1). Lecture Notes in Computer Science, vol. 5555, pp. 451–462. Springer, Berlin (2009) Google Scholar
- 19.Jacobson, G.J.: Succinct static data structures. Ph.D. thesis, Pittsburgh, PA, USA (1988) Google Scholar
- 21.Jansson, J., Sadakane, K., Sung, W.-K.: Ultra-succinct representation of ordered trees. In: Bansal, N., Pruhs, K., Stein, C. (eds.) ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 575–584. SIAM, Philadelphia (2007) Google Scholar
- 22.Knuth, D.E.: The Art of Computer Programming, vol. 1, 3rd edn. Addison-Wesley, Reading (1997) Google Scholar
- 24.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
- 25.Munro, J.I., Raman, V., Storm, A.J.: Representing dynamic binary trees succinctly. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 529–536 (2001) Google Scholar
- 26.Odlyzko, A.M.: Some new methods and results in tree enumeration (04 May 1984) Google Scholar
- 29.Pǎtraşcu, M.: Succincter. In: IEEE Annual Symposium on Foundations of Computer Science (FOCS), pp. 305–313. IEEE Comput. Soc., Los Alamitos (2008) Google Scholar
- 30.Raman, R., Raman, V., Rao, S.S.: Succinct indexable dictionaries with applications to encoding k-ary trees and multisets. In: ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 233–242 (2002) Google Scholar
- 32.Rote, G.: Binary trees having a given number of nodes with 0, 1, and 2 children. In: Séminaire Lotharingien de Combinatoire, vol. 38. Springer, Berlin (1997) Google Scholar
- 34.Storm, A.J.: Representing dynamic binary trees succinctly. Master’s thesis, School of Computer Science, University of Waterloo, Waterloo, Ontario, Canada (2000) Google Scholar