Average depth in a binary search tree with repeated keys

نویسندگان

  • Margaret Archibald
  • Julien Clément
چکیده

Random sequences from alphabet {1, . . . , r} are examined where repeated letters are allowed. Binary search trees are formed from these, and the average left-going depth of the first 1 is found. Next, the right-going depth of the first r is examined, and finally a merge (or ‘shuffle’) operator is used to obtain the average depth of an arbitrary node, which can be expressed in terms of the left-going and right-going depths. The variance of each of these parameters is also found.

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

ثبت نام

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

منابع مشابه

Sequential Optimization of Binary Search Trees for Multiple Cost Functions

In this paper, we present a methodology to model the optimal binary search tree problem as a directed acyclic graph to extract all possible optimal solutions. We provide a mechanism to find optimal binary search trees relative to different types of cost functions, sequentially. We prove that for a set of n keys our optimization procedure makes O(n) arithmetic operations per cost function such a...

متن کامل

Depth of a Random Binary Search Tree with Concurrent Insertions

Shu e a deck of n cards numbered 1 through n. Deal out the rst c cards into a hand. A player then repeatedly chooses one of the cards from the hand, inserts it into a binary search tree, and then adds the next card from deck to the hand (if the deck is empty). When the player nally runs out of cards, how deep can the search tree be? This problem is motivated by concurrent insertions by c proces...

متن کامل

On the variance of the external path length in a symmetric digital trie

Digital searching is a well-known technique for storing and retrieving information using lexicographical (digital) structure of words. A radix trie (in short: trie) is such a digital search tree that edges are labelled by elements from aa alphabet (e.g., binary alphabet consisting of O’s and l’s) and leaves (external nodes) contain keys [ 1,4,9]. More precisely, in a binary case a key is a (pos...

متن کامل

Optimal Binary Search Trees with Costs Depending on the Access Paths

We describe algorithms for constructing optimal binary search trees, in which the access cost to each key depends on the k preceeding keys which were reached in the path to the desired key. Two kinds of optimal trees are considered, namely optimal worst case and weighted average case trees. The time complexities of the corresponding algorithms are O(n k+2) and O(kn k+2) respectively, while the ...

متن کامل

Lecture 4 : BST Introduction and Treaps

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

متن کامل

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


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

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

ثبت نام

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

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

دوره   شماره 

صفحات  -

تاریخ انتشار 2006