TY - GEN

T1 - Zip trees

AU - Tarjan, Robert E.

AU - Levy, Caleb C.

AU - Timmel, Stephen

N1 - Publisher Copyright:
© Springer Nature Switzerland AG 2019.

PY - 2019

Y1 - 2019

N2 - We introduce the zip tree, (Zip: “To move very fast.”) a form of randomized binary search tree that integrates previous ideas into one practical, performant, and pleasant-to-implement package. A zip tree is a binary search tree in which each node has a numeric rank and the tree is (max)-heap-ordered with respect to ranks, with ties broken in favor of smaller keys. Zip trees are essentially treaps [8], except that ranks are drawn from a geometric distribution instead of a uniform distribution, and we allow rank ties. These changes enable us to use fewer random bits per node. We perform insertions and deletions by unmerging and merging paths (unzipping and zipping) rather than by doing rotations, which avoids some pointer changes and improves efficiency. The methods of zipping and unzipping take inspiration from previous top-down approaches to insertion and deletion by Stephenson [10], Martínez and Roura [5], and Sprugnoli [9]. From a theoretical standpoint, this work provides two main results. First, zip trees require only O(log log n) bits (with high probability) to represent the largest rank in an n-node binary search tree; previous data structures require O(log n) bits for the largest rank. Second, zip trees are naturally isomorphic to skip lists [7], and simplify Dean and Jones’ mapping between skip lists and binary search trees [2].

AB - We introduce the zip tree, (Zip: “To move very fast.”) a form of randomized binary search tree that integrates previous ideas into one practical, performant, and pleasant-to-implement package. A zip tree is a binary search tree in which each node has a numeric rank and the tree is (max)-heap-ordered with respect to ranks, with ties broken in favor of smaller keys. Zip trees are essentially treaps [8], except that ranks are drawn from a geometric distribution instead of a uniform distribution, and we allow rank ties. These changes enable us to use fewer random bits per node. We perform insertions and deletions by unmerging and merging paths (unzipping and zipping) rather than by doing rotations, which avoids some pointer changes and improves efficiency. The methods of zipping and unzipping take inspiration from previous top-down approaches to insertion and deletion by Stephenson [10], Martínez and Roura [5], and Sprugnoli [9]. From a theoretical standpoint, this work provides two main results. First, zip trees require only O(log log n) bits (with high probability) to represent the largest rank in an n-node binary search tree; previous data structures require O(log n) bits for the largest rank. Second, zip trees are naturally isomorphic to skip lists [7], and simplify Dean and Jones’ mapping between skip lists and binary search trees [2].

UR - http://www.scopus.com/inward/record.url?scp=85070596808&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85070596808&partnerID=8YFLogxK

U2 - 10.1007/978-3-030-24766-9_41

DO - 10.1007/978-3-030-24766-9_41

M3 - Conference contribution

AN - SCOPUS:85070596808

SN - 9783030247652

T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

SP - 566

EP - 577

BT - Algorithms and Data Structures - 16th International Symposium, WADS 2019, Proceedings

A2 - Friggstad, Zachary

A2 - Salavatipour, Mohammad R.

A2 - Sack, Jörg-Rüdiger

PB - Springer Verlag

T2 - 16th International Symposium on Algorithms and Data Structures, WADS 2019

Y2 - 5 August 2019 through 7 August 2019

ER -