Tries are popular data structures for storing a set of strings, where common prefixes are represented by common root-to-node paths. Over fifty years of usage have produced many variants and implementations to overcome some of their limitations. We explore new succinct representations of path-decomposed tries and experimentally evaluate the corresponding reduction in space usage and memory latency, comparing with the state of the art. We study two cases of applications: (1) a compressed dictionary for (compressed) strings, and (2) a monotone minimal perfect hash for strings that preserves their lexicographic order.
For (1), we obtain data structures that outperform other state-of-the-art compressed dictionaries in space efficiency, while obtaining predictable query times that are competitive with data structures preferred by the practitioners. In (2), our tries perform several times faster than other trie-based monotone perfect hash functions, while occupying nearly the same space.
Hypersuccinct Trees -- New universal tree source codes for optimal compressed tree data structures and range minima
我们提出了一个新的通用源代码的分布无标记的二进制和有序树,实现最佳的压缩范围内较低的顺序为现有的通用代码所涵盖的所有树源。同时,它支持在字RAM上以恒定时间回答压缩表示上的许多导航查询;这对于任何现有的树压缩方法都是不可能的。由此产生的数据结构,“超简洁树”,因此结合了由最好的通用代码实现的压缩与最好的简洁树数据结构的操作支持。我们应用超简洁树,以获得一个通用的压缩数据结构的范围最小查询。它具有恒定的查询时间和$2n+o(n)$位的最佳最坏情况空间使用,但是对于$n$元素的随机排列,空间平均下降到$1.736n + o(n)$位,而对于$r$增加运行的数组,空间平均下降到$2\lg\binom nr + o(n)$位。这两个结果都是最优的;前者回答了Davoodi et al.(2014)和Golin et al.(2016)的一个开放问题。与以前的工作相比,简洁的数据结构,我们不需要定制我们的数据结构,以特定的应用程序;超简洁的树自动适应手头的树。我们表明,它们同时实现了最佳的空间利用率,以在较低的顺序项范围广泛的分布在树的形状,包括:通过随机阵列的随机顺序插入生成的二叉搜索树(BST)/笛卡尔树、随机条纹平衡BST、具有给定数目的二进制/一元/叶节点的二叉树、从无记忆源生成的随机二进制尝试、全二叉树、一元路径以及均匀选择的权重平衡BST、AVL树和左倾红黑树。