The simplest kinetic approach for maintenance of the closest pair is to use variants of the Delaunay triangulations. Consider a hexagon and partition it into six equilateral triangles, and then create a Delaunay triangulation based on each equilateral triangle, as each one is a convex shape. The union of these six Delaunay triangulations, so called Equilateral Delaunay graph, is a supergraph for the nearest neighbor graph ; the endpoints of the edge with minimum length in EDG gives the closest pair. It is straightforward to maintain Delaunay triangulations based on convex shapes. Given the EDG over time, by creating a kinetic tournament tree over the edges of the EDG, one can easily maintain the closest pair. This closest pair KDS is efficient, amortized responsive, and compact, but in general is not local. The following approach presents a local KDS for maintenance of the closest pair.
Approach 2
The second kinetic approach is based on the following observations.
Divide and conquer
If the space around a point is divided angularly into six "wedges", each wide, the closest point to is the closest of the closest points in each of the wedges. The rest of this article will focus on the "main" wedges, and symmetrical arguments will apply to the other wedges after rotating the plane by.
Matched points
Points and are said to be "matched" if they are the closest points to each other. Clearly, the closest pair of points is a matched pair. Consider points and, such that is to the left of and lies in the wedge centered at described above. If is the closest point to, then must be the closest point to, in the x-direction. Thus, the set of pairs of closest points in the x-direction is a superset of the set of pairs of closest points.
Construction
Map each point p= in the set P to a new point p' = =, forming the set P' of transformed points. Note that for a point, the points in the "main" wedges have and coordinates either larger or smaller than in this new coordinate system.
Sort the points by x,u and v coordinates, and store them in kinetic sorted lists.
Construct a 2D range treeT on the points in P'. For every node w in the primary tree, let T be the secondary tree associated with w. This range tree will be used to identify the points in the "main" wedge for a point.
For every node w in the primary tree, and every node e in T, calculate the pair =, where b is defined to be the point with maximum x-coordinate in the left subtree of e. Let be the set of for all pairs w, e in T. This is a superset of the set of pairs of closest points.
Repeat the above steps for the plane rotated, to get kinetic priority queues on and respectively.
The closest pair of points in P corresponds to the minimum of the minimums obtained from the three priority queues above.
Maintenance
Certificate failures can occur in the priority queues and the sorted lists. Swaps in the ordering of the points will cause changes to T, and may cause insertions/deletions in the priority queues. Note that the number of changes to the sets as defined above need not be a constant number. However, any pair that starts or stops being matched as a result of the ordering of p and q changing must contain p and/or q, and hence there are only a constant number of matched pairs that must be inserted into/deleted from the priority queues. It is ok to only update these matched pairs since, by definition, only matched pairs have a chance of being the closest pair.
Analysis
This KDS is:
Responsive: takes O time to process an event
Local: since each point is present in a constant number of kinetic sorted lists and kinetic priority queues, locality follows from the locality of those structures
Compactness: compactness follows from the compactness of the kinetic sorted lists and kinetic priority queues
Efficient: every swap in the sorted lists causes a constant number of insertions and deletions in the kinetic priority queues. Assuming the motion of the points is pseudo-algebraic, there are a polynomial number of swaps, and hence a polynomial number of events are processed by this KDS, making it efficient
This approach can be used to maintain the closest pair in higher dimensions.