Relaxed k-d tree

A relaxed K-d tree or relaxed K-dimensional tree is a data structure which is a variant of K-d trees. Like K-dimensional trees, a relaxed K-dimensional tree stores a set of n-multidimensional records, each one having a unique K-dimensional key x=(x0,... ,xK−1). Unlike K-d trees, in a relaxed K-d tree, the discriminants in each node are arbitrary. Relaxed K-d trees were introduced in 1998.[1]

Relaxed k-d tree
TypeMultidimensional BST
Invented1998
Invented byAmalia Duch, Vladimir Estivill-Castro and Conrado Martínez
Time complexity in big O notation
Algorithm Average Worst case
Space O(n) O(n)
Search O(log n) O(n)
Insert O(log n) O(n)
Delete O(log n) O(n)

Definitions

A relaxed K-d tree for a set of K-dimensional keys is a binary tree in which:

  1. Each node contains a K-dimensional record and has associated an arbitrary discriminant j ∈ {0,1,...,K − 1}.
  2. For every node with key x and discriminant j, the following invariant is true: any record in the right subtree with key y satisfies yj < xj and any record in the left subtree with key y satisfies yj ≥ xj.[2]

If K = 1, a relaxed K-d tree is a binary search tree.

As in a K-d tree, a relaxed K-d tree of size n induces a partition of the domain D into n+1 regions, each corresponding to a leaf in the K-d tree. The bounding box (or bounds array) of a node {x,j} is the region of the space delimited by the leaf in which x falls when it is inserted into the tree. Thus, the bounding box of the root {y,i} is [0,1]K, the bounding box of the left subtree's root is [0,1] × ... × [0,yi] × ... × [0,1], and so on.

Supported queries

The average time complexities in a relaxed K-d tree with n records are:

  • Exact match queries: O(log n)
  • Partial match queries: O(n1−f(s/K)), where:
    • s out of K attributes are specified
    • with 0 < f(s/K) < 1, a real valued function of s/K
  • Nearest neighbor queries: O(log n)[3]

See also

  • k-d tree
  • implicit k-d tree, a k-d tree defined by an implicit splitting function rather than an explicitly-stored set of splits
  • min/max k-d tree, a k-d tree that associates a minimum and maximum value with each of its nodes

References

  1. Duch, Amalia; Estivill-Castro, Vladimir; Martínez, Conrado (1998-12-14). Chwa, Kyung-Yong; Ibarra, Oscar H. (eds.). Randomized K-Dimensional Binary Search Trees. Lecture Notes in Computer Science. Springer Berlin Heidelberg. pp. 198–209. CiteSeerX 10.1.1.55.3293. doi:10.1007/3-540-49381-6_22. ISBN 9783540653851.
  2. Duch, Amalia; Martínez, Conrado (2005). "Improving the Performance of Multidimensional Search Using Fingers" (PDF). ACM Journal of Experimental Algorithmics. 10. Retrieved 23 August 2016.
  3. Chwa, Kyung-Yong; Ibarra, Oscar H. (2003-06-29). Algorithms and Computation: 9th International Symposium, ISAAC'98, Taejon, Korea, December 14-16, 1998, Proceedings. Springer. pp. 202–203. ISBN 9783540493815. Retrieved 23 August 2016.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.