The problem we want to address is called the Nearest Neighbor
Problem: given a set of points and a point
, determine which
point of
is the nearest from
.
The first intuition we have is to use Delaunay Triangulation. Let
be the Delaunay Triangulation of
, is it the
case that the nearest point of
is one of the three points
incident to the face of
containing
? Looking at
Figure 1, we see that it may not be the case.
Now, lets reduce the size of the problem to the case where
contains only two points
and
. In that case, the
bisectrix of
and
divides the plane into two halves (see
Figure 2), each of which containing the points respectively
nearest to
and
. This see this, first remember that the
bisectrix is defined as the set of points which are equidistant from
and
. Now, suppose that
is on the same half-plane as
, and let
be the intersection point between the bisectrix
and the segment
. We have that:
![]() |
![]() |
![]() |
(1) |
![]() |
![]() |
(2) | |
![]() |
![]() |
(3) |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
This effectively form a partition of the plane, since (excepted
points on the boundaries) every point is in exactly one region.
Moreover, since the region of a point can be defined as the
intersection of half-planes (where
is the number of points
in
), each of those regions can be computed, using linear
programming, in
. Since we have
such regions to
compute, the whole set of those regions (which we shall call the
Voronoi Diagram of
and note
) can then be
computed in
.
In the sequel, we will assume that no three points are collinear and no four points are cocircular.
What we are now interested in is to improve the time needed to
compute
. We will show that
is the
dual of
, and since computing the dual is an
operation which can be done in linear time, and computing
can be done in
time, we will see that
can be computed in
time as well.
To see this, let be a vertex in
. That vertex is
formed by the intersection of some bisectrix (at least two) and let
,
and
be some of the points used to define those
bisectrix (there are at least three such points otherwise we would
only have one bisectrix). This situation is illustrated on
Figure 3. Then, we have that
is equidistant from
,
and
, meaning that
is the center of the circle
defined by
,
and
. We claim that this circle
contains no points of
. If that would be the case, then
would
be nearer from that point than from
,
and
, and then
would not be on the boundaries of
,
and
. Therefore, in
, there is a Delaunay edge
between
and
, between
and
, and between
and
. Notice that
may not ne in the triangle we just
defined. We then showed that each edge in the dual of
is a Delaunay edge. To see that each Delaunay edge
is in the dual of
, similarly trace the unique
circle defined by the three vertices
,
and
of a
Delaunay face. That circle is empty, and its center is equidistant
to each of the three vertices. We then have that this center is in
, meaning that
,
and
are touching, and therefore each Delaunay
edge is in the dual of
.
It is quite clear that for each ,
. Therefore,
the number of faces in
is equal to
, the number
of points in
. Also, if we assume that no four points are
cocircular, we have that each vertex is of degree 3, and then:
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The last property of Voronoi Diagrams we want to discuss is their
relationship with Convex Hulls. We already know that is a
convex region for each
. Since
form a
partition of the plane, some points must have unbounded regions. We
show that those points are exactly those lying on
.
Let be a point that lies in
. Then, there is a line
passing through
such that all points of
are on the same side
of
. Let
be the half-plane defined by
not containing any
point of
. Every point lying on the half-line perpendicular to
and lying on
has
as its nearest neighbor, and then
is unbounded.
Now, let be unbounded. This means that there is a half-line
emanating from
such that every point on that half-line has
as its nearest neighbor. Let
be the line perpendicular to that
half-line and passing through
, and
be the half-plane defined
by
on which the half-line lies. No point of
can be in
, otherwise, by going far enough on the half-line, we could find
a point
that is nearer to
than
(see
Figure 4). Therefore,
lies on
.