ISAAC 2011: Algorithms and Computation pp 554-563

# Input-Thrifty Extrema Testing

• Kuan-Chieh Robert Tseng
• David Kirkpatrick
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7074)

## 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.

## Keywords

Problem Instance Input Sequence Competitive Ratio Deterministic Algorithm Uncertainty Interval
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

## References

1. 1.
Afshani, P., Barbay, J., Chan, T.M.: Instance-optimal geometric algorithms. In: 50th Annual IEEE Symposium on Foundations of Computer Science, pp. 129–138 (2009)Google Scholar
2. 2.
Azar, Y., Broder, A.Z., Manasse, M.S.: On-line choice of on-line algorithms. In: Proc. 4th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 432–440 (1993)Google Scholar
3. 3.
Baeza-Yates, R.A., Culberson, J.C., Rawlins, G.J.E.: Searching in the plane. Information and Computation 106(2), 234–252 (1993)
4. 4.
Bruce, R., Hoffmann, M., Krizanc, D., Raman, R.: Efficient update strategies for geometric computing with uncertainty. Theory of Computing Systems, 411–423 (2005)Google Scholar
5. 5.
Dorrigiv, R., Lopez-Ortiz, A.: A survey of performance measures for on-line algorithms. ACM SIGACT News 36(3), 67–81 (2005)
6. 6.
Erlebach, T., Hoffmann, M., Krizanc, D., Mihal’ák, M., Raman, R.: Computing minimum spanning trees with uncertainty. ArXiv e-prints (2008)Google Scholar
7. 7.
Fagin, R., Lotem, A., Naor, M.: Optimal aggregation algorithms for middleware. In: Proc. 20th ACM Symposium on Principles of Database Systems, pp. 102–113 (2001)Google Scholar
8. 8.
Feder, T., Motwani, R., Panigrahy, R., Olston, C., Widom, J.: Computing the median with uncertainty. In: Proc. 32nd Annual ACM Symposium on Theory of Computing, pp. 602–607 (2000)Google Scholar
9. 9.
Kao, M.-Y., Littman, M.L.: for informed cows. In: AAAI 1997 Workshop on On-Line Search (1997)Google Scholar
10. 10.
Kao, M.-Y., Ma, Y., Sipser, M., Yin, Y.: Optimal constructions of hybrid algorithms. J. Algorithms 29(1), 142–164 (1998)
11. 11.
Khanna, S., Tan, W.-C.: On computing functions with uncertainty. In: Proc. 20th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, pp. 171–182 (2001)Google Scholar
12. 12.
Kirkpatrick, D.: Hyperbolic dovetailing. In: Proc. European Symposium on Algorithms, pp. 516–527 (2009)Google Scholar
13. 13.
Luby, M., Sinclair, A., Zuckerman, D.: Optimal speedup of Las Vegas algorithms. In: Proc. Second Israel Symposium on Theory of Computing and Systems, Jerusalem, pp. 128–133 (June 1993)Google Scholar
14. 14.
Sleator, D.D., Tarjan, R.E.: Amortized efficiency of list update and paging rules. Comm. ACM 28, 202–208 (1985)
15. 15.