next up previous
Next: Operations Up: CSE 2320: Algorithms and Previous: Properties of B-Trees

What is h in terms of n and t?

Theorem 19.1

Given n $\geq$ 1, t $\geq$ 2, B-Tree of height h and minimum degree t, and number of keys n,

\(h \leq\; log_t\frac{n+1}{2}\)



Proof:

n $\geq$ minimum #nodes in tree of height h and minimum degree t

The minimum #nodes means root has one key (two children) and other nodes have t-1 (minimum) keys.

= 1 key at root +
2(t-1) at depth 1 +
2t(t-1) at depth 2 +
2t2(t-1) at depth 3 + ...
= 1 + \((t-1) \sum_{i=1}^{h} 2t^{i-1}\) = 1 + 2(t-1) \(\sum_{i=0}^{h-1} t^i\)
= 1 + \(2(t-1)(\frac{t^h-1}{t-1})\)
= 1 + 2(th - 1)
= 2 th - 1



n $\geq$ 2th - 1
2th$\leq$ n+1
\(t^h \;\leq\; \frac{n+1}{2}\)
\(log_tt^h \;\leq\; log_t\frac{n+1}{2}\)
h $\leq$ \(log_t\frac{n+1}{2}\)


next up previous
Next: Operations Up: CSE 2320: Algorithms and Previous: Properties of B-Trees
Copyright © 1998 The University of Texas at Arlington