research

Compressed Data Structures for Dynamic Sequences

Abstract

We consider the problem of storing a dynamic string SS over an alphabet Σ={1,,σ}\Sigma=\{\,1,\ldots,\sigma\,\} in compressed form. Our representation supports insertions and deletions of symbols and answers three fundamental queries: access(i,S)\mathrm{access}(i,S) returns the ii-th symbol in SS, ranka(i,S)\mathrm{rank}_a(i,S) counts how many times a symbol aa occurs among the first ii positions in SS, and selecta(i,S)\mathrm{select}_a(i,S) finds the position where a symbol aa occurs for the ii-th time. We present the first fully-dynamic data structure for arbitrarily large alphabets that achieves optimal query times for all three operations and supports updates with worst-case time guarantees. Ours is also the first fully-dynamic data structure that needs only nHk+o(nlogσ)nH_k+o(n\log\sigma) bits, where HkH_k is the kk-th order entropy and nn is the string length. Moreover our representation supports extraction of a substring S[i..i+]S[i..i+\ell] in optimal O(logn/loglogn+/logσn)O(\log n/\log\log n + \ell/\log_{\sigma}n) time

    Similar works

    Full text

    thumbnail-image

    Available Versions