A regular heap can be kinetized by augmenting with a certificate [A>B] for every pair of nodesA, B such that B is a child node of A. If the value stored at a node X is a function fX(t) of time, then this certificate is only valid while fA(t) > fB(t). Thus, the failure of this certificate must be scheduled in the event queue at a time t such that fA(t) > fB(t).
All certificate failures are scheduled on the "event queue", which is assumed to be an efficient priority queue whose operations take O(log n) time.
When a certificate [A>B] fails, the data structure must swap A and B in the heap, and update the certificates that each of them was present in.
For example, if B (with child nodes Y and Z) was a child node of A (with child nodes B and C and parent node X), and the certificate [A>B] fails, then the data structure must swap B and A, then replace the old certificates (and the corresponding scheduled events) [A>B], [A<X], [A>C], [B>Y], [B>Z] with new certificates [B>A], [B<X], [B>C], [A>Y] and [A>Z].
Thus, assuming non-degeneracy of the events (no two events happen at the same time), only a constant number of events need to be de-scheduled and rescheduled even in the worst case.
A kinetic heap supports the following operations:
Kinetic heaps perform well according to the four metrics (responsiveness, locality, compactness and efficiency) of kinetic data structure quality defined by Basch et al.1 The analysis of the first three qualities is straightforward:
The efficiency of a kinetic heap in the general case is largely unknown.234 However, in the special case of affine motion f(t) = at + b of the priorities, kinetic heaps are known to be very efficient.5
In this special case, the maximum number of events processed by a kinetic heap can be shown to be exactly the number of edges in the transitive closure of the tree structure of the heap, which is O(nlogn) for a tree of height O(logn).6
If n insertions and deletions are made on a kinetic heap that starts empty, the maximum number of events processed is O ( n n log n ) . {\displaystyle O(n{\sqrt {n\log n}}).} 7 However, this bound is not believed to be tight,8 and the only known lower bound is Ω ( n log n ) {\displaystyle \Omega (n\log n)} .9
This article deals with "simple" kinetic heaps as described above, but other variants have been developed for specialized applications,10 such as:
Other heap-like kinetic priority queues are:
Guibas, Leonidas. "Kinetic Data Structures - Handbook" (PDF). Archived from the original (PDF) on 2007-04-18. Retrieved May 17, 2012.
Basch, J., Guibas, L. J., Hershberger, J (1997). "Data structures for mobile data". Proceedings of the eighth annual ACM-SIAM symposium on Discrete algorithms. SODA. Society for Industrial and Applied Mathematics. pp. 747–756. Retrieved May 17, 2012.{{cite conference}}: CS1 maint: multiple names: authors list (link) http://dl.acm.org/citation.cfm?id=314435 ↩
da Fonseca; Guilherme D.; de Figueiredo; Celina M. H. "Kinetic heap-ordered trees: Tight analysis and improved algorithms" (PDF). Information Processing Letters. pp. 165–169. Archived from the original (PDF) on May 24, 2015. Retrieved May 17, 2012. https://web.archive.org/web/20150524004957/http://www.uniriotec.br/~fonseca/kh.pdf ↩
da Fonseca, Guilherme D. and de Figueiredo, Celina M. H. and 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.{{cite web}}: CS1 maint: multiple names: authors list (link) https://web.archive.org/web/20150524111432/http://www.uniriotec.br/~fonseca/hanger.pdf ↩
Basch, J, Guibas, L. J., Ramkumar, G. D. (1997). "Sweeping lines and line segments with a heap". Proceedings of the thirteenth annual symposium on Computational geometry. SCG. ACM. pp. 469–471. Retrieved May 17, 2012.{{cite conference}}: CS1 maint: multiple names: authors list (link) http://dl.acm.org/citation.cfm?id=263089 ↩
K. H., Tarjan, R. and T. K. (2001). "Faster kinetic heaps and their use in broadcast scheduling" (PDF). Proc. 12th ACM-SIAM Symposium on Discrete Algorithms. ACM. pp. 836–844. Retrieved May 17, 2012.{{cite conference}}: CS1 maint: multiple names: authors list (link)[permanent dead link] http://wwwnew.cs.princeton.edu/courses/archive/fall03/cs528/handouts/faster%20kinetic%20heaps.pdf ↩