A B-tree of order is built from scratch by successive insertions. What is the maximum number of node splitting operations that may take place?
View worked solution
Answer: C
For a B-tree of order :
- The maximum number of keys in any node is .
- A node splits when it receives a key.
Let be the number of leaf splits and be the number of internal node splits. The total number of splits is .
1. Maximum Leaf Splits ():
- The first leaf split requires insertions.
- Each subsequent leaf split requires at least additional insertions (since a split leaf contains at least key, and we must insert more keys to make it ).
- For leaf splits, the minimum number of insertions required is:
- With insertions: .
2. Maximum Internal Splits ():
- Each leaf split promotes exactly key to the internal level. Thus, the total number of keys in all internal nodes is at most .
- To split an internal node, it must accumulate keys. With at most keys in total across all internal nodes, we can have at most internal split (as a split distributes these keys across internal nodes, preventing any single node from reaching keys again).
Thus, the maximum number of node splits is .
Free practice · Your answers on this page are not saved.
