B-tree - Best Case and Worst Case Heights

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 am bound to tell what I am told, but not in every case to believe it.”
    —Herodotus (c. 484–424 B.C.)

    “Bless you, of course you’re keeping me from work,
    But the thing of it is, I need to be kept.
    There’s work enough to do there’s always that;
    But behind’s behind. The worst that you can do
    Is set me back a little more behind.
    I shan’t catch up in this world, anyway.
    I’d rather you’d not go unless you must.”
    —Robert Frost (1874–1963)

    “We shall make mistakes, but they must never be mistakes which result from faintness of heart or abandonment of moral principles. I remember that my old school master Dr. Peabody said in days that seemed to us then to be secure and untroubled, he said things in life will not always run smoothly, sometimes we will be rising toward the heights and all will seem to reverse itself and start downward. The great thing to remember is that the trend of civilization itself is forever upward.”
    —Franklin D. Roosevelt (1882–1945)