The dynamic trie is a fundamental data structure which finds applications in many areas. This paper proposes a compressed version of the dynamic trie data structure. Our data-structure is not only space efficient, it also allows pattern searching in o(|P |) time and leaf insertion/deletion in o(log n) time, where |P | is the length of the pattern and n is the size of the trie. To demonstrate the usefulness of the new data structure, we apply it to the LZ-compression problem. For a string S of length s over an alphabet A of size σ, the previously best known algorithms for computing the Ziv-Lempel encoding (lz78) of S either run in: (1) O(s) time and O(s log s) bits working space; or (2) O(sσ) time and O(sH k + s log σ/ log σ s) bits working space, where H k is the korder entropy of the text. No previous algorithm runs in sublinear time. Our new data structure implies a LZ-compression algorithm which runs in sublinear time and uses optimal working space. More precisely, the LZ-compression algorithm uses O(s(log σ + log log σ s)/ log σ s) bits working space and runs in O(s(log log s) 2 /(log σ s log log log s)) worst-case time, which is sublinear when σ = 2 o(log s log log log s (log log s) 2 ) .
An efficient algorithm for computing the LZ78 factorization was presented in REF .
Compressed Dynamic Tries with Applications to LZ-Compression in Sublinear Time and Space
FSTTCS
Computer Science