next up previous
Next: 5.2.1 Height of a Red-Black Tree Up: 5. Balanced Trees Previous: 5.1.2 AVL Trees: Insertions and Deletions

5.2 Red-Black Trees

REF.
R. Bayer. Symmetric binary B-trees: Data Structures and maintenance algorithms, Acta Informatica, Volume 1, pp.290-306, 1972.

Definition

A BST is called an RBT if it satisfies the following four properties.

1.
Every node is either red or black
2.
Every leaf is black (Missing node property)
3.
If a node is red, then both its children are black

(RED constraint)

4.
Every simple path from a node to a descendent leaf contains the same number of black nodes

(BLACK constraint)

Black-Height of a Node

Examples : See Figures 5.9 and 5.10.


  
Figure 5.9: A red-black tree with black height 2
\begin{figure}
\centerline{\psfig{figure=figures/Frb1.ps,width=5in}}
\end{figure}


  
Figure 5.10: Examples of red-black trees
\begin{figure}
\centerline{\psfig{figure=figures/Frb2.ps,width=5in}}
\end{figure}



 
next up previous
Next: 5.2.1 Height of a Red-Black Tree Up: 5. Balanced Trees Previous: 5.1.2 AVL Trees: Insertions and Deletions
eEL,CSA_Dept,IISc,Bangalore