In this paper we describe the discrete interval encoding tree
for storing subsets of
types having a total order and a predecessor and a successor function. In the
following, we consider for simplicity only the case for integer sets; the generalization
is not difficult.
The discrete interval encoding tree is based on the observation that the set of
integers {i[mid ]a[les ]i[les ]b}
can be perfectly represented by the closed interval [a, b].
The general idea is to represent a set by a binary search tree of integers in which
maximal adjacent subsets are each represented by an interval. For example, inserting
the sequence of numbers 6, 9, 2, 13, 8, 14, 10, 7, 5 into a binary search tree, respectively,
into a discrete interval encoding tree results in the tree structures shown in figure 1.
The efficiency of the interval representation, both in terms of space and time,
improves with the density of the set, i.e. with the number of adjacencies between set
elements. So what we propose is a ‘diet’ (discrete interval encoding tree)
for ‘fat’ sets in the sense of ‘the same amount of information
with less nodes’.