Advertisement

Merging and sorting strings in parallel

  • Torben Hagerup
  • Ola Petersson
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 629)

Abstract

We show that strings of characters, equipped with the usual lexicographical ordering, can be merged and sorted in parallel as efficiently as integers, although with some loss in speed. Specifically, our main results are:
  • Two sorted lists of strings, containing altogether n characters, can be merged with an optimal time-processor product of O(n) in O(log n) time on a CRCW PRAM, and in O((log n)2) time on an EREW PRAM.

  • Suppose that n integers of size polynomial in n can be sorted in time O(t(n)) with a time-processor product of O(nf(n)) on a CRCW PRAM, a CREW PRAM or an EREW PRAM, for nondecreasing functions t, f: ℕ → ℕ. Then a list of strings, containing altogether n characters drawn from an alphabet of size polynomial in n, can be sorted in time O(t(n) log n) with a time-processor product of O(n f(n) + n log log n) on a PRAM of the same type. In particular, such a list can be sorted in O((log n) 2/log log n) time with a time-processor product of O(n log log n) on a CRCW PRAM.

Keywords

Binary Search Input String Character Position Radix Sorting EREW Pram 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [l]
    A. V. Aho, J. E. Hopcroft, and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, Massachusetts, 1974.zbMATHGoogle Scholar
  2. [2]
    K. E. Batcher, Sorting networks and their applications, in Proc. AFIPS Spring Joint Computer Conference, Vol. 32 (1968), pp. 307–314.Google Scholar
  3. [3]
    P. C. P. Bhatt, K. Diks, T. Hagerup, V. C. Prasad, T. Radzik, and S. Saxena, Improved deterministic parallel integer sorting, Inform. and Comput. 94 (1991), pp. 29–47.zbMATHMathSciNetCrossRefGoogle Scholar
  4. [4]
    T. Hagerup and C. Rüb, Optimal merging and sorting on the EREW PRAM, Inform. Process. Lett. 33 (1989), pp. 181–185.zbMATHMathSciNetCrossRefGoogle Scholar
  5. [5]
    S. R. Kosaraju, On a multidimensional search problem, in Proc. 11th Annual ACM Symposium on Theory of Computing (1979), pp. 67–73.Google Scholar
  6. [6]
    C. P. Kruskal, Searching, merging, and sorting in parallel computation, IEEE Trans. Comput. 32 (1983), pp. 942–946.zbMATHMathSciNetGoogle Scholar
  7. [7]
    Y. Shiloach and U. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model, J. Algorithms 2 (1981), pp. 88–102.zbMATHMathSciNetCrossRefGoogle Scholar
  8. [8]
    R. Vaidyanathan, C. R. P. Hartmann, and P. K. Varshney, Optimal parallel lexicographic sorting using a fine-grained decomposition. Tech. Report SU-CIS-91-01, School of Computer and Information Science, Syracuse University, Syracuse, NY, 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Torben Hagerup
    • 1
  • Ola Petersson
    • 2
  1. 1.Max-Planck-Institut für InformatikSaarbrückenGermany
  2. 2.Department of Computer ScienceLund UniversityLundSweden

Personalised recommendations