Skip to main content

Fast integer merging on the EREW PRAM

  • Conference paper
  • First Online:
  • 146 Accesses

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

Abstract

We investigate the complexity of merging sequences of small integers on the EREW PRAM. Our most surprising result is that two sorted sequences of n bits each can be merged in O(log log n) time. More generally, we describe an algorithm to merge two sorted sequences of n integers drawn from the set {0,..., m −1} in O(log log n-flogm) time using an optimal number of processors. No sublogarithmic merging algorithm for this model of computation was previously known. The algorithm not only produces the merged sequence, but also computes the rank of each input element in the merged sequence. On the other hand, we show a lower bound of Ω(logmin{n,m}) on the time needed to merge two sorted sequences of length n each with elements in the set {0,..., m−1}, implying that our merging algorithm is as fast as possible for m=(log n)Ω(1). If we impose an additional stability condition requiring the ranks of each input sequence to form an increasing sequence, then the time complexity of the problem becomes ⊗(log n), even for m=2. Stable merging is thus harder than nonstable merging.

Supported in part by the Deutsche Forschungsgemeinschaft, SFB 124, TP B2, VLSI Entwurfsmethoden und Parallelität, and in part by the ESPRIT II Basic Research Actions Program of the EC under contract No. 3075 (project ALCOM).

Supported by Deutsche Forschungsgemeinschaft grant ME 872/1-4.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. P. Beame, M. Kik and M. Kutyłowski, Information broadcasting by exclusive read PRAMs, submitted.

    Google Scholar 

  2. O. Berkman, J. JáJá, S. Krishnamurthy, R. Thurimella and U. Vishkin, Some triply-logarithmic parallel algorithms, in Proc. 31st Annual IEEE Symposium on Foundations of Computer Science (1990), pp. 871–881.

    Google Scholar 

  3. G. Bilardi and A. Nicolau, Adaptive bitonic sorting: An optimal parallel algorithm for shared-memory machines, SIAM J. Comprit. 18 (1989), pp. 216–228.

    Article  Google Scholar 

  4. A. Borodin and J. E. Hopcroft, Routing, merging, and sorting on parallel models of computation, J. Comput. Syst. Sci. 30 (1985), pp. 130–145.

    Article  Google Scholar 

  5. R. Cole, Parallel merge sort, SIAM J. Comput. 17 (1988), pp. 770–785.

    Article  Google Scholar 

  6. R. Cole and U. Vishkin, Deterministic coin tossing with applications to optimal parallel list ranking, Inform. and Control 70 (1986), pp. 32–53.

    Article  Google Scholar 

  7. S. Cook, C. Dwork and R. Reischuk, Upper and lower time bounds for parallel random access machines without simultaneous writes, SIAM J. Comput. 15 (1986), pp. 87–97.

    Article  Google Scholar 

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

    Article  Google Scholar 

  9. C. P. Kruskal, Searching, merging, and sorting in parallel computation. IEEE Trans. Comput. 32 (1983), pp. 942–946.

    MathSciNet  Google Scholar 

  10. S. Rajasekaran and J. H. Reif, Optimal and sublogarithmic time randomized parallel sorting algorithms, SIAM J. Comput. 18 (1989), pp. 594–607.

    Article  Google Scholar 

  11. M. Snir, On parallel searching, SIAM J. Comput. 14 (1985), pp. 688–708.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mirosław Kutyłowski .

Editor information

W. Kuich

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hagerup, T., Kutyłowski, M. (1992). Fast integer merging on the EREW PRAM. In: Kuich, W. (eds) Automata, Languages and Programming. ICALP 1992. Lecture Notes in Computer Science, vol 623. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55719-9_84

Download citation

  • DOI: https://doi.org/10.1007/3-540-55719-9_84

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55719-7

  • Online ISBN: 978-3-540-47278-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics