Summary
We consider binary tries formed by using the binary fractional expansions of X 1, ...,X n, a sequence of independent random variables with common density f on [0,1]. For H n, the height of the trie, we show that either E(Hn)∼21og2 n or E(Hn)=∞ for all n≧2 according to whether ∫f 2(x)dx is finite or infinite. Thus, the average height is asymptotically twice the average depth (which is ∼log2 n when ∫f 2(x)dx>∞). The asymptotic distribution of H n is derived as well.
If f is square integrable, then the average number of bit comparisons in triesort is nlog2 n+0(n), and the average number of nodes in the trie is 0(n).
Similar content being viewed by others
References
Devroye, L.: Laws of the iterated logarithm for order statistics of uniform spacings. Ann. Probability 9, 860–867 (1981)
Devroye, L.: A note on the average depth of tries. Computing 28, 367–371 (1982)
Flajolet, Ph., Steyaert, J.M.: A branching process arising in dynamic hashing, trie searching and polynomial factorization. Proceedings of the 9th ICALP Colloquium, Lecture Notes in Computer Science, Vol. 140, pp. 239–251. Berlin-Heidelberg-New York: Springer 1982
Fredkin, E.H.: Trie memory. Comm. ACM 3, 490–500 (1960)
Johnson, N.L., Kotz, S.: Distributions in statistics: Continuous univariate distributions —1. New York: John Wiley 1970
Regnier, M.: On the average height of trees in digital search and dynamic hashing. Information Processing Lett. 13, 64–66 (1982)
Yao, A.C.: A note on the analysis of extendible hashing. Information Processing Lett. 11, 84–86 (1980)
Wheeden, R.L., Zygmund, A.: Measure and Integral. New York: Marcel Dekker 1977
Author information
Authors and Affiliations
Additional information
Research of the author was supported in part by FCAC Grant EQ-1678
Rights and permissions
About this article
Cite this article
Devroye, L. A probabilistic analysis of the height of tries and of the complexity of triesort. Acta Informatica 21, 229–237 (1984). https://doi.org/10.1007/BF00264248
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264248