, Volume 6, Issue 1–6, pp 579–589 | Cite as

Refinements to nearest-neighbor searching ink-dimensional trees

  • Robert F. Sproull


This note presents a simplification and generalization of an algorithm for searchingk-dimensional trees for nearest neighbors reported by Friedmanet al [3]. If the distance between records is measured usingL 2 , the Euclidean norm, the data structure used by the algorithm to determine the bounds of the search space can be simplified to a single number. Moreover, because distance measurements inL 2 are rotationally invariant, the algorithm can be generalized to allow a partition plane to have an arbitrary orientation, rather than insisting that it be perpendicular to a coordinate axis, as in the original algorithm. When ak-dimensional tree is built, this plane can be found from the principal eigenvector of the covariance matrix of the records to be partitioned. These techniques and others yield variants ofk-dimensional trees customized for specific applications.

It is wrong to assume thatk-dimensional trees guarantee that a nearest-neighbor query completes in logarithmic expected time. For smallk, logarithmic behavior is observed on all but tiny trees. However, for largerk, logarithmic behavior is achievable only with extremely large numbers of records. Fork = 16, a search of ak-dimensional tree of 76,000 records examines almost every record.

Key words

k-dimensional tree Searching Nearest-neighbor search 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    J. L. Bentley, Multidimensional binary search trees used for associative searching,Comm. ACM,18(9):509–517, September 1975.zbMATHCrossRefMathSciNetGoogle Scholar
  2. [2]
    J. L. Bentley,K-dimensional Trees for Semidynamic Point Sets, AT&T Bell Laboratories, Murray Hill, NJ, 1989.Google Scholar
  3. [3]
    J. H. Friedman, J. L. Bentley, and R. A. Finkel, An algorithm for finding best matches in logarithmic expected time,ACM Trans. Math. Software,3(3):209–226, September 1977.zbMATHCrossRefGoogle Scholar
  4. [4]
    J. E. Zolnowsky, Topics in Computational Geometry, STANC-CS-78-659, Ph.D. Thesis, Stanford University, 1978.Google Scholar

Copyright information

© Springer-Verlag New York Inc. 1991

Authors and Affiliations

  • Robert F. Sproull
    • 1
  1. 1.Sutherland, Sproull & AssociatesPalo AltoUSA

Personalised recommendations