# Kinetic data structure

A kinetic data structure is a data structure used to track an attribute of a geometric system that is moving continuously.[1][2][3][4] For example, a kinetic convex hull data structure maintains the convex hull of a group of ${\displaystyle n}$ moving points. The development of kinetic data structures was motivated by computational geometry problems involving physical objects in continuous motion, such as collision or visibility detection in robotics, animation or computer graphics.

## Overview

Kinetic data structures are used on systems where there is a set of values that are changing as a function of time, in a known fashion. So the system has some values, and for each value ${\displaystyle v}$, it is known that ${\displaystyle v=f(t)}$. Kinetic data structures allow queries on a system at the current virtual time ${\displaystyle t}$, and two additional operations:

• ${\displaystyle {\textrm {advance}}(t)}$: Advances the system to time ${\displaystyle t}$.
• ${\displaystyle {\textrm {change}}(v,f(t))}$: Alters the trajectory of value ${\displaystyle v}$ to ${\displaystyle f(t)}$, as of the current time.

Additional operations may be supported. For example, kinetic data structures are often used with a set of points. In this case, the structure typically allows points to be inserted and deleted.

## Contrast with traditional data structures

A kinetic data structure allows the values stored in it to change continuously with time. In principle, this can be approximated by sampling the position of the points at fixed intervals of time, and deleting and re-inserting each point into a "static" (traditional) data structure. However, such an approach is vulnerable to oversampling or undersampling, depending on what interval of time is used, and can also be wasteful of computational resources.

## Certificates approach

The following general approach can be used to construct kinetic data structures:[5]

1. Store a data structure on the system at the current time ${\displaystyle t}$. This data structure allows queries on the system at the current virtual time.
2. Augment the data structure with certificates. Certificates are conditions under which the data structure is accurate. The certificates are all true now, and the data structure will only cease to be accurate when one of the certificates is no longer true.
3. Compute the failure time of each certificate, the time when it will cease to be true.
4. Store the certificates in a priority queue, keyed by their failure times
5. To advance to time ${\displaystyle t}$, look at the certificate with the lowest failure time from the priority queue. If the certificate fails before time ${\displaystyle t}$, pop it from the queue and fix the data structure so it is accurate at the time of failure, and update the certificates. Repeat this until the certificate with the lowest failure time in the priority queue fails after time ${\displaystyle t}$. If the certificate with the lowest failure time in the priority queue fails after time, then all certificates are true at time ${\displaystyle t}$ so the data structure can correctly answer queries at time ${\displaystyle t}$.

### Types of events

Certificate failures are referred to as "events". An event is considered internal if the property maintained by the kinetic data structure does not change when the event occurs. An event is considered external if the property maintained by the data structure changes when the event occurs.

## Performance

When using the certificates approach, there are four measures of performance. We say a quantity is small if it is a polylogarithmic function of ${\displaystyle n}$, or is ${\displaystyle O(n^{\epsilon })}$ for arbitrarily small ${\displaystyle \epsilon }$, where ${\displaystyle n}$ is the number of objects:

### Responsiveness

Responsiveness is the worst case amount of time required to fix the data structure and augmenting certificates when a certificate fails. A kinetic data structure is responsive if the worst case amount of time required for an update is small.

### Locality

The maximum number of certificates any one value is involved in. For structures involving moving points, this is that maximum number of certificates any one point is involved in. A kinetic data structure is local if the maximum number of certificates any one value is involved with is small.

### Compactness

The maximum number of certificates used to augment the data structure at any time. A kinetic data structure is compact if the number of certificates it uses is ${\displaystyle O(n\operatorname {polylog} n)}$ or ${\displaystyle O(n^{1+\epsilon })}$ for arbitrarily small ${\displaystyle \epsilon }$. (a small factor more than linear space)

### Efficiency

The ratio of the worst case number of events that can occur when the structure is advanced to ${\displaystyle t=\infty }$ to the worst case number of "necessary changes" to the data structure. The definition of "necessary changes" is problem dependent. For example, in the case of a kinetic data structure maintaining the kinetic hull of a set of moving points, the number of necessary changes would be the number of times the kinetic hull changes as time is advanced to ${\displaystyle t=\infty }$. A kinetic data structure is said to be efficient if this ratio is small.

## Types of Trajectories

The performance of a certain kinetic data structure may be analyzed for certain types of trajectories. Typically, the following types of trajectories are considered:

• Affine:(Linear functions) ${\displaystyle f(t)=at+b}$
• Bounded-degree algebraic:(Polynomial functions of bounded degree) ${\displaystyle f(t)=\sum _{i=0}^{n}a_{i}t^{i}}$ for some fixed ${\displaystyle n}$.
• Pseudo-algebraic: Trajectories such that any certificate of interest flips between true and false ${\displaystyle O(1)}$ times.

## References

1. ^ Basch, Julien (1999). Kinetic Data Structures (Thesis). Stanford University.
2. ^ Guibas, Leonidas J. (2001), "Kinetic Data Structures" (PDF), in Mehta, Dinesh P.; Sahni, Sartaj, Handbook of Data Structures and Applications, Chapman and Hall/CRC, pp. 23–1–23–18, ISBN 978-1-58488-435-4
3. ^ Abam, Mohammad Ali (2007). New Data Structures and Algorithms for Mobile Data (Thesis). Eindhoven University of Technology.
4. ^ Rahmati, Zahed (2014). Simple, Faster Kinetic Data Structures (Thesis). University of Victoria.
5. ^ Guibas, Leonidas J. (1998), "Kinetic Data Structures: A State of the Art Report" (PDF), in Agarwal, Pankaj K.; Kavraki, Lydia E.; Mason, Matthew T., Robotics: The Algorithmic Perspective (Proceedings of the 3rd Workshop on the Algorithmic Foundations of Robotics), A K Peters/CRC Press, pp. 191–209, ISBN 978-1-56881-081-2