A subquadratic algorithm for constructing approximately optimal binary search trees
Journal of Algorithms
Search in an ordered array having variable probe cost
SIAM Journal on Computing
On an efficient dynamic programming technique of F. F. Yao
Journal of Algorithms
Introduction to algorithms
Information Processing Letters
Fast Calculation of Optimal Strategies for Searching with Non-Uniform Costs
SPIRE '00 Proceedings of the Seventh International Symposium on String Processing Information Retrieval (SPIRE'00)
Minimum average cost testing for partially ordered components
IEEE Transactions on Information Theory
Hi-index | 5.23 |
Let us consider an ordered set of keys A = {a1 ... an}, where the probability of searching ai is 1/n, for i = 1,..., n. If the cost of testing each key is similar, then the standard binary search is the strategy with minimum expected access cost. However, if the cost of testing ai is ci, for i = 1 .... , n, then the standard binary search is not necessarily the best strategy.In this paper, we prove that the expected access cost of an optimal search strategy is bounded above by 4Cln(n + 1)/n, where C= Σi=1n ci . Furthermore, we show that this upper bound is asymptotically tight up to constant factors. The proof of this upper bound is constructive and generates a 4ln(n + 1)-approximated algorithm for constructing near-optimal search strategies. This algorithm runs in O(n2) time and requires O(n) space, which can be useful for practical cases, since the best known exact algorithm for this problem runs in O(n3) time and requires O(n2) space.