English

Dynamic Entropy-Encoded Arrays in O(1) Time with Nearly Optimal Space

Data Structures and Algorithms 2026-08-06 v1

Abstract

We show how to implement a dynamic array A[1,n]A[1, n] with symbols from a fixed alphabet Σ\Sigma, while supporting O(1)O(1)-time queries and updates, and using a total space of log(Σm)+(1+O(loglognlogn))(σΣfσlog(n/fσ))+n/polylog n \log \binom{|\Sigma|}{m} + \left(1 + O\left(\frac{\log \log n}{\log n}\right)\right) \cdot \left(\sum_{\sigma \in \Sigma} f_\sigma \log (n / f_\sigma)\right) + n / \text{polylog } n bits, where fσf_\sigma denotes the frequency of each symbol σΣ\sigma \in \Sigma and mm denotes the number of distinct symbols with non-zero frequencies. This resolves a long-standing open question as to whether one can achieve space bounds close to that of arithmetic coding, while supporting O(1)O(1)-time operations, whenever the entropy is at least n/polylog nn/\text{polylog } n. We also prove a nearly matching space lower bound: up to a factor of O(loglogn)O(\log \log n), the entropy-dependent multiplicative overhead of our construction is optimal among O(1)O(1)-time solutions when Σ=O(n)|\Sigma|=O(\sqrt n) and the entropy σΣfσlog(n/fσ)\sum_{\sigma \in \Sigma} f_\sigma \log (n / f_\sigma) lies between n/logO(1)nn/\log^{O(1)}n and (1/100)nlogn(1/100)n\log n. Finally, we present several applications of our results, resolving two open problems having to do with space-efficient dictionaries and filters.

Keywords

Cite

@article{arxiv.2608.06066,
  title  = {Dynamic Entropy-Encoded Arrays in O(1) Time with Nearly Optimal Space},
  author = {Guy E. Blelloch and Yang Hu and William Kuszmaul and Tianxiao Li and Renfei Zhou},
  journal= {arXiv preprint arXiv:2608.06066},
  year   = {2026}
}

Comments

39 pages. In FOCS 2026