UGC-NET Dec 2015 · Trees

MCQ · 2 marks · Problem PROG-DSTR-0015

The number of disk pages access in B-tree search, where h is height, n is the number of keys and t is the minimum degree, is
  1. A
    $\theta (\log_n h*t)$
  2. B
    $\theta (\log_t n*h)$
  3. C
    $\theta (\log_h n)$
  4. D
    $\theta (\log_t n)$

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionA B-tree search reads one node (one disk page) per level, so the number of page accesses equals the height. For a B-tree of minimum degree \(t\ge2\) with \(n\) keys,\[\boxed{h\le\log_t\frac{n+1}{2}}\]because every non-root node has at least \(t\) children. Hence\[\text{disk accesses}=O(h)=\Theta(\log_t n).\]Answer: D

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