Untangling the balancing and searching of balanced binary search trees

نویسندگان

  • Matthew H. Austern
  • Bjarne Stroustrup
  • Mikkel Thorup
  • John Wilkinson
چکیده

A Source code 2 A.1 Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 A.2 Searchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 A.2.1 search tree.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 A.2.2 selection search tree.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 A.2.3 simple string search tree.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 A.2.4 optima string search tree.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 A.3 Balancers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.3.1 red black.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 A.3.2 treap.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 A.3.3 splay.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 A.3.4 trivial.hpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Efficient Search in Structured Peer-to-Peer Systems: Binary v.s. k-ary Unbalanced Tree Structures

We investigate the search cost in terms of number of messages generated for routing queries in tree-based P2P structured systems including binary and k-ary tree structures with different arities and different degrees of imbalance in the tree shape. This work is motivated by the fact that k-ary balanced tree access structures can greatly reduce the number of hops for searching compared to the bi...

متن کامل

P´olya Urn Models and Connections to Random Trees: A Review

This paper reviews P´olya urn models and their connection to random trees. Basic results are presented, together with proofs that underly the historical evolution of the accompanying thought process. Extensions and generalizations are given according to chronology: • P´olya-Eggenberger’s urn • Bernard Friedman’s urn • Generalized P´olya urns • Extended urn schemes • Invertible urn schemes ...

متن کامل

New Combinatorial Properties and Algorithms for AVL Trees

In this thesis, new properties of AVL trees and a new partitioning of binary search trees named core partitioning scheme are discussed, this scheme is applied to three binary search trees namely AVL trees, weight-balanced trees, and plain binary search trees. We introduce the core partitioning scheme, which maintains a balanced search tree as a dynamic collection of complete balanced binary tre...

متن کامل

LDT: A Logarithmic Distributed Search Tree

We propose LDT, a new Scalable Distributed Search Tree for the dictionary problem, as an alternative to both random trees and deterministic height balanced trees. Our scheme exhibits logarithmic update time, either constant or logarithmic search time for single key queries and output sensitive query time for range search query, depending whether one affords linear or O(n log n) space overhead.

متن کامل

An Immediate Approach to Balancing Nodes of Binary Search Trees

We present an immediate approach in hoping to bridge the gap between the difficulties of learning ordinary binary search trees and their height-balanced variants in the typical data structures class. Instead of balancing the heights of the two children, we balance the number of their nodes. The concepts and programming techniques required for the node-balanced tree are much easier than the AVL ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 33  شماره 

صفحات  -

تاریخ انتشار 2003