GATE / CS ARCHIVE

GATE CSE 2024 SET 1 / QUESTION 21

Root exception to B+ tree occupancy

Data Structures · B-Trees & Multiway Search Trees · Full GATE CSE 2024 Set 1 paper

GATE 2024 Set 1, Q21 1 mark · MCQ
Report issue

B-Trees & Multiway Search Trees

Question 21, GATE 2024: In a B+ tree, which nodes are exempt from the general requirement of at least 50% occupancy? A Only the root; B all leaves; C all internal nodes; D only the leftmost leaf.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Approach: Separate the root's special role from the minimum-occupancy rules for ordinary nodes.
1. A B+ tree keeps nonroot nodes sufficiently full so that the number of nodes, and hence the height and search cost, stay controlled. Splitting, redistribution and merging maintain these lower bounds after updates.
2. The root needs an exception. If the entire tree fits in one leaf, that root leaf can contain only a few records. If the root is internal, it may have just two children even when the ordinary minimum for an internal node is larger.
3. Giving all leaves or all internal nodes the same exemption would abandon the normal occupancy guarantee. Being the leftmost leaf does not create an exception either.
Answer: A. Precise key-versus-child counts depend on the chosen order convention, but the special status of the root does not.

Original paper, page 15 · Answer key