Question
In a B+ tree, if the search-key value is 8 bytes long, the block size is 512 bytes and the block pointer size is 2 bytes, then the maximum order of the B+ tree is
Official answer and solution
- Official answer
- 52
- From
- Official GATE 2017 answer key
Solution
Set up the node capacity inequality for internal nodes of a B+ tree where order is the maximum number of block pointers.
In a B+ tree of order , an internal node contains:
- At most block pointers (each of size bytes).
- At most search-key values (each of size bytes).
The total size of an internal node must fit within one disk block ( bytes):
Substitute the given parameters:
Therefore, the maximum order of the B+ tree is 52.
52
Using by swapping the key and pointer counts.
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2017 Computer Science and Information Technology (CS) Session 2
- Question
- 49 of 65, printed as CS Q.49
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.