Theorem 1 In a binary search tree of size n, for any integer , we have
(4)
Proof From the Theorem 5 of [23], we already have and . Then we have by Lemma 2
(5)
(6)
In the following, we will show the exact expression of , then we can get (4) by the Borel-Cantelli lemma.
(7)
By the independence of and , and , we have
(8)
(9)
By , (7), (8), and (9), we have
(10)
Using (10) once again, we arrive at
Hence, we have
(11)
By (11), we obtain
(12)
By (12),
(13)
By the Chebyshev inequality and (13), for arbitrary , we have
Then
(14)
By the Borel-Cantelli lemma and (14), for arbitrary , we have
(15)
By (15), we have (4) holds in the case ; by (13), (5), and (6), we have (4) holds in the case and . This completes the proof. □
In the following, we will show the strong limit property of in a random binary search tree of size n.
Theorem 2 Let n, m be two positive integers, be the number of subtrees of size m (<n) in random binary search trees of size n. Then
(16)
Proof When , ; ; when , by (2) and (3), we have
(17)
The second term of (17),
(18)
where means that as . Then by , the third term of (17),
(19)
The last term of (17),
(20)
By (17), (18), (19), and (20), we have
(21)
Repeating (21), we have
(22)
By (22), for n large enough and fixed m, we have
(23)
By the Chebyshev inequality, the Borel-Cantelli lemma and (23), for arbitrary , we have
(24)
By (24), (16) holds. This is the end of the proof. □