Run Compressed Rank/Select for Large Alphabets

José Fuentes-Sepúlveda, Juha Kärkkäinen, Dmitry Kosolobov, Simon J. Puglisi
11/8/2017
cs.DS

Official code: jfuentess/sdsl-lite (5 stars, C++, last commit 2026-09-11).

Abstract

Given a string of length $n$ that is composed of $r$ runs of letters from the alphabet $\{0,1,\ldots,σ{-}1\}$ such that $2 \le σ\le r$, we describe a data structure that, provided $r \le n / \log^{ω(1)} n$, stores the string in $r\log\frac{nσ}{r} + o(r\log\frac{nσ}{r})$ bits and supports select and access queries in $O(\log\frac{\log(n/r)}{\log\log n})$ time and rank queries in $O(\log\frac{\log(nσ/r)}{\log\log n})$ time. We show that $r\log\frac{n(σ-1)}{r} - O(\log\frac{n}{r})$ bits are necessary for any such data structure and, thus, our solution is succinct.

Show full abstract

We also describe a data structure that uses $(1 + ε)r\log\frac{nσ}{r} + O(r)$ bits, where $ε> 0$ is an arbitrary constant, with the same query times but without the restriction $r \le n / \log^{ω(1)} n$. By simple reductions to the colored predecessor problem, we show that the query times are optimal in the important case $r \ge 2^{\log^δn}$, for an arbitrary constant $δ> 0$. We implement our solution and compare it with the state of the art, showing that the closest competitors consume 31-46% more space.

View on arXivView PDF

Code Implementations(1)

Succinct Data Structure Library 2.0

53C++, TeXOct 3, 20172 months agoNOASSERTION

Similar Papers

Cite this paper

@article{fuentesseplveda2017compressed,
  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},
  year   = {2017},
  eprint = {1711.02910},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1711.02910}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1711.02910.svg)](https://codeofpaper.com/paper/1711.02910)

Discussion