To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

From Wikipedia, the free encyclopedia

A 2-d heap with 20 elements.

A K-D heap[1] is a data structure in computer science which implements a multidimensional priority queue without requiring additional space. It is a generalization of the Heap.[2] It allows for efficient insertion, query of the minimum element, and deletion of the minimum element in any of the k dimensions, and therefore includes the double-ended heap as a special case.

Structure

Given a collection of n items, where each has keys (or priorities), the K-D heap organizes them in to a binary tree which satisfies two conditions:

  • It is a complete binary tree, which means it is full except for possibly the last layer, where it must be filled-up from the left.
  • It satisfies k-d heap order.

The property of k-d heap order is analogous to that of the heap property for regular heaps. A heap maintains k-d heap order if:

  • The node at the root has the smallest 1st-property of the whole tree, and
  • Every other node v that is not the root, is such that if its parent w has the smallest i-th property of the subtree rooted by the parent, then v has the smallest -th property of the whole subtree rooted by v.

One consequence of this structure is that the smallest 1-st property-element will trivially be in the root, and moreover all the smallest i-th property elements for every i will be in the first k levels.

Operations

Creating a K-D heap from n items takes O(n) time. The following operations are supported:

  • Insert a new item in time O(log n)
  • Retrieve the item with a minimum key in any of the dimensions in constant time
  • Delete an item with a minimum key in any dimension in time O(log n)
  • Delete or modify an arbitrary item in the heap in time O(log n) assuming its position in the heap is known

Importantly, the hidden constant in these operations is exponentially large relative , the number of dimensions, so K-D heaps are not practical for applications with very many dimensions.

References

  1. ^ Ding Y., Weiss M.A. (1993) The K-D heap: An efficient multi-dimensional priority queue. In: Dehne F., Sack JR., Santoro N., Whitesides S. (eds) Algorithms and Data Structures. WADS 1993. Lecture Notes in Computer Science, vol 709. Springer, Berlin, Heidelberg
  2. ^ Advanced Data Structures, Peter Brass, ISBN 978-0-521-88037-4, page 270
This page was last edited on 11 March 2022, at 10:12
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.