56,742 research outputs found

    Optimal Binary Search Trees with Near Minimal Height

    Full text link
    Suppose we have n keys, n access probabilities for the keys, and n+1 access probabilities for the gaps between the keys. Let h_min(n) be the minimal height of a binary search tree for n keys. We consider the problem to construct an optimal binary search tree with near minimal height, i.e.\ with height h <= h_min(n) + Delta for some fixed Delta. It is shown, that for any fixed Delta optimal binary search trees with near minimal height can be constructed in time O(n^2). This is as fast as in the unrestricted case. So far, the best known algorithms for the construction of height-restricted optimal binary search trees have running time O(L n^2), whereby L is the maximal permitted height. Compared to these algorithms our algorithm is at least faster by a factor of log n, because L is lower bounded by log n

    Width and mode of the profile for some random trees of logarithmic height

    Full text link
    We propose a new, direct, correlation-free approach based on central moments of profiles to the asymptotics of width (size of the most abundant level) in some random trees of logarithmic height. The approach is simple but gives precise estimates for expected width, central moments of the width and almost sure convergence. It is widely applicable to random trees of logarithmic height, including recursive trees, binary search trees, quad trees, plane-oriented ordered trees and other varieties of increasing trees.Comment: Published at http://dx.doi.org/10.1214/105051606000000187 in the Annals of Applied Probability (http://www.imstat.org/aap/) by the Institute of Mathematical Statistics (http://www.imstat.org

    Fringe trees, Crump-Mode-Jagers branching processes and mm-ary search trees

    Full text link
    This survey studies asymptotics of random fringe trees and extended fringe trees in random trees that can be constructed as family trees of a Crump-Mode-Jagers branching process, stopped at a suitable time. This includes random recursive trees, preferential attachment trees, fragmentation trees, binary search trees and (more generally) mm-ary search trees, as well as some other classes of random trees. We begin with general results, mainly due to Aldous (1991) and Jagers and Nerman (1984). The general results are applied to fringe trees and extended fringe trees for several particular types of random trees, where the theory is developed in detail. In particular, we consider fringe trees of mm-ary search trees in detail; this seems to be new. Various applications are given, including degree distribution, protected nodes and maximal clades for various types of random trees. Again, we emphasise results for mm-ary search trees, and give for example new results on protected nodes in mm-ary search trees. A separate section surveys results on height, saturation level, typical depth and total path length, due to Devroye (1986), Biggins (1995, 1997) and others. This survey contains well-known basic results together with some additional general results as well as many new examples and applications for various classes of random trees

    The height of q-Binary Search Trees

    Get PDF
    q-binary search trees are obtained from words, equipped with a geometric distribution instead of permutations. The average and variance of the heighth computated, based on random words of length n, as well as a Gaussian limit law

    Terapan algoritma pohon merah hitam

    Get PDF
    ABSTRAK Dalam suatu pohon pencarian biner dapat dilakukan suatu operasi operasi seperti menemukan suatu data, menemukanan data minimum, maksimum, menentukan predecessor , successor, penyisipan dan penghapusan suatu data. Operasi dasar pada suatu pohon pencarian biner memberikan waktu yang sebandirig dengan tinggi pohon. Jika pohon mempunyai n simpul, operasi yang sama memberikan running time terburuk, 0 (n). Pohon merah hitam merupakan salah satu bentuk pohon seimbang yang menjamin bahwa operasi dasar memberikan running time 0 ( log n ). ABSTRAC Binary search trees are data structures that support many operation including searh, minimum, maximum, predecessor, successor, insert and delete. Thus, a search tree can be used both as dictionary and as a priority queue. Basic operation on a binary seacrh tree take time proportional to the height of tree. If the tree is a linear chain of n nodes, the same operation take worst case running time, 0 (n). Red Black trees are one of many search tree schemes that are balanced in order to guarantee that basic operation take 0 ( log n) time in worst Repe

    Optimal binary trees with height restrictions on left and right branches

    Get PDF
    We begin with background definitions on binary trees. Then we review known algorithms for finding optimal binary search trees. Knuth\u27s famous algorithm, presented in the second chapter, is the cornerstone for our work. It depends on two important results: the Quadrangle Lemma and the Monoticity Theorem. These enabled Knuth to achieve a time complexity of O(n2), while previous algorithms had been O(n3) (n = size of input). We present the known generalization of Knuth\u27s algorithm to trees with a height restriction. Finally, we consider the previously unexamined case of trees with different restrictions on left and right heights. We prove the Quadrangle Lemma and the Monoticity Theorem in this case, and present an algorithm based on this
    • …
    corecore