A treap is a randomized binary search tree data structure whose name combines tree and heap, reflecting the two ordering properties it maintains at once. Raimund Seidel and Cecilia R. Aragon introduced it in 1989: each key inserted into a treap is given an independent, randomly chosen numeric priority, and the structure is kept ordered as a binary search tree by key while also kept ordered as a heap by priority, so that in effect the tree ends up shaped as if its keys had been inserted into an ordinary unbalanced binary search tree in a uniformly random order, without ever having to know or control that order directly. Because randomization does the work that explicit rebalancing does in structures such as red-black trees, a treap is comparatively simple to implement while still achieving, with high probability, a tree height proportional to the logarithm of the number of keys, giving search, insertion and deletion operations expected logarithmic time.
Facts
Time Complexity
Time Complexity (category)Logarithmic Time -- O(log n) 1 Classification
Design Technique Connections
Credited To
Source NIST Dictionary of Algorithms and Data Structures: treap
Source NIST Dictionary of Algorithms and Data Structures: treap
Invented By
Source NIST Dictionary of Algorithms and Data Structures: treap
Source NIST Dictionary of Algorithms and Data Structures: treap
Uses Design Technique
Sources
1. Treap Algorithm (Wikipedia)
https://en.wikipedia.org/wiki/TreapQuote, https://en.wikipedia.org/wiki/Treap
In computer science, the treap and the randomized binary search tree are two closely related forms of binary search tree data structures that maintain a dynamic set of ordered keys and allow binary searches among the keys.
NIST Dictionary of Algorithms and Data Structures: treap
NIST Dictionary of Algorithms and Data StructuresCredited To: Cecilia R. Aragon, References
Raimund G. Seidel and Cecilia R. Aragon , Randomized Search Trees , Algorithmica, 16:464-497 (1996).
Invented By: Cecilia R. Aragon, References
Raimund G. Seidel and Cecilia R. Aragon , Randomized Search Trees , Algorithmica, 16:464-497 (1996).
Credited To: Raimund Seidel, References
Raimund G. Seidel and Cecilia R. Aragon , Randomized Search Trees , Algorithmica, 16:464-497 (1996).
Invented By: Raimund Seidel, References
Raimund G. Seidel and Cecilia R. Aragon , Randomized Search Trees , Algorithmica, 16:464-497 (1996).
In Group: Search Trees and Dictionary Structures, Definition
A binary search tree in which nodes have another key
View the Source Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.