Abstract
Suppose we have a set of K-dimensional records stored in a general purpose spatial index like a K-d tree. The index efficiently supports insertions, ordinary exact searches, orthogonal range searches, nearest neighbor searches, etc. Here we consider whether we can also efficiently support search by rank, that is, to locate the i-th smallest element along the j-th coordinate. We answer this question in the affirmative by developing a simple algorithm with expected cost \(\mathcal O(n^{\alpha(1/K)}\log n)\), where n is the size of the K-d tree and α(1/K) < 1 for any K ≥ 2. The only requirement to support the search by rank is that each node in the K-d tree stores the size of the subtree rooted at that node (or some equivalent information). This is not too space demanding. Furthermore, it can be used to randomize the update algorithms to provide guarantees on the expected performance of the various operations on K-d trees. Although selection in multidimensional data can be solved more efficiently than with our algorithm, those solutions will rely on ad-hoc data structures or superlinear space. Our solution adds to an existing data structure (K-d trees) the capability of search by rank with very little overhead. The simplicity of the algorithm makes it easy to implement, practical and very flexible; however, its correctness and efficiency are far from self-evident. Furthermore, it can be easily adapted to other spatial indexes as well.
This research was supported by the Spanish Min. of Science and Technology project TIN2006-11345 (ALINEX).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Hoare, C.A.R.: Find (Algorithm 65). Comm. ACM 4, 321–322 (1961)
Blum, M., Floyd, R., Pratt, V., Rivest, R., Tarjan, R.: Time bounds for selection. J. Comp. Syst. Sci. 7, 448–461 (1973)
Martínez, C., Roura, S.: Randomized binary search trees. J. Assoc. Comput. Mach. 45(2), 288–323 (1998)
Roura, S.: A new method for balancing binary search trees. In: Orejas, F., Spirakis, P.G., van Leeuwen, J. (eds.) ICALP 2001. LNCS, vol. 2076, pp. 469–480. Springer, Heidelberg (2001)
Bentley, J.L.: Multidimensional binary search trees used for associative retrieval. Comm. ACM 18(9), 509–517 (1975)
Bentley, J., Finkel, R.: Quad trees: A data structure for retrieval on composite keys. Acta Informatica 4, 1–9 (1974)
Samet, H.: The Design and Analysis of Spatial Data Structures. Addison-Wesley, Reading (1990)
Gaede, V., Günther, O.: Multidimensional access methods. ACM Computing Surveys 30(2), 170–231 (1998)
Duch, A., Estivill-Castro, V., Martínez, C.: Randomized k-dimensional binary search trees. In: Chwa, K.-Y., Ibarra, O.H. (eds.) ISAAC 1998. LNCS, vol. 1533, pp. 199–208. Springer, Heidelberg (1998)
Duch, A., Martínez, C.: Updating relaxed k-d trees. ACM Trans. on Algorithms (2008) (accepted for publication)
Devroye, L., Jabbour, J., Zamora-Cura, C.: Squarish k-d trees. SIAM J. Comput. 30, 1678–1700 (2000)
Knuth, D.E.: The Art of Computer Programming: Sorting and Searching, 2nd edn., vol. 3. Addison-Wesley, Reading (1998)
Martínez, C., Panholzer, A., Prodinger, H.: Partial match queries in relaxed multidimensional search trees. Algorithmica 29(1-2), 181–204 (2001)
Flajolet, P., Puech, C.: Partial match retrieval of multidimensional data. J. Assoc. Comput. Mach. 33(2), 371–407 (1986)
Chern, H.H., Hwang, H.K.: Partial match queries in random k-d trees. SIAM J. Comput. 35(6), 1440–1466 (2006)
Chanzy, P., Devroye, L., Zamora-Cura, C.: Analysis of range search for random k-d trees. Acta Informatica 37, 355–383 (2001)
Duch, A., Martínez, C.: On the average performance of orthogonal range search in multidimensional data structures. J. Algorithms 44(1), 226–245 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Duch, A., Jiménez, R.M., Martńnez, C. (2010). Rank Selection in Multidimensional Data. In: López-Ortiz, A. (eds) LATIN 2010: Theoretical Informatics. LATIN 2010. Lecture Notes in Computer Science, vol 6034. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12200-2_58
Download citation
DOI: https://doi.org/10.1007/978-3-642-12200-2_58
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12199-9
Online ISBN: 978-3-642-12200-2
eBook Packages: Computer ScienceComputer Science (R0)