当前位置: X-MOL 学术Softw. Pract. Exp. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Compact Fenwick trees for dynamic ranking and selection
Software: Practice and Experience ( IF 2.6 ) Pub Date : 2020-01-21 , DOI: 10.1002/spe.2791
Stefano Marchini 1 , Sebastiano Vigna 1
Affiliation  

The Fenwick tree is a classical implicit data structure that stores an array in such a way that modifying an element, accessing an element, computing a prefix sum and performing a predecessor search on prefix sums all take logarithmic time. We introduce a number of variants which improve the classical implementation of the tree: in particular, we can reduce its size when an upper bound on the array element is known, and we can perform much faster predecessor searches. Our aim is to use our variants to implement an efficient dynamic bit vector: our structure is able to perform updates, ranking and selection in logarithmic time, with a space overhead in the order of a few percents, outperforming existing data structures with the same purpose. Along the way, we highlight the pernicious interplay between the arithmetic behind the Fenwick tree and the structure of current CPU caches, suggesting simple solutions that improve performance significantly.

中文翻译:

用于动态排名和选择的紧凑型 Fenwick 树

Fenwick 树是一种经典的隐式数据结构,它以修改元素、访问元素、计算前缀和以及对前缀和执行前驱搜索的方式存储数组,所有这些都需要对数时间。我们引入了许多改进树的经典实现的变体:特别是,当数组元素的上限已知时,我们可以减小其大小,并且我们可以执行更快的前驱搜索。我们的目标是使用我们的变体来实现一个高效的动态位向量:我们的结构能够在对数时间内执行更新、排序和选择,空间开销大约为几个百分点,优于具有相同目的的现有数据结构. 一路上,
更新日期:2020-01-21
down
wechat
bug