UGC-NET Jun 2014 · Indexing (B-trees, B+ trees, Hash Indexing)

MCQ · 2 marks · Problem DBMS-INDX-0010

The upper bound and lower bound for the number of leaves in a B-tree of degree $K$ with height $h$ is given by :
  1. A
    $K^{h}$ and $2 \lceil \frac{k}{2} \rceil ^{h-1}$
  2. B
    $K * h$ and $2 \lfloor \frac{k}{2} \rfloor ^{h-1}$
  3. C
    $K^{h}$ and $2 \lfloor \frac{k}{2} \rfloor ^{h-1}$
  4. D
    $K * h$ and $2 \lceil \frac{k}{2} \rceil ^{h-1}$

Solve it on GATE DA practice →More Storage & Indexing problems

Show the worked solution\[\boxed{2\Big\lceil\frac K2\Big\rceil^{h-1}\le \text{leaves}\le K^{h}}\]Upper bound: every node has at most \(K\) children, so after \(h\) levels there are at most \(K^h\) leaves. Lower bound: the root has at least 2 children and every other internal node at least \(\lceil K/2\rceil\). That gives at least \(2\lceil K/2\rceil^{h-1}\) leaves. Only option (A) has both \(K^h\) and the ceiling.Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com