ArticleslgStudy

computer science

Kinetic closest pair

Kinetic closest pair is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Kinetic closest pair rather than just read about it. In short: A kinetic closest pair data structure is a kinetic data structure that maintains the closest pair of points, given a set P of n points that are moving continuously with time in a metric space. While many efficient algorithms were known in the static case, they proved hard to kinetize, so new static algorithms were developed to solve this problem. 2D case Approach 1 The simplest kinetic approach for maintenance of th…

Kinetic closest pair — main illustration
Kinetic closest pair — illustration

Key takeaways

  • Kinetic closest pair belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Kinetic closest pair to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Kinetic closest pair from memory before moving on to harder problems.

Reference excerpt

A kinetic closest pair data structure is a kinetic data structure that maintains the closest pair of points, given a set P of n points that are moving continuously with time in a metric space. While many efficient algorithms were known in the static case, they proved hard to kinetize, so new static algorithms were developed to solve this problem.

2D case

Approach 1 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 (EDG), is a supergraph for the nearest neighbor graph (NNG); 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 p is divided angularly into six "wedges", each 60° wide, the closest point to p is the closest of the closest points in each of the wedges. The rest of this article will focus on the "main" wedges (those bisected by the x-axis), and symmetrical arguments will apply to the other wedges after rotating the plane by ±60°.

Matched points Points p and q 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 p and q, such that p is to the left of q and q lies in the wedge centered at p described above. If p is the closest point to q, then q must be the closest point (in this wedge) to p, in the x-direction. Thus, the set of pairs of closest points (within this wedge) in the x-direction is a superset of the set of pairs of closest points.

Construction Map each point p=(x, y) in the set P to a new point p' = (u, v) = (x+√3y, y-√3x), forming the set P' of transformed points. Note that for a point p, the points in the "main" wedges have u and v coordinates either larger or smaller than p' 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 tree T on the points in P'. For every node w in the primary tree, let T(w) be the secondary tree associated with w. This range tree will be used to identify the points in the "main" wedge for a point w. For every node w in the primary tree, and every node e in T(w), calculate the pair π(w, e) = (b, r), where b (or r) is defined to be the point with maximum (or minimum) x-coordinate in the left (or right) subtree of e. Let Π(0) be the set of π(w, e) for all pairs w, e in T. This is a superset of the set of pairs of closest points (within the main wedge). Build a kinetic priority queue on the pairs in Π(0), with priorities determined by the distance (measured in the original co-ordinate system) between the points in the pair. Repeat the above steps for the plane rotated ±60°, to get kinetic priority queues on Π(1) and Π(-1) 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 (which will take O(log2 n) time), 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(log2 n) 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.

References

Worked examples

Example 1 — a first encounter with Kinetic closest pair

Start with the simplest possible case. Write down what Kinetic closest pair claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Kinetic closest pair before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Kinetic closest pair ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Kinetic closest pair

In research
Kinetic closest pair appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Kinetic closest pair in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Kinetic closest pair is common in secondary-school and first-year university syllabi. It links to neighbouring topics Geometric data structures, Kinetic data structures, so understanding it makes those chapters shorter.
In everyday life
Look for Kinetic closest pair outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Kinetic closest pair in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Kinetic closest pair means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Kinetic closest pair out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Kinetic closest pair in simple terms?

A kinetic closest pair data structure is a kinetic data structure that maintains the closest pair of points, given a set P of n points that are moving continuously with time in a metric space. While many efficient algorithms were known in the static case, they proved hard to kinetize, so new static…

Why does Kinetic closest pair matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Kinetic closest pair?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Kinetic closest pair.

Tags

  • Geometric data structures
  • Kinetic data structures

Keep exploring