Constrained nearest neighbor queries [FSAA01] can be defined as nearest neighbor queries that are constrained to a specified region. This type of queries is targeted towards the users who are particularly interested in nearest neighbors in a region bounded by certain spatial conditions, rather than in searching for nearest neighbors in the entire data space.
There are many applications of this variant of nearest neighbor queries. For example, a user may wish to find nearest gas stations in San Francisco from his location. Clearly, the constrained region is the map of San Francisco. Similarly, a user may issue a query to find nearest neighbors from his location to the North. In this example, the constrained region is the sub-space that lies to the North of the user. Recall, six constrained nearest neighbor queries are issued to find reverse nearest neighbor of a query [SAA00].
Ferhatosmanoglu et al. [FSAA01] propose a solution based on the best-first traversal of R-tree. Their proposed pruning criteria makes their technique optimal with respect to the number of I/O accesses. The proximity comparisons in [RKV95], based on the Euclidean distance metric use the notion of and where is a query point and is a minimum bounding rectangle (MBR). More specifically, is the shortest distance from to the given MBR and is the minimum distance from to the furthest point on the closest face of the MBR . Fig. illustrates these definitions. These metrics ensure that for a minimum bounding rectangle , there is at least one data point within the distance range of . Consider a 1-NN query, an MBR and its child entries can be pruned if because by the definition it is known that contains at least one object that is closer than all objects in . Note that and its child can also be pruned if there exists a point such that .
Ferhatosmanoglu et al. notice that the above definitions of and used in [RKV95] cannot yield correct results so they re-define these distance metrics as follows: Let be the constrained region, be a minimum bounding rectangle (MBR) and be a query point, is the minimum distance between and the part of MBR that lies in . Consider the example of Fig. , is the minimum distance of to the shaded area of . Note that can never be greater than ( ) hence this definition provides a tighter pruning condition. is the distance between and the furthest point on the closest face of that is fully contained in . In Fig., there is only one edge of that completely lies inside , so is the distance from to the farthest point on this edge as shown. It can be seen that with the previous definition of , it cannot be guaranteed that there is at least one object that lies in the range because that point may lie outside the region . According to the new definition, the condition that the edge should be fully contained in guarantees that there is at least one object that lies in within the range .
The authors prove that their approach is optimal with respect to the number of I/O accesses. Consider the example of Fig. , there algorithm accesses only the MBR . The MBRs and are pruned because they do not lie in the constrained region . MBR is pruned because . Since , is accessed first and an object is found. The MBR is pruned because . The algorithm terminates and reports as the answer.
To the best of our knowledge, there does not exist any previous work on continuous monitoring of constrained nearest neighbor queries. In chapter , we propose an efficient solution for the problem of continuous monitoring of constrained nearest neighbor queries.
Muhammad Aamir Cheema 2007-10-11