Consider a perfect binary tree with $\mathrm{n}$ nodes and $\mathrm{h}$ height. A tree is perfect when all levels of the tree are completely full. Let root is at depth $0$ and leaves are at height $0.$
Assume Expected height of any node is $E_{h}$ and Expected depth of any node is $E_{d}$.
If we choose any node uniformly randomly then which of the following is the correct option about $S1$ and $S2?$
- $S1: \displaystyle{} E_{d}=\frac{1}{n} \sum_{r=0}^{h} r 2^{r}$
- $S2: \displaystyle{} E_{h}=\frac{1}{n} \sum_{r=0}^{h} r 2^{h-r}$
- $S1$ is correct but $S2$ is incorrect
- $S1$ is incorrect but $S2$ is correct
- Both are correct
- Both are incorrect