Abstract
We present a cost optimal parallel algorithm for sorting presorted files. The measure of presortedness we consider is the number of inversions in the input file. The algorithm sorts a file of length n, with O(mn) inversions, in O(log n(log* n − log* m)) time, provided \(O(\frac{{n\log m}}{{\log n \cdot (\log ^* n - \log ^* m)}})\) processors are available, in the EREW PRAM model. This is the first PRAM sorting algorithm which is cost optimal, with respect to the number of inversions. Our method uses a new approach, which can also be used to derive a simple sequential sorting algorithm, which is efficient with respect to the number of inversions.
Preview
Unable to display preview. Download preview PDF.
References
M. Ajtai, J. Komlos, E. Szemeredi, “An O(n log n) sorting network”, Combinatorica 3, 1983, 1–19.
G.Bilardi, A.Nicolau, “Adaptive Bitonic Sorting: An optimal parallel algorithm for shared memory models”, to appear in SIAM Journal on Computing.
R.Cole, “Parallel Merge Sort”, 27th FOCS, 1986, 511–516.
C.R. Cook, D.J. Kim, “Best sorting algorithms for nearly sorted lists”, Comm. of the ACM 23-11, 1980, 620–624.
E.W. Dijkstra, “Smoothsort, an alternative to sorting in situ”, Science of Computer Programming 1, 1982, 223–233.
V.Estivill-Castro, D.Wood, “A new measure of presortedness”, Research Report CS-87-58, 1987, Waterloo.
H.Mannila, “Measures of presortedness and optimal sorting algorithms”, ICALP 1984, 324–336.
K.Mehlhorn, “Sorting presorted files”, 4th GI Conference on Theoretical Computer Science, Springer Verlag, 1979, 199–212.
K.Mehlhorn, “Data Structures and Algorithms 1: Sorting and Searching”, Springer Verlag, 1984, 217–228.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Levcopoulos, C., Petersson, O. (1988). An optimal parallel algorithm for sorting presorted files. In: Nori, K.V., Kumar, S. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1988. Lecture Notes in Computer Science, vol 338. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-50517-2_78
Download citation
DOI: https://doi.org/10.1007/3-540-50517-2_78
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-50517-4
Online ISBN: 978-3-540-46030-5
eBook Packages: Springer Book Archive