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:

    If you think dope is for kicks and for thrills, you’re out of your mind. There are more kicks to be had in a good case of paralytic polio or by living in an iron lung. If you think you need stuff to play music or sing, you’re crazy. It can fix you so you can’t play nothing or sing nothing.
    Billie Holiday (1915–1959)

    The worst enemy of truth and freedom in our society is the compact majority. Yes, the damned, compact, liberal majority.
    Henrik Ibsen (1828–1906)

    The heights of popularity and patriotism are still the beaten road to power and tyranny; flattery to treachery; standing armies to arbitrary government; and the glory of God to the temporal interest of the clergy.
    David Hume (1711–1776)