The Annals of Applied Probability

Distribution of distances in random binary search trees

Hosam M. Mahmoud and Ralph Neininger

Full-text: Open access


We investigate random distances in a random binary search tree. Two types of random distance are considered: the depth of a node randomly selected from the tree, and distance between randomly selected pairs of nodes. By a combination of classical methods and modern contraction techniques we arrive at a Gaussian limit law for normed random distances between pairs. The exact forms of the mean and variance of this latter distance are first derived by classical methods to determine the scaling properties, then used for norming, and the normed random variable is then shown by the contraction method to have a normal limit arising as the fixed-point solution of a distributional equation. We identify the rate of convergence in the limit law to be of the order $\Theta(1/\sqrt{\ln n})$ in the Zolotarev metric $\zeta_3$. In the analysis we need the rate of convergence in the central limit law for the depth of a node, as well. This limit law was derived before by various techniques. We establish the rate $\Theta(1/\sqrt{\ln n})$ in $\zeta_3$.

Article information

Ann. Appl. Probab., Volume 13, Number 1 (2003), 253-276.

First available in Project Euclid: 16 January 2003

Permanent link to this document

Digital Object Identifier

Mathematical Reviews number (MathSciNet)

Zentralblatt MATH identifier

Primary: 05C05: Trees 60C05: Combinatorial probability
Secondary: 60F05: Central limit and other weak theorems 68P05: Data structures

Random trees recurrence contraction method fixed-point equation metric space weak convergence Zolotarev metric


Mahmoud, Hosam M.; Neininger, Ralph. Distribution of distances in random binary search trees. Ann. Appl. Probab. 13 (2003), no. 1, 253--276. doi:10.1214/aoap/1042765668.

Export citation


  • CRAMER, M. and RÜSCHENDORF, L. (1996). Analy sis of recursive algorithms by the contraction method. Athens Conference on Applied Probability and Time Series Analy sis. Lecture Notes in Statist. 114 18-33. Springer, New York.
  • DEVROy E, L. (1988). Applications of the theory of records in the study of random trees. Acta Inform. 26 123-130.
  • DEVROy E, L. (1999). Universal limit laws for depths in random trees. SIAM J. Comput. 28 409-432.
  • GUTMAN, I. and POLANSKY, O. (1986). Mathematical Concepts in Organic Chemistry. Springer, Berlin.
  • HWANG, H.-K. and NEININGER, R. (2002). Phase change of limit laws in the quicksort recurrence under varying toll functions. SIAM J. Comput. 31 1687-1722.
  • KEMP, R. (1984). Fundamentals of the Average Case Analy sis of Particular Algorithms. Wiley, New York.
  • KNUTH, D. (1998). The Art of Computer Programming 3. Sorting and Searching, 2nd ed. AddisonWesley, Reading, MA.
  • MAHMOUD, H. (1992). Evolution of Random Search Trees. Wiley, New York.
  • MAHMOUD, H. (2000). Sorting: A Distribution Theory. Wiley, New York.
  • MAHMOUD, H. and SMy THE, R. (1998). Probabilistic analysis of MULTIPLE QUICK SELECT. Algorithmica 22 569-584.
  • NEININGER, R. (2001). On a multivariate contraction method for random recursive structures with applications to Quicksort. Random Structures Algorithms 19 498-524.
  • NEININGER, R. (2002). The Wiener index of random trees. Combin. Probab. Comput. To appear.
  • NEININGER, R. and RÜSCHENDORF, L. (2002a). Rates of convergence for Quicksort. J. Algorithms. To appear.
  • NEININGER, R. and RÜSCHENDORF, L. (2002b). A general contraction theorem and asy mptotic normality in combinatorial structures. Technical Report 01-25, Univ. Freiburg.
  • RACHEV, S. (1991). Probability Metrics and the Stability of Stochastic Models. Wiley, New York.
  • RACHEV, S. and RÜSCHENDORF, L. (1995). Probability metrics and recursive algorithms. Adv. in Appl. Probab. 27 770-799.
  • RÖSLER, U. (1991). A limit theorem for "Quicksort." RAIRO Inform. Théor. Appl. 25 85-100.
  • RÖSLER, U. (1992). A fixed point theorem for distributions. Stochastic Process. Appl. 42 195-214.
  • RÖSLER, U. (2001). On the analysis of stochastic divide and conquer algorithms. Algorithmica 29 238-261.
  • RÖSLER, U. and RÜSCHENDORF, L. (2001). The contraction method for recursive algorithms. Algorithmica 29 3-33.
  • SEIDEL, R. and ARAGON, C. R. (1996). Randomized search trees. Algorithmica 16 464-497.
  • TRINAJSTI ´C, N. (1992). Chemical Graph Theory. CRC Press, Boca Raton, FL.
  • ZOLOTAREV, V. M. (1976). Approximation of the distributions of sums of independent random variables with values in infinite-dimensional spaces. Theory Probab. Appl. 21 721-737.