Kinetic priority queue

Last updated

A Kinetic Priority Queue is an abstract kinetic data structure. It is a variant of a priority queue designed to maintain the maximum (or minimum) priority element (key-value pair) when the priority of every element is changing as a continuous function of time. Kinetic priority queues have been used as components of several kinetic data structures, as well as to solve some important non-kinetic problems such as the k-set problem and the connected red blue segments intersection problem.

Contents

Implementations

The operations supported are:

There are several variants of kinetic priority queues, which support the same basic operations but have different performance guarantees. Some of the most common implementations are kinetic heaps which are simple to implement but don't have tight theoretical performance bounds, and their randomized variants - kinetic heaters and kinetic hangers - which are easier to analyze. There is also a heap-like structure based on the dynamic convex hull data structure [1] which achieves better performance for affine motion of the priorities, but doesn't support curved trajectories. The kinetic tournament is another commonly used implementation. It achieves, deterministically, the same performance bounds as the heater or hanger, however it is less local and responsive than the heap-based data-structures.

Time complexities of kinetic priority queue implementations [2]
Trajectory of element prioritiesKinetic heapKinetic hanger, heater & tournamentDynamic convex hull
Lines
Line segments
δ-intersecting curvesn/a

Here, denotes the inverse Ackermann function.-intersecting curves refer to curves where each pair has at most intersections, and refers to a term in the Davenport-Schinzel sequence, which gives the maximum size of the upper envelope of intersecting curves. is the largest number of elements in the queue at any given time, while refers to the total number of elements that are ever in the queue.

Applications

Kinetic priority queues are used as part of other kinetic data structures/algorithms such as kinetic closest pair, kinetic max-cut [3] or kinetic clustering. [4]

They can also be used to solve problems such as broadcast scheduling [5] or the connected red blue segments intersection problem. [6]

Related Research Articles

<span class="mw-page-title-main">Heap (data structure)</span> Computer science data structure

In computer science, a heap is a tree-based data structure that satisfies the heap property: In a max heap, for any given node C, if P is a parent node of C, then the key of P is greater than or equal to the key of C. In a min heap, the key of P is less than or equal to the key of C. The node at the "top" of the heap is called the root node.

In computer science, a priority queue is an abstract data-type similar to a regular queue or stack data structure. Each element in a priority queue has an associated priority. In a priority queue, elements with high priority are served before elements with low priority. In some implementations, if two elements have the same priority, they are served in the same order in which they were enqueued. In other implementations, the order of elements with the same priority is undefined.

<span class="mw-page-title-main">Dijkstra's algorithm</span> Graph search algorithm

Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a weighted graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later.

<span class="mw-page-title-main">Binary heap</span> Variant of heap data structure

A binary heap is a heap data structure that takes the form of a binary tree. Binary heaps are a common way of implementing priority queues. The binary heap was introduced by J. W. J. Williams in 1964, as a data structure for heapsort.

In computer science, a binomial heap is a data structure that acts as a priority queue but also allows pairs of heaps to be merged. It is important as an implementation of the mergeable heap abstract data type, which is a priority queue supporting merge operation. It is implemented as a heap similar to a binary heap but using a special tree structure that is different from the complete binary trees used by binary heaps. Binomial heaps were invented in 1978 by Jean Vuillemin.

In computer graphics, the Liang–Barsky algorithm is a line clipping algorithm. The Liang–Barsky algorithm uses the parametric equation of a line and inequalities describing the range of the clipping window to determine the intersections between the line and the clip window. With these intersections it knows which portion of the line should be drawn. So this algorithm is significantly more efficient than Cohen–Sutherland. The idea of the Liang–Barsky clipping algorithm is to do as much testing as possible before computing line intersections.

A pairing heap is a type of heap data structure with relatively simple implementation and excellent practical amortized performance, introduced by Michael Fredman, Robert Sedgewick, Daniel Sleator, and Robert Tarjan in 1986. Pairing heaps are heap-ordered multiway tree structures, and can be considered simplified Fibonacci heaps. They are considered a "robust choice" for implementing such algorithms as Prim's MST algorithm, and support the following operations :

<span class="mw-page-title-main">Fortune's algorithm</span> Voronoi diagram generation algorithm

Fortune's algorithm is a sweep line algorithm for generating a Voronoi diagram from a set of points in a plane using O(n log n) time and O(n) space. It was originally published by Steven Fortune in 1986 in his paper "A sweepline algorithm for Voronoi diagrams."

The d-ary heap or d-heap is a priority queue data structure, a generalization of the binary heap in which the nodes have d children instead of 2. Thus, a binary heap is a 2-heap, and a ternary heap is a 3-heap. According to Tarjan and Jensen et al., d-ary heaps were invented by Donald B. Johnson in 1975.

<span class="mw-page-title-main">Cartesian tree</span> Binary tree derived from a sequence of numbers

In computer science, a Cartesian tree is a binary tree derived from a sequence of distinct numbers. To construct the Cartesian tree, set its root to be the minimum number in the sequence, and recursively construct its left and right subtrees from the subsequences before and after this number. It is uniquely defined as a min-heap whose symmetric (in-order) traversal returns the original sequence.

In computational geometry, the Bentley–Ottmann algorithm is a sweep line algorithm for listing all crossings in a set of line segments, i.e. it finds the intersection points of line segments. It extends the Shamos–Hoey algorithm, a similar previous algorithm for testing whether or not a set of line segments has any crossings. For an input consisting of line segments with crossings, the Bentley–Ottmann algorithm takes time . In cases where , this is an improvement on a naïve algorithm that tests every pair of segments, which takes .

Ordering points to identify the clustering structure (OPTICS) is an algorithm for finding density-based clusters in spatial data. It was presented by Mihael Ankerst, Markus M. Breunig, Hans-Peter Kriegel and Jörg Sander. Its basic idea is similar to DBSCAN, but it addresses one of DBSCAN's major weaknesses: the problem of detecting meaningful clusters in data of varying density. To do so, the points of the database are (linearly) ordered such that spatially closest points become neighbors in the ordering. Additionally, a special distance is stored for each point that represents the density that must be accepted for a cluster so that both points belong to the same cluster. This is represented as a dendrogram.

The Three-detector problem is a problem in traffic flow theory. Given is a homogeneous freeway and the vehicle counts at two detector stations. We seek the vehicle counts at some intermediate location. The method can be applied to incident detection and diagnosis by comparing the observed and predicted data, so a realistic solution to this problem is important. Newell G.F. proposed a simple method to solve this problem. In Newell's method, one gets the cumulative count curve (N-curve) of any intermediate location just by shifting the N-curves of the upstream and downstream detectors. Newell's method was developed before the variational theory of traffic flow was proposed to deal systematically with vehicle counts. This article shows how Newell's method fits in the context of variational theory.

In computer science, a min-max heap is a complete binary tree data structure which combines the usefulness of both a min-heap and a max-heap, that is, it provides constant time retrieval and logarithmic time removal of both the minimum and maximum elements in it. This makes the min-max heap a very useful data structure to implement a double-ended priority queue. Like binary min-heaps and max-heaps, min-max heaps support logarithmic insertion and deletion and can be built in linear time. Min-max heaps are often represented implicitly in an array; hence it's referred to as an implicit data structure.

In computer science, the Brodal queue is a heap/priority queue structure with very low worst case time bounds: for insertion, find-minimum, meld and decrease-key and for delete-minimum and general deletion. They are the first heap variant to achieve these bounds without resorting to amortization of operational costs. Brodal queues are named after their inventor Gerth Stølting Brodal.

<span class="mw-page-title-main">Kinetic heap</span>

A Kinetic Heap is a kinetic data structure, obtained by the kinetization of a heap. It is designed to store elements where the priority is changing as a continuous function of time. As a type of kinetic priority queue, it maintains the maximum priority element stored in it. The kinetic heap data structure works by storing the elements as a tree that satisfies the following heap property – if B is a child node of A, then the priority of the element in A must be higher than the priority of the element in B. This heap property is enforced using certificates along every edge so, like other kinetic data structures, a kinetic heap also contains a priority queue to maintain certificate failure times.

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.

A Kinetic hanger is a randomized version of a kinetic heap whose performance is easy to analyze tightly. A kinetic hanger satisfies the heap property but relaxes the requirement that the tree structure must be strictly balanced, thus insertions and deletions can be randomized. As a result, the structure of the kinetic hanger has the property that it is drawn uniformly at random from the space of all possible heap-like structures on its elements.

In the mathematical theory of probability, the drift-plus-penalty method is used for optimization of queueing networks and other stochastic systems.

In computer science, a monotone priority queue is a variant of the priority queue abstract data type in which the priorities of extracted items are required to form a monotonic sequence. That is, for a priority queue in which each successively extracted item is the one with the minimum priority, the minimum priority should be monotonically increasing. Conversely for a max-heap the maximum priority should be monotonically decreasing. The assumption of monotonicity arises naturally in several applications of priority queues, and can be used as a simplifying assumption to speed up certain types of priority queues.

References

  1. Brodal, G.S.; Jacob, R. (2002). "Dynamic planar convex hull". Proc. The 43rd Annual IEEE Symposium on Foundations of Computer Science. FCS. pp. 617–626. arXiv: 1902.11169 . doi:10.1109/SFCS.2002.1181985.
  2. da Fonseca, Guilherme D.; de Figueiredo, Celina M. H.; Carvalho, Paulo C. P. "Kinetic hanger" (PDF). Information Processing Letters. pp. 151–157. Archived from the original (PDF) on May 24, 2015. Retrieved May 17, 2012.
  3. Czumaj, Arthur; Frahling, Gereon; Sohler, Christian (2007). Efficient kinetic data structures for MaxCut (PDF). Canadian Conference on Computational Geometry. Retrieved May 17, 2012.
  4. Li, Yifan; Han, Jiawei; Yang, Jiong. "Clustering moving objects". Proceedings of the tenth ACM SIGKDD international conference on knowledge discovery and data mining. SIGKDD. ACM. pp. 617–622.
  5. Haim Kaplan; Robert E. Tarjan; Kostas Tsioutsiouliklis (2001). "Faster kinetic heaps and their use in broadcast scheduling". Proc. 12th ACM-SIAM Symposium on Discrete Algorithms. ACM. pp. 836–844. CiteSeerX   10.1.1.12.2739 .
  6. Basch, Julien; Guibas, Leonidas; Ramkumar, G. (1996). "Reporting red-blue intersections between two sets of connected line segments". Algorithms — ESA '96. Springer Berlin / Heidelberg. CiteSeerX   10.1.1.55.98 . doi:10.1007/3-540-61680-2_64. ISBN   978-3-540-61680-1.