Abstract
In this paper we systematically derive randomized algorithms (both sequential and parallel) for sorting and selection from basic principles and fundamental techniques like random sampling. We prove several sampling lemmas which will find independent applications. The new algorithms derived here are the most efficient known. From among other results, we have an efficient algorithm for sequential sorting.
The problem of sorting has attracted so much attention because of its vital importance. Sorting with as few comparisons as possible while keeping the storage size minimum is a long standing open problem. This problem is referred to as ‘the minimum storage sorting’ [10] in the literature. The previously best known minimum storage sorting algorithm is due to Frazer and McKellar [10]. The expected number of comparisons made by this algorithm is n log n + O(n log log n). The algorithm we derive in this paper makes only an expected n log n + O(n ω(n)) number of comparisons, for any function ω(n) that tends to infinity. A variant of this algorithm makes no more than n log n + O(n log log n) comparisons on any input of size n with overwhelming probability.
We also prove high probability bounds for several randomized algorithms for which only expected bounds have been proven so far.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. Aho, J.E. Hopcroft, and J.D. Ullman, The Design and Analysis of Algorithms, Addison-Wesley Publications, 1976.
M. Ajtai, J. Komlós, and E. Szemerédi, An O(n log n) Sorting Network, in Proc. ACM Symposium on Theory of Computing, 1983, pp. 1–9.
D. Angluin and L.G. Valiant, Fast Probabilistic Algorithms for Hamiltonian Circuits and Matchings, Journal of Computer Systems and Science 18, 2, 1979, pp. 155–193.
S. Carlsson, A Variant of Heapsort with Almost Optimal Number of Comparisons, Information Processing Letters 24, 1987, pp. 247–250.
S. Carlsson, Average Case Results on Heapsort, BIT 27, 1987, pp. 2–17.
H. Chernoff, A Measure of Asymptotic Efficiency for Tests of a Hypothesis Based on the Sum of Observations, Annals of Mathematical Statistics 23, 1952, pp. 493–507.
R. Cole, Parallel Merge Sort, SIAM Journal on Computing, vol. 17, no. 4, 1988, pp. 770–785.
R. Cole, An Optimally Efficient Selection Algorithm, Information Processing Letters 26, Jan. 1988, pp. 295–299.
R. Cole and U. Vishkin, Approximate and Exact Parallel Scheduling with Applications to List, Tree, and Graph Problems, in Proc. IEEE Symposium on Foundations of Computer Science, 1986, pp. 478–491.
W.D. Frazer and A.C. McKellar, Samplesort: A Sampling Approach to Minimal Storage Tree Sorting, Journal of the ACM, vol.17, no.3, 1970, pp. 496–507.
R. Floyd and R. Rivest, Expected Time Bounds for Selection, Communications of the ACM, vol. 18, no. 3, 1975, pp. 165–172.
C.A.R. Hoare, Quicksort, Computer Journal 5, 1962, pp. 10–15.
C. Kaklamanis, D. Krizanc, L. Narayanan, and Th. Tsantilas, Randomized Sorting and Selection on Mesh Connected Processor Arrays, Proc. 3rd Annual ACM Symposium on Parallel Algorithms and Architectures, 1991.
L. Kleinrock, Queueing Theory. Volume 1: Theory, John Wiley & Sons, 1975.
D. Kozen, Semantics of Probabilistic Programs, Journal of Computer and Systems Science, vol. 22, 1981, pp. 328–350.
D.E. Knuth, The Art of Computer Programming, vol. 3, Sorting and Searching, Addison-Wesley Publications, 1973.
T. Leighton, Tight Bounds on the Complexity of Parallel Sorting, in Proc. ACM Symposium on Theory of Computing, 1984, pp. 71–80.
F.P. Preparata, New Parallel Sorting Schemes, IEEE Transactions on Computers, vol. C27, no. 7, 1978, pp. 669–673.
M.O. Rabin, Probabilistic Algorithms, in Algorithms and Complexity, New Directions and Recent Results, edited by J. Traub, Academic Press, 1976, pp. 21–36.
S. Rajasekaran, k-k Routing, k-k Sorting, and Cut Through Routing on the Mesh, Technical Report MS-CIS-91-93, Department of CIS, University of Pennsylvania, October 1991. Also presented in the 4th Annual ACM Symposium on Parallel Algorithms and Architectures, 1992.
S. Rajasekaran, Mesh Connected Computers with Fixed and Reconfigurable Buses: Packet Routing, Sorting, and Selection, Technical Report MS-CIS-92-56, Department of CIS, University of Pennsylvania, July 1992.
S. Rajasekaran, Randomized Parallel Selection, Proc. Tenth Conference on Foundations of Software Technology and Theoretical Computer Science, Bangalore, India, 1990. Springer-Verlag Lecture Notes in Computer Science 472, pp. 215–224.
S. Rajasekaran and J.H. Reif, Optimal and Sub Logarithmic Time Randomized Parallel Sorting Algorithms, SIAM Journal on Computing, vol. 18, no. 4, 1989, pp. 594–607.
S. Rajasekaran and D.S.L. Wei, Selection, Routing, and Sorting on the Star Graph, to appear in Proc. 7th International Parallel Processing Symposium, 1993.
J.H. Reif and L.G. Valiant, A Logarithmic Time Sort for Linear Size Networks, in Proc. 15th Annual ACM Symposium on Theory of Computing, Boston, MASS., 1983, pp. 10–16.
J.H. Reif, An n1+ε Processor O(log log n) Time Probabilistic Sorting Algorithm, in Proc. SIAM Symposium on the Applications of Discrete Mathematics, Cambridge, MASS., 1983, pp. 27–29.
R. Reischuk, Probabilistic Parallel Algorithms for Sorting and Selection, SIAM Journal on computing, vol. 14, 1985, pp. 396–409.
S. Sen, Finding an Approximate Median with High Probability in Constant Parallel Time, Information Processing Letters 34, 1990, pp. 77–80.
Y. Shiloach, and U. Vishkin, Finding the Maximum, Merging, and Sorting in a Parallel Computation Model, Journal of Algorithms 2, 1981, pp. 81–102.
R. Solovay and V. Strassen, A Fast Monte-Carlo Test for Primality, SIAM Journal on Computing, vol. 6, 1977, pp. 84–85.
L.G. Valiant, Parallelism in Comparison Problems, SIAM Journal on Computing, vol. 4, 1975, pp. 348–355.
I. Wegener, Bottom-up-Heapsort, a New Variant of Heapsort Beating of Average Quicksort (if n is not very small), in Proc. Mathematical Foundations of Computer Science, Springer-Verlag Lecture Notes in Computer Science 452, 1990, pp. 516–522.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1993 Kluwer Academic Publishers
About this chapter
Cite this chapter
Rajasekaran, S., Reif, J.H. (1993). Derivation of Randomized Sorting and Selection Algorithms. In: Paige, R., Reif, J., Watcher, R. (eds) Parallel Algorithm Derivation and Program Transformation. The Springer International Series In Engineering and Computer Science, vol 231. Springer, Boston, MA. https://doi.org/10.1007/978-0-585-27330-3_6
Download citation
DOI: https://doi.org/10.1007/978-0-585-27330-3_6
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-7923-9362-7
Online ISBN: 978-0-585-27330-3
eBook Packages: Springer Book Archive