English

Bitvectors with runs and the successor/predecessor problem

Data Structures and Algorithms 2020-02-27 v1

Abstract

The successor and predecessor problem consists of obtaining the closest value in a set of integers, greater/smaller than a given value. This problem has interesting applications, like the intersection of inverted lists. It can be easily modeled by using a bitvector of size nn and its operations rank and select. However, there is a practical approach, which keeps the best theoretical bounds, and allows to solve successor and predecessor more efficiently. Based on that technique, we designed a novel compact data structure for bitvectors with kk runs that achieves access, rank, and successor/predecessor in O(1)O(1) time by consuming space O(kn)O(\sqrt{kn}) bits. In practice, it obtains a compression ratio of 0.04%26.33%0.04\%-26.33\% when the runs are larger than 100100, and becomes the fastest technique, which considers compressibility, in successor/predecessor queries. Besides, we present a recursive variant of our structure, which tends to O(k)O(k) bits and takes O(lognk)O(\log \frac{n}{k}) time.

Keywords

Cite

@article{arxiv.2002.11691,
  title  = {Bitvectors with runs and the successor/predecessor problem},
  author = {Adrián Gómez-Brandón},
  journal= {arXiv preprint arXiv:2002.11691},
  year   = {2020}
}

Comments

This research has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Sk{\l}odowska-Curie Actions H2020-MSCA-RISE-2015 BIRDS GA No. 690941

R2 v1 2026-06-23T13:55:02.294Z