Journal of Computer and System Sciences ( IF 1.494 ) Pub Date : 2021-01-08 , DOI: 10.1016/j.jcss.2020.12.002
Dekel Tsur

The degree distribution of an ordered tree T with n nodes is $\stackrel{\to }{n}=\left({n}_{0},\dots ,{n}_{n-1}\right)$, where ${n}_{i}$ is the number of nodes in T with i children. Let $\mathcal{N}\left(\stackrel{\to }{n}\right)$ be the number of trees with degree distribution $\stackrel{\to }{n}$. We give a data structure that stores an ordered tree T with n nodes and degree distribution $\stackrel{\to }{n}$ using $\mathrm{log}\mathcal{N}\left(\stackrel{\to }{n}\right)+O\left(n/{\mathrm{log}}^{t}n\right)$ bits for every constant t. The data structure answers tree queries in constant time. Our data structure has improved space complexity compared to the known data structures for ordered trees with lowest space complexity: The structure of Jansson et al. [14] that uses $\mathrm{log}\mathcal{N}\left(\stackrel{\to }{n}\right)+O\left(n\mathrm{log}\mathrm{log}n/\mathrm{log}n\right)$ bits, and the structure of Navarro and Sadakane [18] that uses $2n+O\left(n/{\mathrm{log}}^{t}n\right)$ bits for every constant t.

down
wechat
bug