Skip to content
Official PYQ · 2010

GATE CS 2010 Q18 — File Organization and Indexing (B and B+ Trees)

Explain with AI

Consider a B+B^+-tree in which the maximum number of keys in a node is 55. What is the minimum number of keys in any non-root node?

Choose one option
View worked solution

Answer: B

To find the minimum number of keys in any non-root node of a B+B^+-tree, we must consider both non-root internal (non-leaf) nodes and leaf nodes.

Given that the maximum number of keys in any node is U=5U = 5.

1. Non-root Internal Nodes

  • The maximum number of pointers (children) an internal node can have is P=U+1=5+1=6P = U + 1 = 5 + 1 = 6.
  • The minimum number of pointers for a non-root internal node is ⌈P/2⌉=⌈6/2⌉=3\lceil P/2 \rceil = \lceil 6/2 \rceil = 3.
  • Since the number of keys in an internal node is always pointers−1\text{pointers} - 1, the minimum number of keys in a non-root internal node is: Min keys (internal)=3−1=2\text{Min keys (internal)} = 3 - 1 = 2

2. Leaf Nodes

  • The minimum number of keys in a leaf node is ⌈U/2⌉=⌈5/2⌉=3\lceil U/2 \rceil = \lceil 5/2 \rceil = 3.

Comparing both cases, the minimum number of keys in any non-root node is min⁡(2,3)=2\min(2, 3) = 2.

Therefore, the correct option is B.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore File Organization and Indexing (B and B+ Trees) questions