Exponential tree

From HandWiki
Revision as of 14:05, 6 February 2024 by John Stpola (talk | contribs) (fixing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Exponential tree
Typetree
Invented1995
Invented byArne Andersson
Time complexity in big O notation
Algorithm Average Worst case
Space O(n) O(n)
Search O(min(log n, log n/log w+ log log n, log w log log n)) O(min(log n, log n/log w+ log log n, log w log log n))
Insert O(min(log n, log n/log w+ log log n, log w log log n)) O(min(log n, log n/log w+ log log n, log w log log n))
Delete O(min(log n, log n/log w+ log log n, log w log log n)) O(min(log n, log n/log w+ log log n, log w log log n))

An exponential tree is a type of search tree where the number of children of its nodes decreases doubly-exponentially with increasing depth. Values are stored only in the leaf nodes. Each node contains a splitter, a value less than or equal to all values in the subtree which is used during search. Exponential trees use another data structure in inner nodes containing the splitters from children, allowing fast lookup.

Exponential trees achieve optimal asymptotic complexity on some operations. They have mainly theoretical importance.

Tree structure

An exponential tree is a rooted tree where every node contains a splitter and every leaf node contains a value. The value may be different from the splitter. An exponential tree with [math]\displaystyle{ n }[/math] values is defined recursively:

  • The root has [math]\displaystyle{ \Theta(n^{1/k}) }[/math] children
  • The splitter of the root is the same as the splitter of the leftmost child
  • The splitters of all children are stored in a local data structure
  • The subtrees are exponential trees with [math]\displaystyle{ \Theta(n^{1-1/k}) }[/math] values

An additional condition is that searching for a value using the splitters must yield the correct node (i.e. the one containing the value). Therefore, if a root of a subtree contains the splitter [math]\displaystyle{ s }[/math] and it's right sibling contains the splitter [math]\displaystyle{ s' }[/math], then this subtree can only contain keys in the range [math]\displaystyle{ [s,s') }[/math].

Local data structure

The tree uses a static data structure in every inner node to allow fast lookup of values. It must be possible to build this structure with [math]\displaystyle{ d }[/math] values in time [math]\displaystyle{ O(d^{k-1}) }[/math]. The lookup time in this structure is denoted [math]\displaystyle{ S(d) }[/math].

A Fusion tree can be used as this data structure.

Operations

Search

The exponential tree can be searched in the same way as a normal search tree. In each node, the local data structure can be used to find the next child quickly.

Let [math]\displaystyle{ T(n) }[/math] denote the time complexity of the search. Then it satisfies the following recurrence:

[math]\displaystyle{ T(n) \le T(n^{1-1/k}) + O(S(n)) }[/math]

Insert

Delete

References