Selection by rank in K‐dimensional binary search trees |
| |
Authors: | Amalia Duch Rosa M Jiménez Conrado Martínez |
| |
Institution: | Departament de Llenguatges i Sistemes Informàtics, Universitat Politècnica de Catalunya, , Barcelona, E‐08034 Spain |
| |
Abstract: | In this work we show how to augment general purpose multidimensional data structures, such as K‐d trees, to efficiently support search by rank (that is, to locate the i‐th smallest element along the j‐th coordinate, for given i and j) and to find the rank of a given item along a given coordinate. To do so, we introduce two simple, practical and very flexible algorithms – Select‐by‐Rank and Find‐Rank – with very little overhead. Both algorithms can be easily implemented and adapted to several spatial indexes, although their analysis is far from trivial. We are able to show that for random K‐d trees of size n the expected number of nodes visited by Find‐Rank is for or , and for (with ), where depends on the dimension K and the variant of K‐d tree under consideration. We also show that Select‐by‐Rank visits nodes on average, where is the given rank and the exponent α is as above. We give the explicit form of the functions and , both are bounded in 0, 1] and they depend on K, on the variant of K‐d tree under consideration, and, eventually, on the specific coordinate j for which we execute our algorithms. As a byproduct of the analysis of our algorithms, but no less important, we give the average‐case analysis of a partial match search in random K‐d trees when the query is not random. © 2012 Wiley Periodicals, Inc. Random Struct. Alg., 45, 14–37, 2014 |
| |
Keywords: | Multidimensional data structures selection K‐dimensional search trees partial match probabilistic analysis of algorithms |
|
|