2
$\begingroup$

In Balanced Binary Search Trees on the basis of size of left and right child subtrees, Hannes says:

For example, one can say, a BST is balanced, if each subtree has at most epsilon * n nodes, where epsilon < 1 (for example epsilon = 3/4 or even epsilon = 0.999 -- which are practically not balanced at all). The reason for that is that the height of such a BST is roughly log_{1/epsilon}

I am a bit puzzled on the last statement -- how do we know that the height is roughly 1/epsilon?

Schonfinkel
1,4954 gold badges13 silver badges26 bronze badges
asked Oct 6, 2019 at 0:44
$\endgroup$

1 Answer 1

4
$\begingroup$

Take any path in the tree, starting at the root, and consider the number of nodes at the subtree rooted at each vertex along the path. For the root, it's $n$ nodes. For the second vertex, it's at most $\epsilon n$ nodes. For the third vertex, it's at most $\epsilon^2 n$ nodes. For the $t$'th vertex, it's at most $\epsilon^{t-1} n$ nodes. If the path has length $\ell$ (edges), then the last node contains at most $\epsilon^\ell n$ nodes, and so $\epsilon^\ell n \geq 1$, or equivalently, $\ell \leq \log_{1/\epsilon} n$.

answered Oct 6, 2019 at 1:21
$\endgroup$
2
  • $\begingroup$ shouldn't $\epsilon^\ell n \geq 1$ be a $\leq$ sign? $\endgroup$ Commented Oct 6, 2019 at 1:43
  • $\begingroup$ I think the inequality is in the correct direction. $\endgroup$ Commented Oct 6, 2019 at 7:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.