Best Case and Worst Case Heights
Let h be the height of the classic B-tree. Let n > 0 be the number of entries in the tree. Let m be the maximum number of children a node can have. Each node can have at most m−1 keys.
It can be shown (by induction for example) that a B-tree of height h with all its keys completely filled has keys. Hence, the best case height of a B-tree is:
Let d be the minimum number of children an internal (non-root) node can have. For an ordinary B-tree, d=⌈m/2⌉.
The worst case height of a B-tree is:
Comer (1979, p. 127) and Cormen et al. (year, pp. 383–384) give a slightly different expression for the worst case height (perhaps because the root node is considered to have height 0).
Read more about this topic: B-tree
Famous quotes containing the words case, worst and/or heights:
“I love to weigh, to settle, to gravitate toward that which most strongly and rightfully attracts me;Mnot hang by the beam of the scale and try to weigh less,not suppose a case, but take the case that is; to travel the only path I can, and that on which no power can resist me. It affords me no satisfaction to commence to spring an arch before I have got a solid foundation.”
—Henry David Thoreau (18171862)
“The name of peace is sweet, and the thing itself is beneficial, but there is a great difference between peace and servitude. Peace is freedom in tranquility, servitude is the worst of all evils, to be resisted not only by war, but even by death.”
—Marcus Tullius Cicero (10643 B.C.)
“Men go out to admire the heights of mountains, the huge waves of the sea, the broadest spans of rivers, the circle of ocean, the revolutions of stars, and leave themselves behind.”
—St. Augustine (354430)