English

Optimal Dynamic Sequence Representations

Data Structures and Algorithms 2013-02-04 v2

Abstract

We describe a data structure that supports access, rank and select queries, as well as symbol insertions and deletions, on a string S[1,n]S[1,n] over alphabet [1..σ][1..\sigma] in time O(lgn/lglgn)O(\lg n/\lg\lg n), which is optimal even on binary sequences and in the amortized sense. Our time is worst-case for the queries and amortized for the updates. This complexity is better than the best previous ones by a Θ(1+lgσ/lglgn)\Theta(1+\lg\sigma/\lg\lg n) factor. We also design a variant where times are worst-case, yet rank and updates take O(lgn)O(\lg n) time. Our structure uses nH0(S)+o(nlgσ)+O(σlgn)nH_0(S)+o(n\lg\sigma) + O(\sigma\lg n) bits, where H0(S)H_0(S) is the zero-order entropy of SS. Finally, we pursue various extensions and applications of the result.

Keywords

Cite

@article{arxiv.1206.6982,
  title  = {Optimal Dynamic Sequence Representations},
  author = {Gonzalo Navarro and Yakov Nekrich},
  journal= {arXiv preprint arXiv:1206.6982},
  year   = {2013}
}
R2 v1 2026-06-21T21:28:03.248Z