skip to main content
research-article

Comparison-based time-space lower bounds for selection

Published: 06 April 2010 Publication History

Abstract

We establish the first nontrivial lower bounds on time-space trade-offs for the selection problem. We prove that any comparison-based randomized algorithm for finding the median requires Ω(nlog logS n) expected time in the RAM model (or more generally in the comparison branching program model), if we have S bits of extra space besides the read-only input array. This bound is tight for all S > log n, and remains true even if the array is given in a random order. Our result thus answers a 16-year-old question of Munro and Raman [1996], and also complements recent lower bounds that are restricted to sequential access, as in the multipass streaming model [Chakrabarti et al. 2008b].
We also prove that any comparison-based, deterministic, multipass streaming algorithm for finding the median requires Ω(nlog*(n/s)+ nlogs n) worst-case time (in scanning plus comparisons), if we have s cells of space. This bound is also tight for all s >log2 n. We get deterministic lower bounds for I/O-efficient algorithms as well.
The proofs in this article are self-contained and do not rely on communication complexity techniques.

References

[1]
Ajtai, M. 1999. A non-linear time lower bound for boolean branching programs. In Proceedings of the 40th IEEE Symposium on Foundations of Computer Science. 60--70.
[2]
Ajtai, M. 2002. Determinism versus nondeterminism for linear time RAMs with memory restrictions. J. Comput. Syst. Sci. 65, 2--37.
[3]
Arge, L., and Pagter, J. 2000. I/O-Space trade-offs. In Proceedings of the 7th Scandinavian Workshop on Algorithm Theory. Lecture Notes in Computer Science, vol. 1851. Springer, 448--461.
[4]
Beame, P. 1991. A general sequential time--space tradeoff for finding unique elements. SIAM J. Comput. 20, 270--277.
[5]
Beame, P., Jayram, T. S., and Saks, M. 2001. Time--space tradeoffs for branching programs. J. Comput. Syst. Sci. 63, 542--572.
[6]
Beame, P., Saks, M., Sun, X., and Vee, E. 2003. Time--space trade-off lower bounds for randomized computation of decision problems. J. ACM 50, 154--195.
[7]
Bent, S. W., and John, J. W. 1985. Finding the median requires 2n comparisons. In Proceedings of the 17th ACM Symposium on Theory of Computing. 213--216.
[8]
Blum, M., Floyd, R. W., Pratt, V., Rivest, R. L., and Tarjan, R. E. 1973. Time bounds for selection. J. Comput. Syst. Sci. 7, 448--461.
[9]
Borodin, A., and Cook, S. A. 1982. A time--space tradeoff for sorting on a general sequential model of computation. SIAM J. Comput. 11, 287--297.
[10]
Borodin, A., Fich, F. E., auf der Heide, F. M., Upfal, E., and Wigderson, A. 1987. A time--space tradeoff for element distinctness. SIAM J. Comput. 16, 97--99.
[11]
Borodin, A., Fischer, M. J., Kirkpatrick, D. G., Lynch, N. A., and Tompa, M. 1981. A time-space tradeoff for sorting on non-oblivious machines. J. Comput. Syst. Sci. 22, 351--364.
[12]
Chakrabarti, A., Cormode, G., and McGregor, A. 2008a. Robust lower bounds for communication and stream computation. In Proceedings of the 40th Symposium on Theory of Computing. 641--650.
[13]
Chakrabarti, A., Jayram, T. S., and Pǎtraşcu, M. 2008b. Tight lower bounds for selection in randomly ordered streams. In Proceedings of the 19th ACM-SIAM Symposium on Discrete Algorithms. 720--729.
[14]
Chan, T. M., and Chen, E. Y. 2007. Multi-Pass geometric algorithms. Discr. Comput. Geom. 37, 79--102.
[15]
Cobham, A. 1966. The recognition problem for the set of perfect squares. In Proceedings of the 7th IEEE Symposium on Foundations of Computer Science. 78--87.
[16]
Cunto, W., and Munro, J. I. 1989. Average case selection. J. ACM 36, 270--279.
[17]
Dor, D., and Zwick, U. 1999. Selecting the median. SIAM J. Comput. 28, 1722--1758.
[18]
Dor, D., and Zwick, U. 2001. Median selection requires (2+&epsis;)n comparisons. SIAM J. Discr. Math. 14, 312--325.
[19]
Floyd, R. W., and Rivest, R. L. 1975. Expected time bounds for selection. Comm. ACM 18, 165--173.
[20]
Frederickson, G. N. 1987. Upper bounds for time--space trade-offs in sorting and selection. J. Comput. Syst. Sci. 34, 19--26.
[21]
Guha, S., and McGregor, A. 2007. Lower bounds for quantile estimation in random-order and multi-pass streaming. In Proceedings of the 34th International Colloquium on Automata, Languages, and Programming. Lecture Notes in Computer Science, vol. 4596. Springer, 704--715.
[22]
Lai, T. W., and Wood, D. 1988. Implicit selection. In Proceedings of the 1st Scandinavian Workshop on Algorithm Theory. Lecture Notes in Computer Science, vol. 318. Springer, 14--23.
[23]
Moran, S., Snir, M., and Manber, U. 1985. Applications of Ramsey's theorem to decision tree complexity. J. ACM 32, 938--949.
[24]
Motwani, R., and Raghavan, P. 1995. Randomized Algorithms. Cambridge University Press.
[25]
Munro, J. I., and Paterson, M. S. 1980. Selection and sorting with limited storage. Theoret. Comput. Sci. 12, 315--323.
[26]
Munro, J. I., and Raman, V. 1996. Selection from read-only memory and sorting with minimum data movement. Theoret. Comput. Sci. 165, 311--323.
[27]
Pagter, J., and Rauhe, T. 1998. Optimal time-space trade-offs for sorting. In Proceedings of the 39th IEEE Symposium on Foundations of Computer Science. 264--268.
[28]
Raman, V., and Ramnath, S. 1999. Improved upper bounds for time--space trade-offs for selection. Nord. J. Comput. 6, 162--180.
[29]
Schönhage, A., Paterson, M., and Pippenger, N. 1976. Finding the median. J. Comput. Syst. Sci. 13, 184--199.
[30]
Yao, A. C.-C. 1994. Near-Optimal time--space tradeoff for element distinctness. SIAM J. Comput. 23, 966--975.

Cited By

View all
  • (2023)Sorting and Ranking of Self-Delimiting Numbers with Applications to Tree IsomorphismCombinatorial Algorithms10.1007/978-3-031-34347-6_30(356-367)Online publication date: 7-Jun-2023
  • (2021)Memory-Adjustable Navigation Piles with Applications to Sorting and Convex HullsACM Transactions on Algorithms10.1145/345293817:2(1-19)Online publication date: 6-Jun-2021
  • (2021)Strictly In-Place Algorithms for Permuting and Inverting PermutationsAlgorithms and Data Structures10.1007/978-3-030-83508-8_24(329-342)Online publication date: 31-Jul-2021
  • Show More Cited By

Recommendations

Reviews

Soubhik Chakraborty

Lower bounds on time-space tradeoffs have been under investigation for quite some time. Chan establishes in this paper the first nontrivial lower bounds on time-space tradeoffs for the selection problem[, proving that] any comparison-based randomized algorithm for finding the median requires ?( n log log s n ) expected time in the RAM model [... using] s bits of extra space [in addition to] the read-only input array. The result answers a question previously posed by Munro and Raman [1]. The paper further proves that "any comparison-based, deterministic, multi-pass streaming algorithm for finding the median requires ?( n log4( n / s ) + n log s n ) worst-case time" using s cells of space. The proofs in this paper are self-contained and do not depend on communication complexity techniques. The paper is simply brilliant and the only flaw, if any, is that there is also a tradeoff between central processing unit (CPU) time and programmer's time, which has not been considered. As a rule of thumb, CPU time is more important than programmer's time only for those algorithms that will be used frequently. The author could have easily substantiated the claims, by providing some data to indicate how frequently the algorithm is being used on average. The target readership for this paper includes algorithm designers, postgraduates, and researchers in computer science. The results will certainly draw some interest from the computing community in general. I strongly recommend the paper for scientific libraries. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Algorithms
ACM Transactions on Algorithms  Volume 6, Issue 2
March 2010
373 pages
ISSN:1549-6325
EISSN:1549-6333
DOI:10.1145/1721837
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 06 April 2010
Accepted: 01 March 2009
Revised: 01 March 2009
Received: 01 December 2008
Published in TALG Volume 6, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Adversary arguments
  2. RAM
  3. lower bounds
  4. median finding
  5. randomized algorithms
  6. streaming algorithms
  7. time--space trade-offs

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)2
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Sorting and Ranking of Self-Delimiting Numbers with Applications to Tree IsomorphismCombinatorial Algorithms10.1007/978-3-031-34347-6_30(356-367)Online publication date: 7-Jun-2023
  • (2021)Memory-Adjustable Navigation Piles with Applications to Sorting and Convex HullsACM Transactions on Algorithms10.1145/345293817:2(1-19)Online publication date: 6-Jun-2021
  • (2021)Strictly In-Place Algorithms for Permuting and Inverting PermutationsAlgorithms and Data Structures10.1007/978-3-030-83508-8_24(329-342)Online publication date: 31-Jul-2021
  • (2020)Constant work-space algorithms for facility location problemsDiscrete Applied Mathematics10.1016/j.dam.2020.01.040283(456-472)Online publication date: Sep-2020
  • (2018)Quickly Finding the Smallest Numerical Subset with Its Sum above a ThresholdWireless Personal Communications: An International Journal10.5555/3288994.3289041103:1(427-436)Online publication date: 1-Nov-2018
  • (2018)Lower bounds on non-adaptive data structures maintaining sets of numbers, from sunflowersProceedings of the 33rd Computational Complexity Conference10.5555/3235586.3235613(1-16)Online publication date: 22-Jun-2018
  • (2018)Selection and Sorting in the “Restore” ModelACM Transactions on Algorithms10.1145/316800514:2(1-18)Online publication date: 16-Apr-2018
  • (2018)A time–space trade-off for computing the k -visibility region of a point in a polygonTheoretical Computer Science10.1016/j.tcs.2018.06.017Online publication date: Jun-2018
  • (2018)Quickly Finding the Smallest Numerical Subset with Its Sum above a ThresholdWireless Personal Communications10.1007/s11277-018-5452-8103:1(427-436)Online publication date: 8-Feb-2018
  • (2017)Instance-Optimal Geometric AlgorithmsJournal of the ACM10.1145/304667364:1(1-38)Online publication date: 17-Mar-2017
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media