Skip to main content

2019 | OriginalPaper | Buchkapitel

Zip Trees

verfasst von : Robert E. Tarjan, Caleb C. Levy, Stephen Timmel

Erschienen in: Algorithms and Data Structures

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

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].

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
Seidel and Aragon [8] hinted at the possibility of doing insertions and deletions by unzipping and zipping: in a footnote they say, “In practice it is preferable to approach these operations the other way around. Joins and splits of treaps can be implemented as iterative top-down procedures; insertions and deletions can then be implemented as accesses followed by splits or joins.” But they provide no further details.
 
2
This issue is not merely theoretical. Reuse of random seeds has led to real-world “denial-of-service” attacks for a number of programming libraries. See http://​ocert.​org/​advisories/​ocert-2011-003.​html.
 
Literatur
1.
Zurück zum Zitat Chernoff, H.: A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations. Ann. Math. Stat. 23(4), 493–507 (1952)MathSciNetCrossRef Chernoff, H.: A measure of asymptotic efficiency for tests of a hypothesis based on the sum of observations. Ann. Math. Stat. 23(4), 493–507 (1952)MathSciNetCrossRef
2.
Zurück zum Zitat Dean, B.C., Jones, Z.H.: Exploring the duality between skip lists and binary search trees. In: Proceedings of the 45th Annual Southeast Regional Conference, pp. 395–400. ACM Press (2007) Dean, B.C., Jones, Z.H.: Exploring the duality between skip lists and binary search trees. In: Proceedings of the 45th Annual Southeast Regional Conference, pp. 395–400. ACM Press (2007)
3.
4.
Zurück zum Zitat Hibbard, T.N.: Some combinatorial properties of certain trees with applications to searching and sorting. J. ACM 9(1), 13–28 (1962)MathSciNetCrossRef Hibbard, T.N.: Some combinatorial properties of certain trees with applications to searching and sorting. J. ACM 9(1), 13–28 (1962)MathSciNetCrossRef
6.
Zurück zum Zitat Prodinger, H.: Combinatorics of geometrically distributed random variables: left-to-right maxima. Discrete Math. 153(1–3), 253–270 (1996)MathSciNetCrossRef Prodinger, H.: Combinatorics of geometrically distributed random variables: left-to-right maxima. Discrete Math. 153(1–3), 253–270 (1996)MathSciNetCrossRef
7.
Zurück zum Zitat Pugh, W.: Skip lists: a probabilistic alternative to balanced trees. Commun. ACM 33(6), 668–676 (1990)CrossRef Pugh, W.: Skip lists: a probabilistic alternative to balanced trees. Commun. ACM 33(6), 668–676 (1990)CrossRef
10.
Zurück zum Zitat Stephenson, C.J.: A method for constructing binary search trees by making insertions at the root. Int. J. Comput. Inf. Sci. 9(1), 15–29 (1980)CrossRef Stephenson, C.J.: A method for constructing binary search trees by making insertions at the root. Int. J. Comput. Inf. Sci. 9(1), 15–29 (1980)CrossRef
12.
Zurück zum Zitat Tarjan, R.E.: Data structures and network algorithms. Society for Industrial and Applied Mathematics, Philadelphia (1983)CrossRef Tarjan, R.E.: Data structures and network algorithms. Society for Industrial and Applied Mathematics, Philadelphia (1983)CrossRef
Metadaten
Titel
Zip Trees
verfasst von
Robert E. Tarjan
Caleb C. Levy
Stephen Timmel
Copyright-Jahr
2019
DOI
https://doi.org/10.1007/978-3-030-24766-9_41