# Finding the maximum, merging and sorting in a parallel computation model

## Abstract

A model for synchronized parallel computation is described in which all p processors have access to a common memory. this model is used to solve the problems of finding the maximum, merging, and sorting by p processors.

- 1.
Finding the maximum of n elements (1<p≦n) within a depth of 0(n/p+log log p) (optimal for p≦n/log log n).

- 2.
Merging two sorted lists of length m and n (m≦n) within a depth of 0(n/p+log n) for p≦n (optimal for p≦n/log n), 0(log m/log p/n) for p≧n (=0(k) if p=[m

^{1/k}n], k>1. - 3.
Sorting n elements within a depth of 0(n/p log n + log n log p) for p≦n, (optimal for p≦n/log n). 0(log

^{2}n/log p/n + log n) for p ≧ n (=0(k log n) if p=[n^{1+1/k}], k>1).

The depth of 0(k log n) for p = [n^{1+1/k}] processors was also achieved by Hirschberg [Hi78] and Preparata [P78]. Our algorithm is substantially simpler.

All the elementary operations including allocation of processors to their jobs are taken into account in deriving the depth complexity and not only comparisons.

## Keywords

Parallel Algorithm Allocation Problem Maximal Element Binary Search Sorting Algorithm## Preview

Unable to display preview. Download preview PDF.

## References

- [AE80]Alton, D.A. and Eckstein, D.M.: "Parallel breadth-first search of p sparce graphs". Submitted to Proc. of Humboldt State University Conference on Graph Theory, Combinatorics and Computing. Phillis Clinn (ed.). To be published in 1980 by Utilitas Mathematica, University of Manitoba, Winnipeg.Google Scholar
- [Ba68]Batcher, K.E.: "Sorting networks and their applications". Proc. AFIPS Spring Joint Computer Conf., 32, (1968), pp. 307–314.Google Scholar
- [Ec77]Eckstein, D.M.: Parallel Processing using depth-first search and breadthfirst search. Ph.D. thesis, Dept. of Computer Science, University of Iowa, Iowa City, Iowa 52242, 1977.Google Scholar
- [EA80]Eckstein, D.M. and Alton, D.A.: "Parallel searching of non sparse graphs". To appear in SIAM J. on Computing.Google Scholar
- [Ev74]Even, S.: "Parallelism in tape — sorting". Comm. ACM 17, 4 (April 1974), pp. 202–204.zbMATHCrossRefMathSciNetGoogle Scholar
- [G75]Gavril, F.: "Merging with parallel processors". Comm. ACM 18, 10 (October 1975), pp. 588–591.zbMATHCrossRefGoogle Scholar
- [He78]Heller, D.: "A survey of parallel algorithms in numerical linear algebra". SIAM Review 20(4), (October 1978), pp. 740–777.zbMATHCrossRefMathSciNetGoogle Scholar
- [Hi78]Hirschberg, D.S.: "Fast parallel sorting algorithms". Comm. ACM 21, 8 (August 1978), pp. 657–661.zbMATHCrossRefMathSciNetGoogle Scholar
- [HCS79]Hirschberg, D.S., Chandra, A.K., and Sarwate, D.V.: "Computing connected components on parallel computers". Comm. ACM 22, 8 (August 1979) pp. 461–464.zbMATHCrossRefMathSciNetGoogle Scholar
- [Kn73]Knuth, D.E.: The Art of Computer Programming, Vol. 3. Addison Wesley, Reading, Mass., 1973.Google Scholar
- [Ku80]Kung, H.T.: The Structure of parallel algorithms. To appear in the forthcoming Advances in Computers, Vol. 19, Academic Press.Google Scholar
- [P78]Preparata, F.P.: "New Parallel — sorting schemes". IEEE Trans. on Computers, Vol. C-27, (July 1978), pp. 669–673.MathSciNetGoogle Scholar
- [RC78]Reghbati (Arjomandi), E. and Corneil, D.G.: "Parallel computations in graph theory". SIAM J. on Computing, Vol. 7,2 (May 1978), pp. 230–237.zbMATHCrossRefGoogle Scholar
- [S77]Savage, C.: "Parallel algorithms for graph theoretic problems". Ph.D. thesis, Univ. of Illinois, Urbana, Ill. 61801, 1977.Google Scholar
- [V75]Valiant, L.G.: "Parallelism in comparison problems". SIAM J. on Computing, Vol. 4,3, (Sept. 1975), pp. 348–355.zbMATHCrossRefMathSciNetGoogle Scholar
- [W75]Winograd, S.: "On the parallel evaluation of certain arithmetic expressions". Journal ACM, Vol. 22,4 (October 1975), pp. 477–492.zbMATHCrossRefMathSciNetGoogle Scholar