Abstract
We describe a dynamic version of the z-fast trie, a new data structure inspired by the research started by the van Emde Boas trees [12] and followed by the development of y-fast tries [13]. The dynamic z-fast trie is a very simple, uniform data structure: given a set S of n variable-length strings, it is formed by a standard compacted trie on S (with two additional pointers per node), endowed with a dictionary of size n − 1. With this simple setup, the dynamic z-fast trie provides predecessors/successors in time O(log max{|x|,|x + |,|x − |}) (x ± is the successor/predecessor of x in S) for strings of length linear in the machine-word size w. Prefix queries are answered in time O(log|x| + k), and range queries in time O(log max{|x|,|y|,|x − |,|y + |} + k), where k is the number of elements in the output and x (and y) represent the input of the prefix (range) queries. Updates are performed within the same bounds in expectation (or with high probability using an appropriate dictionary). We then show a simple modification that makes it possible to handle strings of length up to 2w; in this case, predecessor/successor queries and updates are supported in O(|x|/w + log max{|x|,|x + |,|x − |}) time, (and O(|x|/B + log max{|x|,|x + |,|x − |}) I/Os in the cache-oblivious model) with high probability. The space occupied by a dynamic z-fast trie, beside that necessary to store S, is just of 12n pointers, n integers and, in the “long string” case, O(n) signatures of O(w) bits each.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Andersson, A., Thorup, M.: Dynamic ordered sets with exponential search trees. J. Assoc. Comput. Mach. 54(3), 1–40 (2007)
Belazzougui, D., Boldi, P., Pagh, R., Vigna, S.: Monotone minimal perfect hashing: Searching a sorted table with O(1) accesses. In: Proceedings of the 20th Annual ACM-SIAM Symposium On Discrete Mathematics (SOD), pp. 785–794. ACM Press, New York (2009)
Dietzfelbinger, M., Karlin, A.R., Mehlhorn, K., auf der Heide, F.M., Rohnert, H., Tarjan, R.E.: Dynamic perfect hashing: Upper and lower bounds. SIAM J. Comput. 23(4), 738–761 (1994)
Ferragina, P., Grossi, R.: The string B-tree: A new data structure for string search in external memory and its applications. J. Assoc. Comput. Mach. 46(2), 236–280 (1999)
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. System Sci. 47(3), 424–436 (1993)
Frigo, M., Leiserson, C.E., Prokop, H., Ramachandran, S.: Cache-oblivious algorithms. In: Proceedings of the 40th Annual Symposium on Foundations of Computer Science (FOCS 1999), pp. 285–297. IEEE Comput. Soc. Press, Los Alamitos (1999)
Knuth, D.E.: The Art of Computer Programming. Addison–Wesley, Reading (1973)
Mehlhorn, K., Näher, S.: Bounded ordered dictionaries in O(loglogN) time and O(n) space. Inf. Process. Lett. 35(4), 183–189 (1990)
Pagh, A., Pagh, R., Ruzic, M.: Linear probing with constant independence. In: Johnson, D.S., Feige, U. (eds.) Proceedings of the 39th Annual ACM Symposium on Theory of Computing (STOC 2007), pp. 318–327. ACM, New York (2007)
Pagh, R., Rodler, F.F.: Cuckoo hashing. In: Meyer auf der Heide, F. (ed.) ESA 2001. LNCS, vol. 2161, pp. 121–133. Springer, Heidelberg (2001)
Pǎtraşcu, M., Thorup, M.: Randomization does not help searching predecessors. In: SODA 2007: Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, pp. 555–564. Society for Industrial and Applied Mathematics, Philadelphia (2007)
van Emde Boas, P., Kaas, R., Zijlstra, E.: Design and implementation of an efficient priority queue. Theory Comput. Systems 10(1), 99–127 (1976)
Willard, D.E.: Log-logarithmic worst-case range queries are possible in space Θ(N). Inform. Process. Lett. 17(2), 81–84 (1983)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Belazzougui, D., Boldi, P., Vigna, S. (2010). Dynamic Z-Fast Tries. In: Chavez, E., Lonardi, S. (eds) String Processing and Information Retrieval. SPIRE 2010. Lecture Notes in Computer Science, vol 6393. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-16321-0_15
Download citation
DOI: https://doi.org/10.1007/978-3-642-16321-0_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-16320-3
Online ISBN: 978-3-642-16321-0
eBook Packages: Computer ScienceComputer Science (R0)