The range closest-pair (RCP) problem is the range-search version of the classical closest-pair problem, which aims to store a given dataset of points in some data structure such that when a query range X is specified, the closest pair of points contained in X can be reported efficiently. A natural generalization of the RCP problem is the colored range closest-pair (CRCP) problem in which the given data points are colored and the goal is to find the closest bichromatic pair contained in the query range. All the previous work on the RCP problem was restricted to the uncolored version and the Euclidean distance function. In this paper, we make the first progress on the CRCP problem. We investigate the problem under a general distance function induced by a monotone norm; in particular, this covers all the Lp-metrics for p > 0 and the L∞-metric. We design efficient (1 + ε)-approximate CRCP data structures for orthogonal queries in R 2 , where ε > 0 is a pre-specified parameter. The highlights are two data structures for answering rectangle queries, one of which uses O(ε −1 n log 4 n) space and O(log 4 n + ε −1 log 3 n + ε −2 log n) query time while the other uses O(ε −1 n log 3 n) space and O(log 5 n + ε −1 log 4 n + ε −2 log 2 n) query time. In addition, we also apply our techniques to the CRCP problem in higher dimensions, obtaining efficient data structures for slab, 2-box, and 3D dominance queries. Before this paper, almost all the existing results for the RCP problem were achieved in R 2 .
The work REF considered a colored version of the RCP problem and gave efficient approximate data structures.
Colored range closest-pair problem under general distance functions
ArXiv
ArXiv
Mathematics Computer Science