2
$\begingroup$

I am referring to this video https://www.youtube.com/watch?v=vgELyZ9LXX4 at 1:08:39 .

$n$ : number of nodes in the tree

$Z_{n,k}$ : Indicator random variable that activates when rank of the root is k

$X_n$ : random variable denoting height of BST

$Y_n$ : random variable denoting $2^{X_n}$

In the video, it is said that $Z_{n,k}$ and $max(Y_{k-1} , Y_{n-k})$ are independent events.

But how they are independent? If we have $k=1$, then the max height can go till n. And when we have $k=n/2$ , max can go till $n/2$ only. Therefore the choice made by $Z_{n,i}$ affects the possibilities for $Y_{k-1}$ and $Y_{n-k}$

$\endgroup$
1
$\begingroup$

I haven't watched the video, but presumably it uses the following model of random BST. You start with one element. Then you insert an element which is smaller than the existing element w.p. 1/2, and larger w.p. 1/2. Then you insert an element which is smaller than both existing elements w.p. 1/3, is between them w.p. 1/3, and larger than both w.p. 1/3. In the $n$th step, you similarly insert the new element in one of the $n$ positions, with equal probability for all.

This means that $Z_{n,k}$, which indicates whether the $n$th element got inserted in the $k$th position, is independent of anything that went on before, and in particular of $Y_1,\ldots,Y_{n-1}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.