Compressed Data Structures for Binary Relations in Practice
Carlos Quijada-Fuentes, Miguel R. Penabad, Susana Ladra, Gilberto Gutiérrez
备注:
This research has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie Actions H2020-MSCA-RISE-2015 BIRDS GA No. 690941
Binary relations are commonly used in Computer Science for modeling data. In addition to classical representations using matrices or lists, some compressed data structures have recently been proposed to represent binary relations in compact space, such as the $k^2$-tree and the Binary Relation Wavelet Tree (BRWT). Knowing their storage needs, supported operations and time performance is key for enabling an appropriate choice of data representation given a domain or application, its data distribution and typical operations that are computed over the data.
In this work, we present an empirical comparison among several compressed representations for binary relations. We analyze their space usage and the speed of their operations using different (synthetic and real) data distributions. We include both neighborhood and set operations, also proposing algorithms for set operations for the BRWT, which were not presented before in the literature. We conclude that there is not a clear choice that outperforms the rest, but we give some recommendations of usage of each compact representation depending on the data distribution and types of operations performed over the data. We also include a scalability study of the data representations.
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树和左倾红黑树。