1,266 views
0 votes
0 votes
What was  the Expectancy in the full binary tree question asked in the exam ?

I got 3

3 Answers

3 votes
3 votes
I think the answer is 34/8 = 4.25.

Question: From a complete binary tree T of 8 leaf nodes, a and b are selected randomly and independently. What is the expected distance between a and b in T.

Here is how I solved it:

Since, the two leaf nodes are selected independently, both nodes can be same. If the leaf nodes are numbered 1 to 8 from left to right, then,

I can reach 1 node (i.e., same node) in a distance = 0

I can reach 1 node in a distance = 2

I can reach 2 nodes in a distance = 4

I can reach 4 nodes in a distance = 6

So, expected distance = (1 * 0 + 1 * 2 + 2 * 4 + 4 * 6)/(1 + 1 + 2 + 4) = 34/8.
2 votes
2 votes
4.85=34/7

Related questions

1 votes
1 votes
8 answers
1
mradul asked Feb 21, 2019
2,273 views
I want to challenge the recursive question of gate 2019.Can u suggest what supporting document can be placed?
0 votes
0 votes
1 answer
2
mradul asked Feb 21, 2019
1,156 views
is anyone has yet challenge the questions of answer key 2019?
5 votes
5 votes
5 answers
3
Ahabnnc asked Feb 19, 2019
3,872 views
Gate answer key says the answer of 2 Input NOR Gate as 4.
0 votes
0 votes
2 answers
4
Ahabnnc asked Feb 18, 2019
728 views
Are the gate keys out yet. If not, any info on when will they be out?