65.9k views
5 votes
Suppose there is a B tree of order 'k', how many keys will the nodes of this tree contain, if the node is not a root node? Answer: A. Maximum (k-1)/2 keys B. Minimum (k-1)/2 keys C. Exactly (k-1)/2 keys D. None of the above​

User Jnsnsml
by
7.9k points

1 Answer

3 votes

In a B-tree, the concept of order is an important one. The order 'k' of a B-tree influences the number of keys in each of its non-root nodes.

The non-root nodes in a B-tree can have a number of keys ranging from ceil(k/2) - 1 to k - 1, where 'ceil' is the ceiling function that rounds up to the nearest whole number.

In the provided options, none of them satisfy this condition.

Option A says that the non-root nodes can have a maximum of (k-1)/2 keys. According to the formula we noted before, this is incorrect.

Option B indicates that the non-root nodes can have a minimum of (k-1)/2 keys, which is also wrong.

Option C suggests that the non-root nodes will have exactly (k-1)/2 keys. This is also incorrect as the number of keys can range from ceil(k/2) - 1 to k - 1.

Given these explanations, the most appropriate answer would be option D: None of the above, as this is the only option that fits with the explanation we formulated based on the number of keys that non-root nodes in a B-tree of order 'k' are reported to contain.

Answer: D. None of the above​

User Nullstellensatz
by
8.1k points