What is the expected number of leaves in a randomized binary search tree?

Category: QuestionsWhat is the expected number of leaves in a randomized binary search tree?
Editor">Editor Staff asked 1 month ago

What is the expected number of leaves in a randomized binary search tree?
 
(a) n + 1
 
(b) (n + 1)/3
 
(c) (n + 1)/2
 
(d) n + 3
 
This question is from Binary Trees in portion Binary Trees of Data Structures & Algorithms I
 
This question was addressed to me by my college professor while I was bunking the class.

1 Answers
Editor">Editor Staff answered 1 month ago

The correct answer is (b) (n + 1)/3
 
To explain: In a random mathematical model, the expected value of number of leaves in a randomized binary search tree is found to be exactly (n + 1)/3 using probability.