Lecture 4 : BST Introduction and Treaps

نویسنده

  • Gary Miller
چکیده

1 Binary Search Tree 1.1 Operations We want to design a data structure, an ordered set S that supports the following operations: 1. Search(k, S) 2. Insert(k, S) 3. Delete(k, S) 4. Range(k, k ′ , S) ≡ |{k ∈ S|k ≤ k ≤ k}| If only (1), (2), (3) are required, we could use a hash table. However, if we also need (4), then we will need a BST. Definition 1.1. T is a BST for keys S if: 1. T is an ordered binary tree with |S| nodes. 2. Each node stores a unique key, i.e., there is a 1-1 correspondence between keys and nodes. 3. With in-order traversal, we would gain an ordered sequence, i.e., the keys are stored in inorder. Definition 1.2. T is a balanced BST if max-depth(T ) = O(log n), and can be further categorized: 1. Always balanced: AVL, 2-3-4, Red-Black, B-Trees 2. Randomized balanced: Skip-lists, Treap 3. Amortized balanced: Splay tree

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

ثبت نام

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

منابع مشابه

Lecture 6 — March 6 , 2012

In the last lecture we discussed representing executions of binary search trees as point sets. A BST execution is represented as the point set of all nodes touched during the execution of the algorithm. A point set represents a valid BST execution if and only if it is arborally satistified. A point set is arborally satisfied iff any rectange spanned by two points not on a horizonal or vertical ...

متن کامل

An investigation into the effects of British Summer Time on road traffic accident casualties in Cheshire.

OBJECTIVE To assess the effect of British Summer Time (BST) on road traffic accident casualties and to analyse whether the introduction of year round BST would result in reductions in casualty numbers. DESIGN A comparative study of road traffic accident data from before and after the onset of BST. SETTING The county of Cheshire. SUBJECT Data from a total of 4185 casualties from the period...

متن کامل

The role of muscarnic cholinergic receptor of the bed nucleus of stria terminalis on cardiovascular response and baroreflex modulation in rat.

Introduction: The bed nucleus of the stria terminalis (BST) is a limbic structure which is involved in cardiovascular regulation and baroreflex modulation. The presence of cholinergic synaptic terminalis with high level of muscarinic receptors in the BST has been demonstrated. This study was performed to find the role of the cholinergic muscarinic receptor in cardiovascular response and baro...

متن کامل

The effect of glutaminergic system on cardiovascular regulation of rat

Introduction: The bed nucleus stria terminalis (BST) is a part of the limbic system, which plays a role in regulation of heart beat and blood circulation. It was recently shown that microinjection of L-glutamate in the BST elicits cardiovascular depressive, but the role of glutamate receptor subtypes has not been investigated yet. In this study, the role of glutamate receptor subgroups in regul...

متن کامل

Lecture : Tail Inequalities [fa'''] .. Markov's Inequality

The simple recursive structure of skip lists made it relatively easy to derive an upper bound on the expected worst-case search time, by way of a stronger high-probability upper bound on the worst-case search time. We can prove similar results for treaps, but because of the more complex recursive structure, we need slightly more sophisticated probabilistic tools. These tools are usually called ...

متن کامل

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


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

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

ثبت نام

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

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017