| | | | | |

Binary Trees - 2

Theorem. In a complete binary tree with n vertices and height H,
 
     2H <= n < 2H+1.

    Proof.
  1. The number of possible vertices in layer k is 2k .
  2. If all of the layers through layer k are full, then the number of vertices in the first k layers is the sum
    1 + 2 + 4 + ... + 2k = 2k+1 - 1 .
  3. Substitute k = H - 1 : there are 2H - 1 vertices in the first H - 1 layers.
  4. Therefore there are at least this many plus one, i.e., 2H, vertices in the tree. That is, 2H <= n .
  5. Substitute k = H: the maximum number of vertices is 2H+1 - 1, which is smaller than 2H+1 .
  6. Therefore, n < 2H+1.

| | Top of Page | 11. Introduction to Trees - 9 of 10