Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Space-efficient parallel merging

  • Conference paper
  • First Online:
PARLE '92 Parallel Architectures and Languages Europe (PARLE 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 605))

Abstract

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.

On leave from Department of Computer Science, University of Turku, Lemminkäisenkatu 14 A, SF-20520 Turku, Finland.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. S.G. Akl. The Design and Analysis of Parallel Algorithms. Prentice-Hall, Englewood Cliffs, N.J., 1989.

    Google Scholar 

  2. R.J. Anderson, E.W. Mayr, and M.K. Warmuth. Parallel approximation algorithms for bin packing. Inform. and Comput., 82:262–277, 1989.

    Article  Google Scholar 

  3. K.E. Batcher. Sorting networks and their applications. In Proc. of AFIPS Spring Joint Computer Conf., pages 307–314, 1968.

    Google Scholar 

  4. G. Bilardi and A. Nicolau. Adaptive bitonic sorting: An optimal parallel algorithm for shared memory models. SIAM J. Comput, 18:216–228, 1989.

    Article  Google Scholar 

  5. A. Borodin and J.E. Hopcroft. Routing, sorting, and merging on parallel models of computation. J. Comput. System Sci., 30:130–145, 1985.

    Article  Google Scholar 

  6. R. Cole. Parallel merge sort. SIAM J. Comput., 17:770–785, 1988.

    Article  Google Scholar 

  7. E. Dekel and I. Ozsvath. Parallel external merging. J. Parallel Distr. Comput., 6:623–635, 1989.

    Article  Google Scholar 

  8. D. Eppstein and Z. Galil. Parallel algorithmic techniques for combinatorial computation. Annual Reviews in Computer Science, 3:233–283, 1988.

    Article  Google Scholar 

  9. X. Guan and M.A. Langston. Time-space optimal parallel merging and sorting. IEEE Trans. Comput., 40:596–602, 1991.

    Article  Google Scholar 

  10. T. Hagerup and C. Rüb. Optimal merging and sorting on the EREW PRAM. Inform. Process. Lett., 33:181–185, 1989.

    Article  Google Scholar 

  11. B.-C. Huang and M.A. Langston. Practical in-place merging. Comm. ACM, 31:348–352, 1988.

    Article  Google Scholar 

  12. 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 

  13. 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 

  14. M.A. Kronrod. An optimal ordering algorithm without a field of operation. Dokladi Akademia Nauk SSSR, 186:1256–1258, 1969.

    Google Scholar 

  15. C.P. Kruskal. Searching, merging, and sorting in parallel computation. IEEE Trans. Comput., C-32:942–946, 1983.

    MathSciNet  Google Scholar 

  16. C.P. Kruskal, L. Rudolph, and M. Snir. A complexity theory of efficient parallel algorithms. Theoret. Comput. Sci., 71:95–132, 1990.

    Article  Google Scholar 

  17. H. Mannila and E. Ukkonen. A simple linear-time algorithm for in situ merging. Inform. Process. Lett., 18:203–208, 1984.

    Article  MathSciNet  Google Scholar 

  18. F.P Preparata. New parallel-sorting schemes. IEEE Trans. Comput., C-27:669–673, 1978.

    Google Scholar 

  19. M.J. Quinn. Designing Efficient Algorithms for Parallel Computers. North-Holland, New York, 1987.

    Google Scholar 

  20. J. Salowe and W. Steiger. Simplified stable merging tasks. J. Algorithms, 8:557–571, 1987.

    Article  Google Scholar 

  21. B. Schieber and U. Vishkin. Finding all nearest neighbors for convex polygons in parallel: A new lower bound technique and a matching algorithm. Discrete Applied Math., 29:97–111, 1990.

    Article  Google Scholar 

  22. J.T. Schwartz. Ultracomputers. ACM Trans. Program. Lang. Syst., 2:484–521, 1980.

    Article  Google Scholar 

  23. Y. Shiloach and U. Vishkin. Finding the maximum, merging, and sorting in a parallel computational model. J. Algorithms, 12:88–102, 1981.

    Article  Google Scholar 

  24. M. Snir. On parallel searching. SIAM J. Comput., 15:688–708, 1985.

    Article  Google Scholar 

  25. H.S. Stone. Parallel processing with the perfect shuffle. IEEE Trans. Comput., C-20:153–161, 1971.

    Google Scholar 

  26. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Daniel Etiemble Jean-Claude Syre

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Katajainen, J., Levcopoulos, C., Petersson, O. (1992). Space-efficient parallel merging. In: Etiemble, D., Syre, JC. (eds) PARLE '92 Parallel Architectures and Languages Europe. PARLE 1992. Lecture Notes in Computer Science, vol 605. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55599-4_79

Download citation

  • DOI: https://doi.org/10.1007/3-540-55599-4_79

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55599-5

  • Online ISBN: 978-3-540-47250-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics