Selection and sorting with limited storage

  • Authors:
  • J. I. Munro;M. S. Paterson

  • Affiliations:
  • -;-

  • Venue:
  • SFCS '78 Proceedings of the 19th Annual Symposium on Foundations of Computer Science
  • Year:
  • 1978

Quantified Score

Hi-index 0.00

Visualization

Abstract

When selecting from, or sorting, a file stored on a read-only tape and the internal storage is rather limited, several passes of the input tape may be required. We study the relation between the amount of internal storage available and the number of passes required to select the Kth highest of N inputs. We show, for example, that to find the median in two passes requires at least Ω(N1/2) and at most O(N1/2 log N) internal storage. For probabilistic methods, Θ(N1/2) internal storage is necessary and sufficient for a single pass method which finds the median with arbitrarily high probability.