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.
[1]
Ricardo A. Baeza-Yates,et al.
Searching in the Plane
,
1993,
Inf. Comput..
[2]
David G. Kirkpatrick,et al.
Hyperbolic Dovetailing
,
2009,
ESA.
[3]
Ming-Yang Kao,et al.
Optimal constructions of hybrid algorithms
,
1994,
SODA '94.
[4]
Robert E. Tarjan,et al.
Amortized efficiency of list update and paging rules
,
1985,
CACM.
[5]
Yossi Azar,et al.
On-line choice of on-line algorithms
,
1993,
SODA '93.
[6]
Sanjeev Khanna,et al.
On computing functions with uncertainty
,
2001,
PODS '01.
[7]
Timothy M. Chan,et al.
Instance-Optimal Geometric Algorithms
,
2009,
2009 50th Annual IEEE Symposium on Foundations of Computer Science.
[8]
Ming-Yang Kao,et al.
Algorithms for Informed Cows
,
1997
.
[9]
David Zuckerman,et al.
Optimal speedup of Las Vegas algorithms
,
1993,
[1993] The 2nd Israel Symposium on Theory and Computing Systems.
[10]
Thomas Erlebach,et al.
Computing Minimum Spanning Trees with Uncertainty
,
2008,
STACS.
[11]
Rajeev Raman,et al.
Efficient Update Strategies for Geometric Computing with Uncertainty
,
2003,
Theory of Computing Systems.
[12]
Moni Naor,et al.
Optimal aggregation algorithms for middleware
,
2001,
PODS.
[13]
Marek Chrobak,et al.
SIGACT news online algorithms column 8
,
2005,
SIGA.
[14]
Alejandro López-Ortiz,et al.
A Survey of Performance Measures for On-line Algorithms
,
2005,
SIGACT News.
[15]
TOMÁS FEDER,et al.
Computing the median with uncertainty
,
2000,
STOC '00.