Searching, Merging, and Sorting in Parallel Computation

  • Authors:
  • C. P. Kruskal

  • Affiliations:
  • Department of Computer Science, University of Illinois

  • Venue:
  • IEEE Transactions on Computers
  • Year:
  • 1983

Quantified Score

Hi-index 14.99

Visualization

Abstract

We study the number of comparison steps required for searching, merging, and sorting with P processors. We present a merging algorithm that is optimal up to a constant factor when merging two lists of equal size (independent of the number of processors); as a special case, with N processors it merges two lists, each of size N, in 1.893 lg lg N + 4 comparison steps. We use the merging algorithm to obtain a sorting algorithm that, in particular, sorts N values with N processors in 1.893 lg N lg lg N/lg lg lg N(plus lower order terms) comparison steps. The algorithms can be implemented on a shared memory machine that allows concurrent reads from the same location with constant overhead at each comparison step.