# Succinct Approximate Rank Queries

**Authors:** Ran Ben Basat

arXiv: 1704.07710 · 2017-04-26

## TL;DR

This paper introduces space-efficient data structures for approximate rank queries and sliding window sums, achieving optimal space bounds and constant query time, with applications to streaming data processing.

## Contribution

It provides the first succinct data structures with optimal space and constant time for approximate rank and sliding window sum queries.

## Key findings

- Achieves lower bound on space complexity for approximate rank queries.
- Develops a succinct data structure using near-optimal bits.
- Enables constant-time approximate sliding window sum queries.

## Abstract

We consider the problem of summarizing a multi set of elements in $\{1, 2, \ldots , n\}$ under the constraint that no element appears more than $\ell$ times. The goal is then to answer \emph{rank} queries --- given $i\in\{1, 2, \ldots , n\}$, how many elements in the multi set are smaller than $i$? --- with an additive error of at most $\Delta$ and in constant time. For this problem, we prove a lower bound of $\mathcal B_{\ell,n,\Delta}\triangleq$ $\left\lfloor{\frac{n}{\left\lceil{\Delta / \ell}\right\rceil}}\right\rfloor $ $\log\big({\max\{\left\lfloor{\ell / \Delta}\right\rfloor,1\} + 1}\big)$ bits and provide a \emph{succinct} construction that uses $\mathcal B_{\ell,n,\Delta}(1+o(1))$ bits. Next, we generalize our data structure to support processing of a stream of integers in $\{0,1,\ldots,\ell\}$, where upon a query for some $i\le n$ we provide a $\Delta$-additive approximation for the sum of the \emph{last} $i$ elements. We show that this too can be done using $\mathcal B_{\ell,n,\Delta}(1+o(1))$ bits and in constant time. This yields the first sub linear space algorithm that computes approximate sliding window sums in $O(1)$ time, where the window size is given at the query time; additionally, it requires only $(1+o(1))$ more space than is needed for a fixed window size.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.07710/full.md

## Figures

3 figures with captions in the complete paper: https://tomesphere.com/paper/1704.07710/full.md

## References

24 references — full list in the complete paper: https://tomesphere.com/paper/1704.07710/full.md

---
Source: https://tomesphere.com/paper/1704.07710