GATE / CS ARCHIVE

GATE CSE 2009 / QUESTION 44

Maximum B-plus leaf splits

Data Structures · B-Trees & Multiway Search Trees · Full GATE CSE 2009 paper

GATE 2009, Q44 2 marks · MCQ
Report issue

B-Trees & Multiway Search Trees

Question 44, GATE 2009: Insert 10, 3, 6, 8, 4, 2, 1 into an empty B+ tree. Internal nodes allow at most 3 child pointers; leaves at most 2 data items. What is the maximum number of leaf splits, allowing valid choices of how 3 overflow items split? A 2; B 3; C 4; D 5.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

There can be at most one leaf split per insertion; the first two keys fit in the initial two-item leaf, so at most five splits occur. This bound is attained by leaving two smaller keys in the left leaf and one larger key in the right leaf at each overflow. Starting[3, 10], insertion 6 gives[3, 6]|[10]; 8 gives[3, 6]|[8]|[10]; 4 gives[3, 4]|[6]|[8]|[10]; 2 gives[2, 3]|[4]|[6]|[8]|[10]; 1 gives[1, 2]|[3]|[4]|[6]|[8]|[10]. Thus all five later insertions split a leaf, D. Internal-node splits are not counted. Exhaustive permitted split-choice enumeration confirms the maximum 5.

The first two insertions cannot split a capacity-two leaf. There are only five insertions left and each can overflow at most one leaf, so five is an upper bound. The explicit sequence of valid 1/2 splits in the baseline attains one split on each remaining insertion. That witness proves the maximum, not merely an observed count under one fixed implementation. Promoted separator changes and internal-node splits do not add to the requested leaf-split count.

Original paper, page 10