Strategies for Searching with Different Access Costs

  • Authors:
  • Eduardo Sany Laber;Ruy Luiz Milidiú;Artur Alves Pessoa

  • Affiliations:
  • -;-;-

  • Venue:
  • ESA '99 Proceedings of the 7th Annual European Symposium on Algorithms
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Let us consider an ordered set of elements A = {a1 an} and a list of positive costs c1, ..., cn, where ci is the access cost of the element ai. Any search strategy for the set A can be represented by a binary search tree (BST) with n nodes, where each node corresponds to an element of A. The search strategy with minimum expected access cost is given by the BST that minimizes 驴i=1n cin(ai) among all binary trees, where n(ai) denotes the number of nodes in the subtree rooted by the node that corresponds to the element ai.In this paper, we prove that the cost of an optimal search tree is bounded above by 4C ln(1+n), where C = 驴i=1n ci. Furthermore, we showthe this upper bound is asymptotically optimal. The proof of this upper bound is constructive and generates a 4 ln(1+n)-approximate algorithm for constructing search trees. This algorithm runs in O(nH) time and requires O(n) space, where H is the height of the tree produced at the end of the algorithm. We also prove some combinatorial properties of the optimal search trees, and based on them, we propose two heuristics to constructing search trees. We report some experimental results that indicates a good performance of these heuristics. The algorithms devised in this paper can be useful for practical cases, since the best known exact algorithm for this problem runs in O(n3) time, requiring O(n2) space.