Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Free access

The input/output complexity of sorting and related problems

Published: 01 September 1988 Publication History

Abstract

We provide tight upper and lower bounds, up to a constant factor, for the number of inputs and outputs (I/OS) between internal memory and secondary storage required for five sorting-related problems: sorting, the fast Fourier transform (FFT), permutation networks, permuting, and matrix transposition. The bounds hold both in the worst case and in the average case, and in several situations the constant factors match. Secondary storage is modeled as a magnetic disk capable of transferring P blocks each containing B records in a single time unit; the records in each block must be input from or output to B contiguous locations on the disk. We give two optimal algorithms for the problems, which are variants of merge sorting and distribution sorting. In particular we show for P = 1 that the standard merge sorting algorithm is an optimal external sorting method, up to a constant factor in the number of I/Os. Our sorting algorithms use the same number of I/Os as does the permutation phase of key sorting, except when the internal memory size is extremely small, thus affirming the popular adage that key sorting is not faster. We also give a simpler and more direct derivation of Hong and Kung's lower bound for the FFT for the special case B = P = O(1).

References

[1]
Beigel, R., and Gill, J. Personal Communication. 1986.
[2]
Blum, M., Floyd, R.W., Pratt, V., Rivest, R.L., and Tarjan, R.E. Time bounds for selection. }. Comput. Syst. Sci. 7 (1973), 448-461.
[3]
Floyd, R.W. Permuting information in idealized two-l, evel storage. In Complexity of Computer Calculations, R. Miller and J. Thatcher, Eds. Plenum, New York, 1972, pp. 105-109.
[4]
Hong, J.W., and Kung, H.T. I/O complexity: The red-blue pebble game. In Proceedings of the 13th Annual ACM Symposium on Theory of Computing (Milwaukee, Wisconsin, Oct.}. pp. 326-333. 1981.
[5]
Knuth, D.E. The Art of Computer Programming, Volume III: Sorting and Searching. Addison-Wesley, Reading, Mass., 1973.
[6]
Kwan, S.C., and Baer, J.L. The I/O performance of multiway mergesort and tag sort. IEEE Trans. Comput. C-34, 4 (Apr. 1985), 383-387.
[7]
Leighton, F.T. Tight bounds on the complexity of parallel sorting. IEEE Trans. Comput. C-34, 4 (Apr. 1985).
[8]
Lindstrom, E.E., and Vitter, J.S. The design and analysis of Bucket- Sort for bubble memory secondary storage. IEEE Trans. Comput. C-34, 3 (Mar. 1985), 218-233.
[9]
Savage, J.E., and Vitter, }.S. Parallelism in space-time tradeoffs, in Advances in Computing Research, Volume 4: Special Issue on Parallel and Distributed Computing. JAI Press, Greenwich, Conn., 1987, pp. 117-146.
[10]
Wu, C.L., and Feng, T.Y. The universality of the shuffle-exchange network. IEEE Trans. Comput. C-30, 5 (May 1981), 324-332.

Cited By

View all
  • (2024)BP-tree: Overcoming the Point-Range Operation Tradeoff for In-Memory B-trees (Abstract)Proceedings of the 2024 ACM Workshop on Highlights of Parallel Computing10.1145/3670684.3673412(29-30)Online publication date: 17-Jun-2024
  • (2024)Parallel Acyclic Joins: Optimal Algorithms and Cyclicity SeparationJournal of the ACM10.1145/363351271:1(1-44)Online publication date: 11-Feb-2024
  • (2024)CPMA: An Efficient Batch-Parallel Compressed Set Without PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638492(348-363)Online publication date: 2-Mar-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Communications of the ACM
Communications of the ACM  Volume 31, Issue 9
Sept. 1988
109 pages
ISSN:0001-0782
EISSN:1557-7317
DOI:10.1145/48529
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: 01 September 1988
Published in CACM Volume 31, Issue 9

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)855
  • Downloads (Last 6 weeks)79
Reflects downloads up to 10 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)BP-tree: Overcoming the Point-Range Operation Tradeoff for In-Memory B-trees (Abstract)Proceedings of the 2024 ACM Workshop on Highlights of Parallel Computing10.1145/3670684.3673412(29-30)Online publication date: 17-Jun-2024
  • (2024)Parallel Acyclic Joins: Optimal Algorithms and Cyclicity SeparationJournal of the ACM10.1145/363351271:1(1-44)Online publication date: 11-Feb-2024
  • (2024)CPMA: An Efficient Batch-Parallel Compressed Set Without PointersProceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming10.1145/3627535.3638492(348-363)Online publication date: 2-Mar-2024
  • (2024)Tightening I/O Lower Bounds through the Hourglass Dependency PatternProceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659986(183-193)Online publication date: 17-Jun-2024
  • (2024)The All Nearest Smaller Values Problem Revisited in Practice, Parallel and External MemoryProceedings of the 36th ACM Symposium on Parallelism in Algorithms and Architectures10.1145/3626183.3659979(259-268)Online publication date: 17-Jun-2024
  • (2024)Mind the Gap: Attainable Data Movement and Operational Intensity Bounds for Tensor Algorithms2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA)10.1109/ISCA59077.2024.00021(150-166)Online publication date: 29-Jun-2024
  • (2024)I/O Efficient Max-Truss Computation in Large Static and Dynamic Graphs2024 IEEE 40th International Conference on Data Engineering (ICDE)10.1109/ICDE60146.2024.00249(3217-3229)Online publication date: 13-May-2024
  • (2024)Approximate sorting and its applications in I/O modelTheoretical Computer Science10.1016/j.tcs.2023.114348987:COnline publication date: 1-Mar-2024
  • (2024)Turing machines with two-level memory: New computational models for analyzing the input/output complexityTheoretical Computer Science10.1016/j.tcs.2023.114347985(114347)Online publication date: Feb-2024
  • (2024)Random Access on Narrow Decision Diagrams in External MemoryModel Checking Software10.1007/978-3-031-66149-5_7(137-145)Online publication date: 10-Apr-2024
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media