<s>
A	O
kinetic	B-Data_Structure
closest	I-Data_Structure
pair	I-Data_Structure
data	O
structure	O
is	O
a	O
kinetic	B-Data_Structure
data	I-Data_Structure
structure	I-Data_Structure
that	O
maintains	O
the	O
closest	B-Algorithm
pair	I-Algorithm
of	I-Algorithm
points	I-Algorithm
,	O
given	O
a	O
set	O
P	O
of	O
n	O
points	O
that	O
are	O
moving	O
continuously	O
with	O
time	O
in	O
a	O
metric	O
space	O
.	O
</s>
<s>
The	O
simplest	O
kinetic	O
approach	O
for	O
maintenance	O
of	O
the	O
closest	B-Algorithm
pair	I-Algorithm
is	O
to	O
use	O
variants	O
of	O
the	O
Delaunay	B-Algorithm
triangulations	I-Algorithm
.	O
</s>
<s>
Consider	O
a	O
hexagon	O
and	O
partition	O
it	O
into	O
six	O
equilateral	O
triangles	O
,	O
and	O
then	O
create	O
a	O
Delaunay	B-Algorithm
triangulation	I-Algorithm
based	O
on	O
each	O
equilateral	O
triangle	O
,	O
as	O
each	O
one	O
is	O
a	O
convex	O
shape	O
.	O
</s>
<s>
The	O
union	O
of	O
these	O
six	O
Delaunay	B-Algorithm
triangulations	I-Algorithm
,	O
so	O
called	O
Equilateral	O
Delaunay	O
graph	O
(	O
EDG	O
)	O
,	O
is	O
a	O
supergraph	O
for	O
the	O
nearest	O
neighbor	O
graph	O
(	O
NNG	O
)	O
;	O
the	O
endpoints	O
of	O
the	O
edge	O
with	O
minimum	O
length	O
in	O
EDG	O
gives	O
the	O
closest	B-Algorithm
pair	I-Algorithm
.	O
</s>
<s>
It	O
is	O
straightforward	O
to	O
maintain	O
Delaunay	B-Algorithm
triangulations	I-Algorithm
based	O
on	O
convex	O
shapes	O
.	O
</s>
<s>
Given	O
the	O
EDG	O
over	O
time	O
,	O
by	O
creating	O
a	O
kinetic	B-Data_Structure
tournament	I-Data_Structure
tree	I-Data_Structure
over	O
the	O
edges	O
of	O
the	O
EDG	O
,	O
one	O
can	O
easily	O
maintain	O
the	O
closest	B-Algorithm
pair	I-Algorithm
.	O
</s>
<s>
This	O
closest	B-Algorithm
pair	I-Algorithm
KDS	O
is	O
efficient	O
,	O
amortized	O
responsive	O
,	O
and	O
compact	O
,	O
but	O
in	O
general	O
is	O
not	O
local	O
.	O
</s>
<s>
The	O
following	O
approach	O
presents	O
a	O
local	O
KDS	O
for	O
maintenance	O
of	O
the	O
closest	B-Algorithm
pair	I-Algorithm
.	O
</s>
<s>
Clearly	O
,	O
the	O
closest	B-Algorithm
pair	I-Algorithm
of	I-Algorithm
points	I-Algorithm
is	O
a	O
matched	O
pair	O
.	O
</s>
<s>
Sort	O
the	O
points	O
by	O
x	O
,	O
u	O
and	O
v	O
coordinates	O
,	O
and	O
store	O
them	O
in	O
kinetic	B-Data_Structure
sorted	I-Data_Structure
lists	I-Data_Structure
.	O
</s>
<s>
Construct	O
a	O
2D	O
range	B-Data_Structure
tree	I-Data_Structure
T	O
on	O
the	O
points	O
in	O
.	O
</s>
<s>
For	O
every	O
node	O
w	O
in	O
the	O
primary	O
tree	O
,	O
let	O
T(w )	O
be	O
the	O
secondary	O
tree	O
associated	O
with	O
w	O
.	O
This	O
range	B-Data_Structure
tree	I-Data_Structure
will	O
be	O
used	O
to	O
identify	O
the	O
points	O
in	O
the	O
"	O
main	O
"	O
wedge	O
for	O
a	O
point	O
.	O
</s>
<s>
Build	O
a	O
kinetic	B-Application
priority	I-Application
queue	I-Application
on	O
the	O
pairs	O
in	O
,	O
with	O
priorities	O
determined	O
by	O
the	O
distance	O
(	O
measured	O
in	O
the	O
original	O
co-ordinate	O
system	O
)	O
between	O
the	O
points	O
in	O
the	O
pair	O
.	O
</s>
<s>
Repeat	O
the	O
above	O
steps	O
for	O
the	O
plane	O
rotated	O
,	O
to	O
get	O
kinetic	B-Application
priority	I-Application
queues	I-Application
on	O
and	O
respectively	O
.	O
</s>
<s>
The	O
closest	B-Algorithm
pair	I-Algorithm
of	I-Algorithm
points	I-Algorithm
in	O
P	O
corresponds	O
to	O
the	O
minimum	O
of	O
the	O
minimums	O
obtained	O
from	O
the	O
three	O
priority	O
queues	O
above	O
.	O
</s>
<s>
It	O
is	O
ok	O
to	O
only	O
update	O
these	O
matched	O
pairs	O
since	O
,	O
by	O
definition	O
,	O
only	O
matched	O
pairs	O
have	O
a	O
chance	O
of	O
being	O
the	O
closest	B-Algorithm
pair	I-Algorithm
.	O
</s>
<s>
Efficient	O
:	O
every	O
swap	O
in	O
the	O
sorted	O
lists	O
causes	O
a	O
constant	O
number	O
of	O
insertions	O
and	O
deletions	O
in	O
the	O
kinetic	B-Application
priority	I-Application
queues	I-Application
.	O
</s>
<s>
This	O
approach	O
can	O
be	O
used	O
to	O
maintain	O
the	O
closest	B-Algorithm
pair	I-Algorithm
in	O
higher	O
dimensions	O
.	O
</s>
