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:

    ... business training in early life should not be regarded solely as insurance against destitution in the case of an emergency. For from business experience women can gain, too, knowledge of the world and of human beings, which should be of immeasurable value to their marriage careers. Self-discipline, co-operation, adaptability, efficiency, economic management,—if she learns these in her business life she is liable for many less heartbreaks and disappointments in her married life.
    Hortense Odlum (1892–?)

    An indiscriminate distrust of human nature is the worst consequence of a miserable condition, whether brought about by innocence or guilt. And though want of suspicion more than want of sense, sometimes leads a man into harm; yet too much suspicion is as bad as too little sense.
    Herman Melville (1819–1891)

    I have never been in any country where they did not do something better than we do it, think some thoughts better than we think, catch some inspiration from heights above our own.
    Maria Mitchell (1818–1889)