Interval Trees

# Interval Trees

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t. Selection of v.pt • • • • • • Select v.pt arbitrarily. Use a red-black tree. Each node stores between 0 and n intervals. At most 2n nodes permissible. So, at most n empty nodes. Tree height is O(log n). Need For Empty Nodes • Deletion from a degree 2 node. 20 10 6 2 15 8 7 40 30 18 25 35 Why Upto 2n Nodes Permissible • When number of nodes > 2n, at least 1 degree 0 or degree 1 node must be empty. • Empty degree 0 and 1 nodes are easily removed. • So, no need to keep them around. • 2n suffices to avoid having to handle empty degree 2 nodes. LL Rotation A B B B’L AR BR After insertion. B’L BR A AR After rotation. • Intervals change only...
View Full Document

## This note was uploaded on 02/04/2014 for the course COP 5536 taught by Professor Staff during the Summer '08 term at University of Florida.

Ask a homework question - tutors are online