Input-thrifty extrema testing

  • Authors:
  • Kuan-Chieh Robert Tseng;David Kirkpatrick

  • Affiliations:
  • Department of Computer Science, University of British Columbia, Canada;Department of Computer Science, University of British Columbia, Canada

  • Venue:
  • ISAAC'11 Proceedings of the 22nd international conference on Algorithms and Computation
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

We study the complexity of one-dimensional extrema testing: given one input number, determine if it is properly contained in the interval spanned by the remaining n input numbers. We assume that each number is given as a finite stream of bits, in decreasing order of significance. Our cost measure, referred to as the leading-input-bits-cost (or LIB-cost for short), for an algorithm solving such a problem is the total number of bits that it needs to consume from its input streams. An input-thrifty algorithm is one that performs favorably with respect to this LIB-cost measure. A fundamental goal in the design of such algorithms is to be more efficient on "easier" input instances, ideally approaching the minimum number of input bits needed to certify the solution, on all orderings of all input instances. In this paper we present an input-thrifty algorithm for extrema-testing that is log-competitive in the following sense: if the best possible algorithm for a particular problem instance, including algorithms that are only required to be correct for presentations of this one instance, has worst-case (over all possible input presentations) LIB-cost c, then our algorithm has worst-case LIB-cost $O(c\lg \min\{c, n\})$. In fact, our algorithm achieves something considerably stronger: if any input sequence (i.e. an arbitrary presentation of an arbitrary input set) can be tested by a monotonic algorithm (an algorithm that preferentially explores lower indexed input streams) with LIB-cost c, then our algorithm has LIB-cost $O(c\lg \min\{c, n\})$. Since, as we demonstrate, the cost profile of any algorithm can be matched by that of a monotonic algorithm, it follows that our algorithm is to within a log factor of optimality at the level of input sequences. We also argue that this log factor cannot be reduced, even for algorithms that are only required to be correct on input sequences with some fixed intrinsic monotonic LIB-cost c. The extrema testing problem can be cast as a kind of list-searching problem, and our algorithm employs a variation of a technique called hyperbolic sweep that was introduced in that context. Viewed in this light, our results can be interpreted as another variant of the well-studied cow-path problem, with applications in the design of hybrid algorithms.