Skip to content
Official PYQ · 2004

GATE CS 2004 Q52 — File Organization and Indexing (B and B+ Trees)

Explain with AI

The order of an internal node in a B+B+ tree index is the maximum number of children it can have. Suppose that a child pointer takes 66 bytes, the search field value takes 1414 bytes, and the block size is 512512 bytes. What is the order of the internal node?

Choose one option
View worked solution

Answer: C

In a B+\text{B}^+ tree, an internal node of order PP (where PP is the maximum number of child pointers) contains:

  • At most PP child pointers
  • At most P−1P - 1 search key values

Let:

  • PP be the order of the internal node.
  • Vp=6 bytesV_p = 6\text{ bytes} (size of a child pointer).
  • Vk=14 bytesV_k = 14\text{ bytes} (size of a search key value).
  • B=512 bytesB = 512\text{ bytes} (block size).

To fit the internal node within a single disk block, the total size must satisfy the inequality:

P⋅Vp+(P−1)⋅Vk≤BP \cdot V_p + (P - 1) \cdot V_k \le B

Substituting the given values:

P⋅6+(P−1)⋅14≤512P \cdot 6 + (P - 1) \cdot 14 \le 512 6P+14P−14≤5126P + 14P - 14 \le 512 20P≤52620P \le 526 P≤52620=26.3P \le \frac{526}{20} = 26.3

Since the order PP must be an integer, the maximum possible value is P=26P = 26.

Therefore, the order of the internal node is 26 (Option C).

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