Zip-Tries: Simple Dynamic Data Structures for Strings
Abstract
In this paper, we introduce zip-tries, which are simple, dynamic, memory-efficient data structures for strings. Zip-tries support search and update operations for -length strings in time in the standard RAM model or in time in the word RAM model, where is the length of the longest string that can fit in a memory word, and is the number of strings in the trie. Importantly, we show how zip-tries can achieve this while only requiring bits of metadata per node w.h.p., which is an exponential improvement over previous results for long strings. Despite being considerably simpler and more memory efficient, we show how zip-tries perform competitively with state-of-the-art data structures on large datasets of long strings. Furthermore, we provide a simple, general framework for parallelizing string comparison operations in linked data structures, which we apply to zip-tries to obtain parallel zip-tries. Parallel zip-tries are able to achieve good search and update performance in parallel, performing such operations in span. We also apply our techniques to an existing external-memory string data structure, the string B-tree, obtaining a parallel string B-tree which performs search operations using I/O span and I/O work in the parallel external memory (PEM) model. The parallel string B-tree can perform prefix searches using only span under the practical PRAM model. For the case of long strings that share short common prefixes, we provide LCP-aware variants of all our algorithms that should be quite efficient in practice, which we justify empirically.
Cite
@article{arxiv.2505.04953,
title = {Zip-Tries: Simple Dynamic Data Structures for Strings},
author = {David Eppstein and Ofek Gila and Michael T. Goodrich and Ryuto Kitagawa},
journal= {arXiv preprint arXiv:2505.04953},
year = {2025}
}
Comments
18 pages, 13 figures, v2 is full version of paper to appear in the SIAM Conference on Applied and Computational Discrete Algorithms (ACDA25) in 2025