Skip to content
Official PYQ · 2008

GATE CS 2008 Q41 — File Organization and Indexing (B and B+ Trees)

Explain with AI

A B-tree of order 44 is built from scratch by 1010 successive insertions. What is the maximum number of node splitting operations that may take place?

Choose one option
View worked solution

Answer: C

For a B-tree of order p=4p = 4:

  • The maximum number of keys in any node is p−1=3p - 1 = 3.
  • A node splits when it receives a 4th4^{\text{th}} key.

Let LL be the number of leaf splits and II be the number of internal node splits. The total number of splits is S=L+IS = L + I.

1. Maximum Leaf Splits (LL):

  • The first leaf split requires 44 insertions.
  • Each subsequent leaf split requires at least 22 additional insertions (since a split leaf contains at least 11 key, and we must insert 22 more keys to make it 44).
  • For LL leaf splits, the minimum number of insertions required is: Insertions≥4+2(L−1)=2L+2\text{Insertions} \ge 4 + 2(L - 1) = 2L + 2
  • With 1010 insertions: 2L+2≤10  ⟹  L≤42L + 2 \le 10 \implies L \le 4.

2. Maximum Internal Splits (II):

  • Each leaf split promotes exactly 11 key to the internal level. Thus, the total number of keys in all internal nodes is at most L=4L = 4.
  • To split an internal node, it must accumulate 44 keys. With at most 44 keys in total across all internal nodes, we can have at most I=1I = 1 internal split (as a split distributes these 44 keys across 33 internal nodes, preventing any single node from reaching 44 keys again).

Thus, the maximum number of node splits is L+I=4+1=5L + I = 4 + 1 = 5.

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