Space-efficient parallel merging
The problem of designing space-efficient parallel merging algorithms is examined. It is shown that two sorted sequences of lengths m and n, m≤n, can be merged in O(n/p+log n) time on an EREW PRAM with p processors, using only a constant amount of extra storage per processor. After a slight modification, the algorithm runs on a DCM (Direct Connection Machine) within the same resource requirements. This construction avoids the α(log n) slowdown when EREW PRAMs are simulated by DCMs. Moreover, using similar techniques, it is shown that merging can be accomplished in O(n/p+log log m) time on a CREW PRAM with p processors, and O(1) extra space per processor. Our algorithms use a sequential algorithm for in-place merging as a subroutine, and if this is stable, also the parallel algorithms are stable.
Key wordsPRAM Direct Connection Machine merging space efficiency
Unable to display preview. Download preview PDF.
- S.G. Akl. The Design and Analysis of Parallel Algorithms. Prentice-Hall, Englewood Cliffs, N.J., 1989.Google Scholar
- K.E. Batcher. Sorting networks and their applications. In Proc. of AFIPS Spring Joint Computer Conf., pages 307–314, 1968.Google Scholar
- B.-C. Huang and M.A. Langston. Fast stable merging and sorting in constant extra space. In Proc. Internat. Conf. on Computing and Information, pages 71–80, 1989.Google Scholar
- R.M. Karp and V. Ramachandran. A survey of parallel algorithms for shared memory machines. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science. North-Holland, Amsterdam, The Netherlands, 1990.Google Scholar
- M.A. Kronrod. An optimal ordering algorithm without a field of operation. Dokladi Akademia Nauk SSSR, 186:1256–1258, 1969.Google Scholar
- F.P Preparata. New parallel-sorting schemes. IEEE Trans. Comput., C-27:669–673, 1978.Google Scholar
- M.J. Quinn. Designing Efficient Algorithms for Parallel Computers. North-Holland, New York, 1987.Google Scholar
- H.S. Stone. Parallel processing with the perfect shuffle. IEEE Trans. Comput., C-20:153–161, 1971.Google Scholar
- L.G. Valiant. General purpose parallel architectures. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science. North-Holland, Amsterdam, The Netherlands, 1990.Google Scholar