211 research outputs found
Recommended from our members
A subquadratic algorithm for constructing approximately optimal binary search trees
An algorithm is presented which constructs an optimal binary search tree for an ordered list of n items, and which requires subquadratic time if there is no long sublist of very low frequency items. For example, time = O(n^1.6) if the frequency of each item is at least ε/ n for some constant ε > 0.A second algorithm is presented which constructs an approximately optimal binary search tree. This algorithm has one parameter, and exhibits a tradeoff between speed and accuracy. It is possible to choose the parameter such that time = O(n^1.6) and error = o(l)
Recommended from our members
Length limited coding and optimal height-limited binary trees
A new O(nL)-time algorithm is given for finding an optimal prefix-free binary code for a weighted alphabet of size n, with the restriction that no code string be longer than L. An O(nL logn)-time algorithm is given for the corresponding alphabetic problem problem, which is equivalent to optimizing a dictionary of n words, implemented as a binary tree of height
Recommended from our members
Average case analysis of marking algorithms
The Lindstrom marking algorithm uses bounded workspace. Its time complexity is O(n^2) in all cases, but it has been assumed that the average case time complexity O(n lg n). It is proven that the average case time complexity is H(n^2). Similarly, the average size of the Wegbreit bit stack is shown to be H(n)
Recommended from our members
New application of failure functions
Several algorithms are presented whose operations are governed by a principle of failure functions: when searching for an extremal value within a sequence, it suffices to consider only the subsequence of items each of which is the first possible improvement of its predecessor. These algorithms are more efficient than their more traditional counterparts
Recommended from our members
The set LCS problem
An efficient algorithm is presented that solves a generalization of the Longest Common Subsequence problem, in which one of the two input strings contains sets of symbols which may be permuted. This problem arises from a music application
Subtree weight ratios for optimal binary search trees
For an optimal binary search tree T with a subtree S(d) at a distance d from the root of T, we study the ratio of the weight of S(d) to the weight of T. The maximum possible value, which we call ρ(d), of the ratio of weights, is found to have an upper bound of 2/F_d+3 where F_i is the ith Fibonacci number. For d = 1, 2, 3, and 4, the bound is shown to be tight. For larger d, the Fibonacci bound gives ρ(d) = O(ϕ^d) where ϕ ~ .61803 is the golden ratio. By giving a particular set of optimal trees, we prove ρ(d) = Ω((.58578 ... )^d), and believe a similar proof follows for ρ(d) = Ω((.60179 ... )^d). If we include frequencies for unsuccessful searches in the optimal binary search trees, the Fibonacci bound is found to be tight
- …