arXiv:2610.01853cs.DSOct 2026

Manuscript Offprint

arXiv:2610.01853

Achieving Optimal Redundancy for Small Dynamic Rank/Select Dictionaries

Gabriel Marques Domingues

Abstract

In this paper, we study the number of bits required to construct a dynamic dictionary with optimal time for rank⁡/select⁡\operatorname{rank}/\operatorname{select} operations. Using the standard (multiplication) Word-RAM model with ww-bit words, we construct a data-structure for a dynamic rank⁡/select⁡\operatorname{rank}/\operatorname{select} dictionary for a set S⊆{0,1,⋯ ,u−1}S\subseteq\{0,1,\cdots,u-1\} of nn elements that, given a parameter 1≤k≤log⁡∗w1\le k\le \log^* w, uses

lg⁡(un)+O(nlog⁡(k)w) bits\lg\left(\frac{u}{n}\right)+\mathcal{O}(n\log^{(k)}w)\ \mathrm{bits}

taking optimal O(k+log⁡wn)\mathcal{O}(k+\log_w n) time (worst-case) for all operations. We show optimality for n=wO(1)n=w^{\mathcal{O}(1)} by extending the lower bound of Li, Liang, Yu, and Zhou [FOCS 2023] to super-polynomial universes: any dynamic dictionary for n≤un\leq \sqrt{u} elements that uses lg⁡(un)+O(nlog⁡(k)n)\lg\left(\frac{u}{n}\right)+\mathcal{O}(n\log^{(k)}n) bits requires Ω(k)\Omega(k) time for operations. Lastly, we extend the data-structure to a dynamic fully indexable dictionary (that also supports rank⁡/select⁡\operatorname{rank}/\operatorname{select} on the complement of SS).

*gm@mail.tau.ac.il. School of Electrical Engineering, Tel Aviv University. This research was supported by the Israel Science Foundation, grant No. 1948/21.

1 Introduction

A classic data-structure problem is to design dynamic rank/select dictionaries using as few bits as possible. There has been a lot of recent development in these constructions for the Word-RAM model [PV20, LLYZ23a, KLZ26, Dom26]. A rank/select dictionary is a data-structure that encodes a set S⊆{0,1,⋯ ,u−1}S \subseteq \{0,1,\cdots,u-1\} and supports the following operations:

(1) rank(S,x)\text{rank}(S, x) returns the number of elements of S less than or equal to x, and

(2) select(S, i) returns the i-th smallest element in S.

These can be combined to support other operations, namely, predecessor pred(S,x)\text{pred}(S, x), which returns the largest element of SS less than or equal to xx, and membership (x∈S)(x \in S), which returns whether xx belongs to SS. Throughout the paper, we focus on the dynamic case, which supports insertions and deletions to and from SS.

For a dynamic rank/select dictionary, [FS89] proved that the optimal time to implement all operations in Word-RAM with w-bit words is Ω(log⁡wn)\Omega(\log_w n), where n=∣S∣n = |S|. The information-theoretic lower bound to encode the dictionary is lg⁡(un)\lg \binom{u}{n}. We say a data-structure uses RR redundancy if it uses lg⁡(un)+R\lg \binom{u}{n} + R bits. Most existing constructions of dynamic rank/select dictionaries with optimal time for operations have redundancy Ω(n)\Omega(n) [PV20, Dom26]. Using a randomized data-structure, [KLZ26] achieved O(nw/2poly(log⁡wn))\mathcal{O}(nw/2^{\text{poly}(\log_w n)}) redundancy, which is o(n)o(n) for n≥2Ω(polylogw)n \geq 2^{\Omega(\text{polylog} w)}, with optimal time O(log⁡wn)\mathcal{O}(\log_w n) in expectation. For deterministic data-structures, the current best result is that of [Dom26], achieving O(nwϵ)\mathcal{O}(nw^\epsilon) redundancy for any constant ϵ≤1/2\epsilon \leq 1/2. This construction uses the standard Word-RAM model, that is, only multiplication and standard w-bit operations (addition, bit-shifts, etc.) are constant time. In the cell-probe model, where all w-bit operations are constant-time, the construction of [Dom26] can be improved to use O(nlog⁡w)\mathcal{O}(n \log w) redundancy.

As mentioned by [KLZ26], there are no known lower bounds for the redundancy in the dynamic case. This shows a significant gap between the dynamic case and the static case, where a lower bound of Ω(n/polylogu)\Omega(n/\text{polylog} u) redundancy for O(1)\mathcal{O}(1) time is known and reached [PV10, LZ25]. A related lower bound was proven by [LLYZ23b] for dynamic dictionaries (i.e., supporting only membership, insertions, and deletions), yet it holds only for polynomial universes with w=Θ(log⁡u)w = \Theta(\log u). It states that, given k≤log⁡∗wk \leq \log^* w, a dictionary with O(nlog⁡(k)w)\mathcal{O}(n \log^{(k)} w) redundancy requires Ω(k)\Omega(k) time. However, for rank/select dictionaries for polynomial universes, the lower bound of [FS89] is stronger, noting that Ω(log⁡wn)=Ω(log⁡wu)=Ω(w/log⁡w)=Ω(k)\Omega(\log_w n) = \Omega(\log_w u) = \Omega(w/\log w) = \Omega(k). A recent mechanized proof of [D'A26] extends the proof structure for super-polynomial universes, focusing on the case of R<nR < n.

In this paper, we provide matching upper and lower bounds for rank/select dictionaries in the standard Word-RAM model for small sets SS. First, we advance the construction of [Dom26] to achieve O(nlog⁡(k)w)\mathcal{O}(n\log^{(k)}w) redundancy and O(k)\mathcal{O}(k) time for all operations for a set of n=wO(1)n=w^{\mathcal{O}(1)} elements. In addition, we extend it to implement rank/select on the complement of SS, achieving a so-called fully indexable dictionary (FID). Using the techniques of [Dom26], we generalize this construction to any set of nn elements taking O(k+log⁡wn)\mathcal{O}(k+\log_w n) time and using the same redundancy.

Second, we adapt the techniques of [LLYZ23b] to show that any dynamic dictionary for n≤un \leq \sqrt{u} elements using O(nlog⁡(k)w)\mathcal{O}(n \log^{(k)} w) redundancy requires Ω(k)\Omega(k) time. In fact, this lower bound holds even for dynamic dictionaries that support only membership queries. The main difficulty of the lower bound of [LLYZ23b] is to remove the requirement of a polynomial universe. We focus on the case of R=Ω(n)R = \Omega(n) redundancy, and simplify the proof for this case, fixing the technical issue of [LLYZ23b], that was also resolved in [D'A26].

1^{1}We denote log⁡(k)(w)=log⁡⋯log⁡⏞k(w)\log^{(k)}(w) = \overbrace{\log \cdots \log}^{k}(w) and log⁡∗(w)=min⁡{k∣log⁡(k)(w)≤1}\log^{*}(w) = \min\{k \mid \log^{(k)}(w) \leq 1\}.

For n=wO(1)n = w^{\mathcal{O}(1)} elements, our upper bound is optimal and show a fundamental limitation of compressing dynamic rank/select dictionaries in Word-RAM. This completely resolves the problem of constructing constant-time fusion nodes [KLZ26, D'A26]. Moreover, this result shows that the standard Word-RAM model suffices to solve this problem.

For k=log⁡∗wk = \log^* w, this is the first deterministic construction using O(n)\mathcal{O}(n) redundancy that achieves O(log⁡∗w)=log⁡o(1)w\mathcal{O}(\log^* w) = \log^{o(1)} w time for sets of poly( ww) elements. With this lower bound, the remaining open question is how to achieve o(n)o(n) redundancy with the optimal time-space trade-off, i.e., taking time Ω(log⁡∗w+log⁡(n/R))\Omega(\log^* w + \log(n/R)) for redundancy RR [LLYZ23b, D'A26]. Currently, the cardinality reduction techniques of [Dom26] require Ω(n)\Omega(n) bits to get worst-case update times.

References (35)