English

Run Compressed Rank/Select for Large Alphabets

Data Structures and Algorithms 2018-02-27 v3

Abstract

Given a string of length nn that is composed of rr runs of letters from the alphabet {0,1,,σ1}\{0,1,\ldots,\sigma{-}1\} such that 2σr2 \le \sigma \le r, we describe a data structure that, provided rn/logω(1)nr \le n / \log^{\omega(1)} n, stores the string in rlognσr+o(rlognσr)r\log\frac{n\sigma}{r} + o(r\log\frac{n\sigma}{r}) bits and supports select and access queries in O(loglog(n/r)loglogn)O(\log\frac{\log(n/r)}{\log\log n}) time and rank queries in O(loglog(nσ/r)loglogn)O(\log\frac{\log(n\sigma/r)}{\log\log n}) time. We show that rlogn(σ1)rO(lognr)r\log\frac{n(\sigma-1)}{r} - O(\log\frac{n}{r}) bits are necessary for any such data structure and, thus, our solution is succinct. We also describe a data structure that uses (1+ϵ)rlognσr+O(r)(1 + \epsilon)r\log\frac{n\sigma}{r} + O(r) bits, where ϵ>0\epsilon > 0 is an arbitrary constant, with the same query times but without the restriction rn/logω(1)nr \le n / \log^{\omega(1)} n. By simple reductions to the colored predecessor problem, we show that the query times are optimal in the important case r2logδnr \ge 2^{\log^\delta n}, for an arbitrary constant δ>0\delta > 0. We implement our solution and compare it with the state of the art, showing that the closest competitors consume 31-46% more space.

Keywords

Cite

@article{arxiv.1711.02910,
  title  = {Run Compressed Rank/Select for Large Alphabets},
  author = {José Fuentes-Sepúlveda and Juha Kärkkäinen and Dmitry Kosolobov and Simon J. Puglisi},
  journal= {arXiv preprint arXiv:1711.02910},
  year   = {2018}
}

Comments

This research has received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie Actions H2020-MSCA-RISE-2015 BIRDS GA No. 690941. 10 pages, 1 figure, 4 tables; published in DCC'2018

R2 v1 2026-06-22T22:39:51.436Z