Book contents
4 - Tree Structures for Sets of Intervals
Published online by Cambridge University Press: 25 January 2011
Summary
The importance of balanced search trees does not come primarily from the importance as dictionary structures – they are just the most basic application. Balanced search trees provide a scaffolding on which many other useful structures can be built. These other structures can then take advantage of the logarithmic depth and the mechanisms that preserve it, without going into the details of studying the underlying search-tree balancing methods. In this chapter we describe several structures that are built on top of a balanced search tree and that implement different queries or even an entirely different abstract structure.
Interval Trees
The interval tree structure stores a set of intervals and returns for any query key all the intervals that contain this query value. The structure is in a way dual to the one-dimensional range queries we mentioned in Section 2.7: they keep track of a set of values and return for a given query interval all key values in that interval, whereas we now have a set of intervals as data and a key value as query. In both cases the answer can be potentially large, so we have to aim for an output-sensitive complexity bound. Interval trees were invented by Edelsbrunner and McCreight.
The idea of the interval tree structure is simple. Suppose the underlying set of intervals is the set {[a1, b1], [a2, b2], …, [an, bn]}. Let T be any balanced search tree for the set of interval endpoints {a1, a2, …, an, b1, …, bn}.
- Type
- Chapter
- Information
- Advanced Data Structures , pp. 148 - 208Publisher: Cambridge University PressPrint publication year: 2008