Fast integer merging on the EREW PRAM

Conference paper

DOI: 10.1007/3-540-55719-9_84

Part of the Lecture Notes in Computer Science book series (LNCS, volume 623)
Cite this paper as:
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

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag 1992

Authors and Affiliations

  1. 1.Max-Planck-Institut für InformatikSaarbrückenGermany
  2. 2.Fachbereich Mathematik-Informatik and Heina-Nixdorf-InstitutUniversität-GH PaderbornPaderbornGermany
  3. 3.Institute of Computer ScienceUniversity of WroclawWrocławPoland

Personalised recommendations