GATE CSE 2019 Q56: Expected distance between two random leaves of a full binary tree with 8 leaves
- Engineering Mathematics
- 2 marks
- NAT
- No negative marking
Syllabus topic: Random variables
Question
Let be a full binary tree with 8 leaves. (A full binary tree has every level full.) Suppose two leaves and of are chosen uniformly and independently at random. The expected value of the distance between and in (i.e., the number of edges in the unique path between and ) is (rounded off to 2 decimal places) ________.
Try it: numerical answer: type the value
Show answer and explanation
Answer: 4.25 (official GATE 2019 final answer key)
Concept used: Expectation = sum over possible distances of distance × probability; for fixed leaf , the distance to is twice the height of their lowest common ancestor, and is allowed since the choices are independent.
First step: Fix ; of the 8 equally likely choices of , count how many give distance 0, 2, 4 and 6 (same leaf, sibling, same subtree of height 2, other half).
Full step-by-step solution
Loading…
Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.
More questions on Random variables
Every PYQ on this topic →Share this question
Source: official GATE 2019 CS question paper and final answer key, organised by IIT Madras. Question paper · Answer key
More Engineering Mathematics PYQs
- 2026 Session 1 · Q11Pólya urn: equal red and blue after two steps
- 2026 Session 1 · Q124×4 binary matrices with even parity in every row and column
- 2026 Session 1 · Q13Maximum multiplicity of an eigenvalue of an n×n real matrix
- 2026 Session 1 · Q20Matrix with e2 in its null space: determinant and rank
- 2026 Session 1 · Q32Continuity at 0 of c1·e^x − c2·ln(1/x)
- 2026 Session 1 · Q46Extrema and smoothness of (|x|/2 − x)(x − |x|/2)