Summary
Consider an m-ary tree constructed from a random permutation of size n. When all permutations are equally likely, the average internal path length, which may be considered as a cost measure for searching the tree, is shown to be (n+1)H n/(H m−1)+cn+O(n β),β<1, with
, where H kis the k th harmonic number and A (m)1 is a coefficient obtained by solving a linear system of equations. This result tells us that the average cost of searching unbalanced m-ary trees is essentially the same as that of searching other popular variants of m-ary trees like B-trees and B +-trees where sophisticated methods are used for balancing.
Similar content being viewed by others
References
Horowitz, E., Sahni, S.: Fundamentals of Data Structures. Potomac: Computer Science Press 1976
Knuth, D.E.: The Art of Computer Programming, Vol. 3. Reading: Addison-Wesley 1973
Aho, A.V., Hopcroft, J.E., Ullman, J.D.: Data Structures. Potomac: Computer Science Press 1983
Comer, D.: The Ubiquitous B-tree, Comput. Surv., 11, 121–137 (1979)
Mahmoud, H., Pittel, B.: On the Joint Distribution of the Path Length and the Number of Comparisons in a Random Search Tree. Discrete Math. (Submitted)
Mahmoud, H., Pittel, B.: On the Most Probable Shape of a Search Tree Grown from a Random Permutation. SIAM J. Algebraic Discrete Methods 5, 69–81 (1984)
Hibbard, T.N.: Some Combinatorial Properties of Certain Trees with Applications to Searching and Sorting. J. Assoc. Comput. Mach. 9, 13–28 (1962)
Bender, E.: Asymptotic Methods in Enumeration. SIAM Rev. 16, 485–515 (1974)
Author information
Authors and Affiliations
Additional information
This research was supported in part by the Junior Scholar Incentive Program of The George Washington University
Rights and permissions
About this article
Cite this article
Mahmoud, H.M. On the average internal path length of m-ary search trees. Acta Informatica 23, 111–117 (1986). https://doi.org/10.1007/BF00268078
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00268078