Open nkrusch opened 4 years ago
I think you're right, otherwise Exercise 18.1-4 would be unbounded because the root itself can keep unlimited number of keys.
Also, I suppose these are all legal B-trees of degree 2?:
2
1 345
4
123 5
2 4
1 3 5
besides the one in the solution
3
12 45
so there are 4 of them?
Current version 18.1-3 solution shows tree with a root node that contains 5 keys.
From page 489:
Given
t=2
node is full when it has2t - 1 = 4 - 1 = 3
keys.The solution seems to suggest the this max does not apply to the root node. However there is no mention of root being exempt regarding this upper limit. (The min limit of keys in 5.a. explicitly says "other than the root" which makes me think if the max did not apply to the root node, it would be stated as well).
There are other solutions to this question circling around the internet but they have
t = 3
which changes the max and makes 5 keys at the root a valid tree. I am looking at 3rd ed. of this book from 2009 that hast = 2
.