HOME

TheInfoList



OR:

A beap, or bi-parental heap, is a
data structure In computer science, a data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, a ...
where a node usually has two parents (unless it is the first or last on a level) and two children (unless it is on the last level). Unlike a heap, a beap allows
sublinear In linear algebra, a sublinear function (or functional as is more often used in functional analysis), also called a quasi-seminorm or a Banach functional, on a vector space X is a real-valued function with only some of the properties of a seminorm. ...
search. The beap was introduced by Ian Munro and
Hendra Suwanda Hendra may refer to: * Hendra (name), given name and surname * Hendra, Cornwall, England, the name of several hamlets * Hendra, Queensland, Australia, a suburb of Brisbane ** Hendra railway station, serves the Brisbane suburb * Hendra virus ...
. A related data structure is the
Young tableau In mathematics, a Young tableau (; plural: tableaux) is a combinatorial object useful in representation theory and Schubert calculus. It provides a convenient way to describe the group representations of the symmetric and general linear groups a ...
.


Performance

The height of the structure is approximately \sqrt. Also, assuming the last level is full, the number of elements on that level is also \sqrt. In fact, because of these properties all basic operations (insert, remove, find) run in O(\sqrt) time on average. Find operations in the heap can be O(n) in the worst case. Removal and insertion of new elements involves propagation of elements up or down (much like in a heap) in order to restore the beap invariant. An additional perk is that beap provides constant time access to the smallest element and O(\sqrt) time for the maximum element. Actually, a O(\sqrt) find operation can be implemented if parent pointers at each node are maintained. You would start at the absolute bottom-most element of the top node (similar to the left-most child in a heap) and move either up or right to find the element of interest.


References

* * {{cite journal , first=J. W. J. , last=Williams , author-link=J. W. J. Williams , title=Algorithm 232 - Heapsort , date=Jun 1964 , journal=
Communications of the ACM ''Communications of the ACM'' is the monthly journal of the Association for Computing Machinery (ACM). It was established in 1958, with Saul Rosen as its first managing editor. It is sent to all ACM members. Articles are intended for readers with ...
, volume=7 , issue=6 , pages=347–348 , doi = 10.1145/512274.512284 Heaps (data structures)