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.
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho, J. E. Hopcroft, and J. D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, Massachusetts, 1974.
K. E. Batcher, Sorting networks and their applications, in Proc. AFIPS Spring Joint Computer Conference, Vol. 32 (1968), pp. 307–314.
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.
T. Hagerup and C. Rüb, Optimal merging and sorting on the EREW PRAM, Inform. Process. Lett. 33 (1989), pp. 181–185.
S. R. Kosaraju, On a multidimensional search problem, in Proc. 11th Annual ACM Symposium on Theory of Computing (1979), pp. 67–73.
C. P. Kruskal, Searching, merging, and sorting in parallel computation, IEEE Trans. Comput. 32 (1983), pp. 942–946.
Y. Shiloach and U. Vishkin, Finding the maximum, merging, and sorting in a parallel computation model, J. Algorithms 2 (1981), pp. 88–102.
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.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hagerup, T., Petersson, O. (1992). Merging and sorting strings in parallel. In: Havel, I.M., Koubek, V. (eds) Mathematical Foundations of Computer Science 1992. MFCS 1992. Lecture Notes in Computer Science, vol 629. Springer, Berlin, Heidelberg . https://doi.org/10.1007/3-540-55808-X_28
Download citation
DOI: https://doi.org/10.1007/3-540-55808-X_28
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55808-8
Online ISBN: 978-3-540-47291-9
eBook Packages: Springer Book Archive