## Abstract

We present simple, fully dynamic and kinetic data structures, which are variants of a dynamic two-dimensional range tree, for maintaining the closest pair and all nearest neighbors for a set of n moving points in the plane; insertions and deletions of points are also allowed. If no insertions or deletions take place, the structure for the closest pair uses O(n log n) space, and processes O(n^{2}Β_{s+2}(n)log n) critical events, each in O(log^{2}n) time. Here s is the maximum number of times where the distances between any two specific pairs of points can become equal, Β_{s}(q) = _{s}(q)/q, and _{s}(q) is the maximum length of Davenport-Schinzel sequences of order s on q symbols. The dynamic version of the problem incurs a slight degradation in performance: If m n insertions and deletions are performed, the structure still uses O(n log n) space, and processes O(mnΒ_{s}+2(n)log^{3} n) events, each in O(log^{3}n) time. Our kinetic data structure for all nearest neighbors uses O(n log^{2} n) space, and processes O(n ^{2}Β^{2}_{s+2}(n)log^{3} n) critical events. The expected time to process all events is O(n^{2}Β _{s+2}^{2}(n) log^{4}n), though processing a single event may take Θ(n) expected time in the worst case. If m n insertions and deletions are performed, then the expected number of events is O(mnΒ^{2}_{s+2}(n) log^{3}n) and processing them all takes O(mnΒ^{2}_{s+2}(n) log^{4}n). An insertion or deletion takes O(n) expected time.

Original language | English |
---|---|

Article number | 4 |

Journal | ACM Transactions on Algorithms |

Volume | 5 |

Issue number | 1 |

DOIs | |

State | Published - 1 Nov 2008 |

## Keywords

- Closest pair
- Computational geometry
- Kinetic data structures
- Nearest neighbors