# RETRACTED ARTICLE: Strong limiting behavior in binary search trees

## Abstract

### Abstract

In a binary search tree of size n, each node has no more than two children, we denote the number of the node with k children by ${\mathrm{Î¾}}_{n,k}$. In this paper, we study the strong limit behavior of the random variables ${\mathrm{Î¾}}_{n,k}$ and ${\mathrm{Ïƒ}}_{n,m}$, where ${\mathrm{Ïƒ}}_{n,m}$ represents the number of subtrees of size m. The results can imply some known results.

MSC: 60F05, 05C80.

## 1 Introduction

A binary tree is either empty or composed of a root node together with left and right subtrees which are themselves binary trees. A binary search tree T for a set of keys from a total order, say $\left\{1,2,â€¦,n\right\}$, is a binary tree in which each node has a key value and all the keys of the left subtree are less than the key at the root, and all the keys of the right subtree are greater than the key at the root, i.e., the first key is associated with the root, the next key is placed in the left child of the root if it is smaller than the key of the root and it is sent to the right child of the root if it is larger than the key of the root. In this way, we proceed further by inserting key by key. This property holds recursively for the left and right subtrees of the tree T.

Usually, it is assumed that every permutation of $\left\{1,2,â€¦,n\right\}$ is equally likely and has the same probability $1/n!$. Hence, any parameter of the binary search trees may be considered as a random variable.

The binary tree model turns out to be appropriate in formal language theory, computer algebra, etc., whereas the binary search tree model is of importance in sorting and searching algorithms and a lot of combinatorial algorithms. See, e.g., [1â€“4] for a detailed description. There are several papers devoted to the study of properties of the parameters. Kirschenhofer (see [5]) considered the height of leaves; Panholzer and Prodinger (see [6]) studied the number of ascendants and the number of descendants of any fixed node. Devroye and Neininger (see [7]) obtained the tail bounds and the order of higher moments for the path distance between any couples of nodes. Mahmoud and Neininger (see [8]) arrived at a Gaussian limit law for the distance between randomly selected pairs of nodes in random binary search trees and identified the rate of convergence. Svante (see [9]) got the exact and asymptotic formulas for moments and an asymptotic distribution for the difference between the left and right total pathlenghts. Devroye (see [10]) analyzed the properties of some parameter in binary search trees by applying the Steinâ€™s method. There were also many authors, who were interested in the height of binary search trees and drew a variety of properties such as the asymptotic expected value, the variance and the limiting distribution of the height (see [11â€“20]). Prodinger (see [21]) computed the probability that a random binary tree with n nodes had i nodes with 2 children. Rote (see [22]) gave three combinatorial proofs for the number of the binary trees having a given number of nodes with 0, 1, and 2 children. Liu et al. (see [23]) have studied the limiting theorems for the nodes in binary search trees. Su et al. (see [24]) have studied some limit properties on the subtrees of random binary search trees.

Let ${T}_{n}$ denote a random binary search tree of size n. In the binary search tree, every node has two children at most, we denote the number of the node with k ($=0,1,2$) children by ${\mathrm{Î¾}}_{n,k}$. Let ${\mathrm{Ïƒ}}_{n,m}$ be the number of subtrees of size m in ${T}_{n}$. In [23], Liu et al. have studied the limit properties of ${\mathrm{Î¾}}_{n,k}$ and ${\mathrm{Ïƒ}}_{n,m}$ in the sense of probably. In this paper, by computing the exact expression of the fourth moment of ${\mathrm{Î¾}}_{n,k}$ and ${\mathrm{Ïƒ}}_{n,m}$, we obtain the strong limit properties (in the sense of a.e.) of them by the Chebyshev inequality and the Borel-Cantelli lemma. Obviously, the results can imply the case in [23].

In ${T}_{n}$, we have ${\mathrm{Ïƒ}}_{n,1}={\mathrm{Î¾}}_{n,0}$, ${\mathrm{Ïƒ}}_{n,k}=0$ as $n, and ${\mathrm{Ïƒ}}_{k,k}=1$. Let ${L}_{n}$ and ${R}_{n}$ be the size of the left and right subtrees of ${T}_{n}$. It is clear that ${L}_{n}+{R}_{n}=nâˆ’1$. From the procession of constructing binary search trees, we can see that ${L}_{n}$ and ${R}_{n}$ are two random variables with uniform distribution on $\left\{0,1,2,â€¦,nâˆ’1\right\}$. We write $X\stackrel{D}{=}Y$ if X and Y have the same distribution. It is easy to find that

${R}_{n}=nâˆ’1âˆ’{L}_{n}\stackrel{D}{=}{L}_{n}.$

In the following, we will show several properties of ${\mathrm{Î¾}}_{n,k}$, and ${\mathrm{Ïƒ}}_{n,m}$, the proofs can be seen in [23] and [24].

Lemma 1 (see [23])

Let ${\mathrm{Î¾}}_{n,0}$ be the number of nodes having no children in a binary search tree of size n. For any positive integer $nâ‰¥2$, we have

${\mathrm{Î¾}}_{n,0}\stackrel{D}{=}{\mathrm{Î¾}}_{{L}_{n},0}+{\mathrm{Î¾}}_{nâˆ’1âˆ’{L}_{n},0}^{âˆ—},$
(1)

where ${\mathrm{Î¾}}_{{L}_{n},0}\stackrel{D}{=}{\mathrm{Î¾}}_{nâˆ’1âˆ’{L}_{n},0}^{âˆ—}$, and the two random variables ${\mathrm{Î¾}}_{{L}_{n},0}$ and ${\mathrm{Î¾}}_{nâˆ’1âˆ’{L}_{n},0}^{âˆ—}$ are the independent conditioning on ${L}_{n}$.

Lemma 2 (see [23])

In a binary search tree of size n, when $nâ‰¥3$, we have

$E{\mathrm{Î¾}}_{n,0}=E{\mathrm{Î¾}}_{n,1}=\frac{n+1}{3},\phantom{\rule{2em}{0ex}}E{\mathrm{Î¾}}_{n,2}=\frac{nâˆ’2}{3},$

and

$Var{\mathrm{Î¾}}_{n,0}=Var{\mathrm{Î¾}}_{n,2}=\frac{n+1}{18},\phantom{\rule{2em}{0ex}}Var{\mathrm{Î¾}}_{n,1}=\frac{2\left(n+1\right)}{9}.$

When $n>m$,

$E{\mathrm{Ïƒ}}_{n,m}=\frac{2\left(n+1\right)}{\left(m+1\right)\left(m+2\right)};$
(2)

when $n>2m$,

$Var{\mathrm{Ïƒ}}_{n,m}=\frac{m\left(5mâˆ’2\right)\left(n+1\right)}{\left(m+1\right){\left(m+2\right)}^{2}\left(2m+1\right)}:=\left(n+1\right){d}_{m}^{2},$
(3)

where EX and VarX denote the expectation and variance of X, respectively.

In the following, by computing the fourth moment of ${\mathrm{Î¾}}_{n,k}$ and ${\mathrm{Ïƒ}}_{n,m}$, we obtain the strong limit properties (in the sense of a.e.) of them by the Chebyshev inequality and the Borel-Cantelli lemma.

## 2 Main result

Theorem 1 In a binary search tree of size n, for any integer $k=0,1,2$, we have

$\underset{nâ†’\mathrm{âˆž}}{lim}\frac{{\mathrm{Î¾}}_{n,k}}{n}=\frac{1}{3}\phantom{\rule{1em}{0ex}}\mathit{\text{a.e.}}$
(4)

Proof From the Theorem 5 of [23], we already have ${\mathrm{Î¾}}_{n,0}={\mathrm{Î¾}}_{n,2}+1$ and ${\mathrm{Î¾}}_{n,0}+{\mathrm{Î¾}}_{n,1}+{\mathrm{Î¾}}_{n,2}=n$. Then we have by Lemma 2

$E{\left[{\mathrm{Î¾}}_{n,1}âˆ’\frac{n+1}{3}\right]}^{4}=E{\left[n+1âˆ’2{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}=16E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4},$
(5)
$E{\left[{\mathrm{Î¾}}_{n,2}âˆ’\frac{nâˆ’2}{3}\right]}^{4}=E{\left[{\mathrm{Î¾}}_{n,0}âˆ’1âˆ’\frac{nâˆ’2}{3}\right]}^{4}=E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}.$
(6)

In the following, we will show the exact expression of $E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}$, then we can get (4) by the Borel-Cantelli lemma.

$\begin{array}{l}E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=E{\left[{\mathrm{Î¾}}_{{L}_{n},0}+{\mathrm{Î¾}}_{nâˆ’1âˆ’{L}_{n},0}^{âˆ—}âˆ’\frac{n+1}{3}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=E\left[\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}{\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}+{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)}^{4}P\left({L}_{n}=j\right)\right]\\ \phantom{\rule{1em}{0ex}}=\frac{1}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}+{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=\frac{1}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}\left\{E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+4E\left[{\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right)}^{3}\left({\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)\right]\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+6E\left[{\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right)}^{2}{\left({\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)}^{2}\right]+4E\left[\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right){\left({\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)}^{3}\right]\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+E{\left[{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right]}^{4}\right\}.\end{array}$
(7)

By the independence of ${\mathrm{Î¾}}_{j,0}$ and ${\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}$, and ${\mathrm{Î¾}}_{j,0}\stackrel{D}{=}{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}$, we have

$E\left[{\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right)}^{3}\left({\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)\right]=E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{3}E\left[{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right]=0,$
(8)
$E\left[\left({\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right){\left({\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right)}^{3}\right]=E\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]E{\left[{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right]}^{3}=0.$
(9)

By ${\mathrm{Î¾}}_{j,0}\stackrel{D}{=}{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}$, (7), (8), and (9), we have

$\begin{array}{rcl}E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}& =& \frac{2}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{2}E{\left[{\mathrm{Î¾}}_{nâˆ’jâˆ’1,0}^{âˆ—}âˆ’\frac{nâˆ’j}{3}\right]}^{2}\\ =& \frac{2}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’j\right)}{{18}^{2}}.\end{array}$
(10)

Using (10) once again, we arrive at

$\begin{array}{rcl}E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}& =& \frac{2}{n}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+\frac{2}{n}E{\left[{\mathrm{Î¾}}_{nâˆ’1,0}âˆ’\frac{n}{3}\right]}^{4}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’j\right)}{{18}^{2}}\\ =& \frac{2}{n}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’1âˆ’j\right)}{{18}^{2}}+\frac{2}{n}E{\left[{\mathrm{Î¾}}_{nâˆ’1,0}âˆ’\frac{n}{3}\right]}^{4}\\ âˆ’\frac{6}{n}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’1âˆ’j\right)}{{18}^{2}}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’1}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’j\right)}{{18}^{2}}\\ =& \frac{nâˆ’1}{n}\left[\frac{2}{nâˆ’1}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}E{\left[{\mathrm{Î¾}}_{j,0}âˆ’\frac{j+1}{3}\right]}^{4}+\frac{6}{nâˆ’1}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}\frac{\left(j+1\right)\left(nâˆ’1âˆ’j\right)}{{18}^{2}}\right]\\ +\frac{2}{n}E{\left[{\mathrm{Î¾}}_{nâˆ’1,0}âˆ’\frac{n}{3}\right]}^{4}+\frac{6}{n}\underset{j=0}{\overset{nâˆ’2}{âˆ‘}}\frac{j+1}{{18}^{2}}+\frac{1}{54}\\ =& \frac{n+1}{n}E{\left[{\mathrm{Î¾}}_{nâˆ’1,0}âˆ’\frac{n}{3}\right]}^{4}+\frac{n+1}{108}.\end{array}$

Hence, we have

$\frac{E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}}{n+1}=\frac{E{\left[{\mathrm{Î¾}}_{nâˆ’1,0}âˆ’\frac{n}{3}\right]}^{4}}{n}+\frac{1}{108}.$
(11)

By (11), we obtain

$\frac{E{\left[{\mathrm{Î¾}}_{n,0}âˆ’\frac{n+1}{3}\right]}^{4}}{n+1}=â‹¯=\frac{E{\left[{\mathrm{Î¾}}_{2,0}âˆ’1\right]}^{4}}{3}+\frac{nâˆ’2}{108}=\frac{nâˆ’2}{108}.$
(12)

By (12),

$E{\left[\frac{{\mathrm{Î¾}}_{n,0}}{n+1}âˆ’\frac{1}{3}\right]}^{4}=\frac{nâˆ’2}{108{\left(n+1\right)}^{3}}â‰¤\frac{1}{108{\left(n+1\right)}^{2}}.$
(13)

By the Chebyshev inequality and (13), for arbitrary $\mathrm{Îµ}>0$, we have

$P\left(|\frac{{\mathrm{Î¾}}_{n,0}}{n+1}âˆ’\frac{1}{3}|â‰¥\mathrm{Îµ}\right)â‰¤\frac{E{\left[\frac{{\mathrm{Î¾}}_{n,0}}{n+1}âˆ’\frac{1}{3}\right]}^{4}}{{\mathrm{Îµ}}^{4}}â‰¤\frac{1}{108{\left(n+1\right)}^{2}{\mathrm{Îµ}}^{4}}.$

Then

$\underset{n=1}{\overset{\mathrm{âˆž}}{âˆ‘}}P\left(|\frac{{\mathrm{Î¾}}_{n,0}}{n+1}âˆ’\frac{1}{3}|â‰¥\mathrm{Îµ}\right)<\mathrm{âˆž}.$
(14)

By the Borel-Cantelli lemma and (14), for arbitrary $\mathrm{Îµ}>0$, we have

$P\left(\underset{nâ‰¥k}{â‹ƒ}\left\{|\frac{{\mathrm{Î¾}}_{n,0}}{n+1}âˆ’\frac{1}{3}|â‰¥\mathrm{Îµ}\right\}\right)â†’0\phantom{\rule{1em}{0ex}}\left(kâ†’\mathrm{âˆž}\right).$
(15)

By (15), we have (4) holds in the case $k=0$; by (13), (5), and (6), we have (4) holds in the case $k=1$ and $k=2$. This completes the proof.â€ƒâ–¡

In the following, we will show the strong limit property of ${\mathrm{Ïƒ}}_{n,m}$ in a random binary search tree of size n.

Theorem 2 Let n, m be two positive integers, ${\mathrm{Ïƒ}}_{n,m}$ be the number of subtrees of size m (<n) in random binary search trees of size n. Then

$\underset{nâ†’\mathrm{âˆž}}{lim}\frac{{\mathrm{Ïƒ}}_{n,m}}{n}=\frac{2}{\left(m+1\right)\left(m+2\right)}\phantom{\rule{1em}{0ex}}\mathit{\text{a.e.}}$
(16)

Proof When $j, ${\mathrm{Ïƒ}}_{j,m}â‰¡0$; ${\mathrm{Ïƒ}}_{m,m}=1$; when $n>m$ , by (2) and (3), we have

$\begin{array}{l}E{\left[{\mathrm{Ïƒ}}_{n,m}âˆ’\frac{2\left(n+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=E{\left[\left({\mathrm{Ïƒ}}_{{L}_{n},m}âˆ’\frac{2\left({L}_{n}+1\right)}{\left(m+1\right)\left(m+2\right)}\right)+\left({\mathrm{Ïƒ}}_{nâˆ’1âˆ’{L}_{n},m}^{âˆ—}âˆ’\frac{2\left({R}_{n}+1\right)}{\left(m+1\right)\left(m+2\right)}\right)\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=\frac{2}{n}\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}E{\left[\left({\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right)+\left(0âˆ’\frac{2\left(nâˆ’j\right)}{\left(m+1\right)\left(m+2\right)}\right)\right]}^{4}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{1}{n}\underset{j=m}{\overset{nâˆ’mâˆ’1}{âˆ‘}}E{\left[\left({\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right)+\left({\mathrm{Ïƒ}}_{nâˆ’1âˆ’j,m}^{âˆ—}âˆ’\frac{2\left(nâˆ’j\right)}{\left(m+1\right)\left(m+2\right)}\right)\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=\frac{2}{n}\underset{j=m}{\overset{nâˆ’1}{âˆ‘}}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{6}{n}\underset{j=m}{\overset{nâˆ’mâˆ’1}{âˆ‘}}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}E{\left[{\mathrm{Ïƒ}}_{nâˆ’1âˆ’j,m}^{âˆ—}âˆ’\frac{2\left(nâˆ’j\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}âˆ’\frac{8}{n}\underset{j=nâˆ’k}{\overset{nâˆ’1}{âˆ‘}}\frac{2\left(nâˆ’j\right)}{\left(k+1\right)\left(k+2\right)}E{\left[{\mathrm{Ïƒ}}_{j,k}âˆ’\frac{2\left(j+1\right)}{\left(k+1\right)\left(k+2\right)}\right]}^{3}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{12}{n}\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}{\left[\frac{2\left(nâˆ’j\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{2}{n}\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}{\left[\frac{2\left(nâˆ’j\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}\\ \phantom{\rule{1em}{0ex}}=\frac{n+1}{n}E{\left[{\mathrm{Ïƒ}}_{nâˆ’1,m}âˆ’\frac{2n}{\left(m+1\right)\left(m+2\right)}\right]}^{4}+\frac{6{d}_{m}^{4}}{n}\left\{\underset{j=m}{\overset{nâˆ’1}{âˆ‘}}\left(j+1\right)\left(nâˆ’j\right)âˆ’\underset{j=m}{\overset{nâˆ’2}{âˆ‘}}\left(j+1\right)\left(nâˆ’1âˆ’j\right)\right\}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}âˆ’\frac{16}{n\left(m+1\right)\left(m+2\right)}\left\{\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}\left(nâˆ’j\right)E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}âˆ’\underset{j=nâˆ’1âˆ’m}{\overset{nâˆ’2}{âˆ‘}}\left(nâˆ’1âˆ’j\right)E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\right\}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{12{d}_{m}^{2}}{n}\left\{\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}{\left[\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\left(j+1\right)âˆ’\underset{j=nâˆ’1âˆ’m}{\overset{nâˆ’2}{âˆ‘}}{\left[\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\left(j+1\right)\right\}.\end{array}$
(17)

The second term of (17),

$\begin{array}{rcl}\frac{6{d}_{m}^{4}}{n}\left\{\underset{j=m}{\overset{nâˆ’1}{âˆ‘}}\left(j+1\right)\left(nâˆ’j\right)âˆ’\underset{j=m}{\overset{nâˆ’2}{âˆ‘}}\left(j+1\right)\left(nâˆ’1âˆ’j\right)\right\}& =& 3\left(nâˆ’2mâˆ’1\right){d}_{m}^{4}+\frac{6\left(nâˆ’m\right)\left(m+1\right)}{n}{d}_{m}^{4}\\ =& O\left(n+1\right),\end{array}$
(18)

where ${x}_{n}=O\left(n\right)$ means that ${x}_{n}/nâ†’\mathrm{constant}$ as $nâ†’\mathrm{âˆž}$. Then by ${\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}/nâ‰¤1$, the third term of (17),

$\begin{array}{l}\frac{16}{n}\left\{\underset{j=nâˆ’1âˆ’m}{\overset{nâˆ’2}{âˆ‘}}\frac{nâˆ’1âˆ’j}{\left(m+1\right)\left(m+2\right)}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}âˆ’\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}\frac{nâˆ’j}{\left(m+1\right)\left(m+2\right)}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\right\}\\ \phantom{\rule{1em}{0ex}}=\frac{âˆ’16}{n\left(m+1\right)\left(m+2\right)}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}Ã—\left\{\underset{j=nâˆ’m}{\overset{nâˆ’2}{âˆ‘}}E{\left[{\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}âˆ’E{\left[{\mathrm{Ïƒ}}_{nâˆ’1,m}âˆ’\frac{2n}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\right\}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{16m}{n\left(m+1\right)\left(m+2\right)}E{\left[{\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}âˆ’\frac{2\left(nâˆ’m\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{3}\\ \phantom{\rule{1em}{0ex}}=\frac{16}{\left(m+1\right)\left(m+2\right)}\underset{j=nâˆ’m}{\overset{nâˆ’2}{âˆ‘}}E\left[\left(\frac{âˆ’{\mathrm{Ïƒ}}_{j,m}}{n}+\frac{2\left(j+1\right)}{n\left(m+1\right)\left(m+2\right)}\right){\left({\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\right]\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{16}{\left(m+1\right)\left(m+2\right)}E\left[\left(\frac{âˆ’{\mathrm{Ïƒ}}_{nâˆ’1,m}}{n}+\frac{2}{\left(m+1\right)\left(m+2\right)}\right){\left({\mathrm{Ïƒ}}_{nâˆ’1,m}âˆ’\frac{2n}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\right]\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{16}{\left(m+1\right)\left(m+2\right)}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}Ã—E\left[\left(\frac{{\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}}{n}âˆ’\frac{2\left(nâˆ’m\right)}{n\left(m+1\right)\left(m+2\right)}\right){\left({\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}âˆ’\frac{2\left(nâˆ’m\right)}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\right]\\ \phantom{\rule{1em}{0ex}}<\frac{16}{\left(m+1\right)\left(m+2\right)}\underset{j=nâˆ’m}{\overset{nâˆ’2}{âˆ‘}}\left[0+\frac{2\left(j+1\right)}{n\left(m+1\right)\left(m+2\right)}\right]E{\left({\mathrm{Ïƒ}}_{j,m}âˆ’\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{32}{\left(m+1\right)\left(m+2\right)}E\left[\left(0+\frac{1}{\left(m+1\right)\left(m+2\right)}\right){\left({\mathrm{Ïƒ}}_{nâˆ’1,m}âˆ’\frac{2n}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\right]\\ \phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}+\frac{16}{\left(m+1\right)\left(m+2\right)}E\left[\left(\frac{{\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}}{n}âˆ’0\right){\left({\mathrm{Ïƒ}}_{nâˆ’1âˆ’m,m}âˆ’\frac{2\left(nâˆ’m\right)}{\left(m+1\right)\left(m+2\right)}\right)}^{2}\right]\\ \phantom{\rule{1em}{0ex}}<\frac{32{d}_{m}^{2}}{{\left[\left(m+1\right)\left(m+2\right)\right]}^{2}}\underset{j=nâˆ’m}{\overset{nâˆ’2}{âˆ‘}}\frac{{\left(j+1\right)}^{2}}{n}+\frac{32n{d}_{m}^{2}}{{\left[\left(m+1\right)\left(m+2\right)\right]}^{2}}+\frac{16\left(nâˆ’m\right){d}_{m}^{2}}{\left(m+1\right)\left(m+2\right)}\\ \phantom{\rule{1em}{0ex}}=O\left(n+1\right).\end{array}$
(19)

The last term of (17),

$\begin{array}{l}\frac{12{d}_{m}^{2}}{n}\left\{\underset{j=nâˆ’m}{\overset{nâˆ’1}{âˆ‘}}{\left[\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\left(j+1\right)âˆ’\underset{j=nâˆ’1âˆ’m}{\overset{nâˆ’2}{âˆ‘}}{\left[\frac{2\left(j+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\left(j+1\right)\right\}\\ \phantom{\rule{1em}{0ex}}=\frac{12{d}_{m}^{2}}{n}\left\{{\left[\frac{2n}{\left(m+1\right)\left(m+2\right)}\right]}^{2}nâˆ’{\left[\frac{2\left(nâˆ’m\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{2}\left(nâˆ’m\right)\right\}\\ \phantom{\rule{1em}{0ex}}<\frac{48{d}_{m}^{2}\left[{n}^{3}âˆ’{\left(nâˆ’m\right)}^{3}\right]}{n{\left[\left(m+1\right)\left(m+2\right)\right]}^{2}}=O\left(n+1\right).\end{array}$
(20)

By (17), (18), (19), and (20), we have

$E{\left[{\mathrm{Ïƒ}}_{n,m}âˆ’\frac{2\left(n+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}<\frac{n+1}{n}E{\left[{\mathrm{Ïƒ}}_{nâˆ’1,m}âˆ’\frac{2n}{\left(m+1\right)\left(m+2\right)}\right]}^{4}+O\left(n+1\right).$
(21)

Repeating (21), we have

$\frac{E{\left[{\mathrm{Ïƒ}}_{n,m}âˆ’\frac{2\left(n+1\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}}{n+1}<â‹¯<\frac{E{\left[{\mathrm{Ïƒ}}_{2m+1,m}âˆ’\frac{2\left(2m+2\right)}{\left(m+1\right)\left(m+2\right)}\right]}^{4}}{2m+2}+O\left(1\right).$
(22)

By (22), for n large enough and fixed m, we have

$E{\left[\frac{{\mathrm{Ïƒ}}_{n,m}}{n+1}âˆ’\frac{2}{\left(m+1\right)\left(m+2\right)}\right]}^{4}
(23)

By the Chebyshev inequality, the Borel-Cantelli lemma and (23), for arbitrary $\mathrm{Îµ}>0$, we have

$P\left(\underset{nâ‰¥m}{â‹ƒ}\left\{|\frac{{\mathrm{Ïƒ}}_{n,m}}{n+1}âˆ’\frac{2}{\left(m+1\right)\left(m+2\right)}|â‰¥\mathrm{Îµ}\right\}\right)â†’0\phantom{\rule{1em}{0ex}}\left(mâ†’\mathrm{âˆž}\right).$
(24)

By (24), (16) holds. This is the end of the proof.â€ƒâ–¡

## References

1. Kemp R: Fundamentals of the Average Case Analysis of Particular Algorithms. Wiley-Teubner, Stuttgart; 1984.

2. Knuth D 3. In The Art of Computer Programming: Sorting and Searching. Addison-Wesley, Reading; 1973.

3. Mahmoud H: Evolution of Random Search Trees. Wiley, New York; 1992.

4. Sedgewick R, Flajolet P: An Introduction to the Analysis of Algorithms. Addison-Wesley, Reading; 1996.

5. Kirschenhofer P: On the height of leaves in binary trees. J. Comb. Inf. Syst. Sci. 1983, 8: 44â€“60.

6. Panholzer A, Prodinger H: Descendants and ascendants in binary trees. Discrete Math. Theor. Comput. Sci. 1997, 1: 247â€“266.

7. Devroye L, Neininger R: Distances and finger search in random binary search trees. SIAM J. Comput. 2004, 33: 647â€“658. 10.1137/S0097539703424521

8. Mahmoud H, Neininger R: Distribution of distances in random binary search trees. Ann. Appl. Probab. 2003, 13(1):253â€“276.

9. Svante J: Left and right pathlenghts in random binary trees. Algorithmica 2006, 46: 419â€“429. 10.1007/s00453-006-0099-3

10. Devroye L: Applications of Steinâ€™s method in the analysis of random binary search trees. Institute for Mathematical Sciences Lecture Notes Series 5. In Steinâ€™s Method and Applications. Edited by: Chen L, Barbour A. World Scientific, Singapore; 2005:247â€“297.

11. Drmota M: An analytic approach to the height of binary search trees. J. Assoc. Comput. Mach. 2001, 29: 89â€“119.

12. Drmota M: An analytic approach to the height of binary search trees II. J. Assoc. Comput. Mach. 2003, 50: 333â€“374. 10.1145/765568.765572

13. Devroye L: A note on the height of binary search trees. J. Assoc. Comput. Mach. 1986, 33: 489â€“498. 10.1145/5925.5930

14. Devroye L: Branching processes in the analysis of the height of trees. Acta Inform. 1987, 24: 277â€“298.

15. Drmota M: The variance of the height of binary search trees. Theor. Comput. Sci. 2002, 270: 913â€“919. 10.1016/S0304-3975(01)00006-8

16. Flajolet P, Martinez C, Gourdon X: Patterns in random binary search trees. Random Struct. Algorithms 1997, 11: 223â€“244. 10.1002/(SICI)1098-2418(199710)11:3<223::AID-RSA2>3.0.CO;2-2

17. Robson JM: On the concentration of the height of binary search trees. Lecture Notes in Computer Science 1256. ICALP 97 Proceedings 1997, 441â€“448.

18. Robson JM: Constant bounds on the moments of the height of binary search trees. Theor. Comput. Sci. 2002, 276: 435â€“444. 10.1016/S0304-3975(01)00306-1

19. Su C, Liu J, Feng QQ: A note on the distance in random recursive trees. Stat. Probab. Lett. 2006, 76: 1748â€“1755. 10.1016/j.spl.2006.04.020

20. Su C, Liu J, Hu ZS: The law of large numbers of the size of complete interval trees. Adv. Math. China 2007, 36(2):181â€“188. (in Chinese)

21. Prodinger H: A note on the distribution of the three types of nodes in uniform binary trees. SÃ©min. Lothar. Comb. 1996., 38: Article ID 38b (electronic)

22. Rote G: Binary trees having a given number of nodes with 0, 1, and 2 children. SÃ©min. Lothar. Comb. 1997., 38: Article ID 38b (electronic)

23. Liu J, Su C, Chen Y: Limiting barticle for the nodes in binary search trees. Sci. China Ser. A, Math. 2008, 51(1):101â€“114. 10.1007/s11425-007-0129-x

24. Su C, Miao BQ, Feng QQ: On the subtrees of random binary search trees. Chin. J. Appl. Probab. Stat. 2006, 22(3):304â€“310. (in Chinese)

## Acknowledgements

This work is supported by Anhui Scientific Research Foundation (KJ2012A205, KJ2012B117, KJ2013B162) and Chaohu University Scientific Research Foundation.

## Author information

Authors

### Corresponding author

Correspondence to Peishu Chen.

### Competing interests

The author declares that they have no competing interests.

The paper contains some ethical problems, so the authors were advised by the editor to retract their paper and resubmit it after corrections.

A retraction note to this article can be found online at http://dx.doi.org/10.1186/1029-242X-2013-416.

## Rights and permissions

Chen, P., Peng, W. RETRACTED ARTICLE: Strong limiting behavior in binary search trees. J Inequal Appl 2013, 60 (2013). https://doi.org/10.1186/1029-242X-2013-60