896 views
0 votes
0 votes
Consider a B+ tree in which the maximum number of keys in a Internal node is 5 and maximum number of keys in a leaf node is 4. What is the minimum number of keys in any non-root node?

3 Answers

0 votes
0 votes

In case of B+ trees

Use the Formula  [(ceil of (p/2)-1),p-1], to calculate the Minimum and maximum number keys in an internal node.

Here P is the Order of the Internal Nodes.

 

 

0 votes
0 votes
it's impossible.in B+ tree order is the max no of keys present in leaf node and max child ptrs present in non-leaf nodes. so according to the q order is 4 and as order 4 max keys that can be present in any non-leaf node is 3 ..but your q says its 5 which is not possible.. it has to be less than 4
0 votes
0 votes

Answer is 2


Given:

  1. B+ tree 
  2. Max no. of keys in the internal node is 5
  3. Max no. of keys in the leaf node is 4

Solution:

We know that the max child pointer in the internal node of the B+ tree


= max no of keys in internal node + 1

= 5 + 1  i.e  6

Hence the max order of B+ tree internal node = 6

 

 

Now for a given internal node of the B+ tree, the min order of any internal node

=  ceil (order / 2)

= ceil (6/2)

= 3

Now, if the min order is 3, then min number of keys would be 3-1 = 2

 

Related questions

1 votes
1 votes
0 answers
1
newdreamz a1-z0 asked Jan 2, 2019
492 views
For range queries every B+ tree index requires less I/O than a full table scan.can anyone explain?
2 votes
2 votes
2 answers
2
aditi19 asked Nov 23, 2018
1,600 views
what is the minimum and maximum number of keys for non-leaf nodes and leaf nodes for B+ Tree of order p?
1 votes
1 votes
1 answer
3
Anshul Shankar asked Jan 6, 2018
338 views
To insert key into level L B/B+ tree maximum new nodes require to create?? And how?
0 votes
0 votes
1 answer
4
Subham Nagar asked Dec 15, 2018
498 views
Consider a B+ -tree in which the maximum no. of keys in a root is 11. What will be minimum no. of keys in a non-root node? What will be the same in a B-TreePlease also re...