Sorting Using Complete Subintervals and the Maximum Number of Runs in a Randomly Evolving Sequence
- 36 Downloads
We study the space requirements of a sorting algorithm where only items that at the end will be adjacent are kept together. This is equivalent to the following combinatorial problem: Consider a string of fixed length n that starts as a string of 0’s, and then evolves by changing each 0 to 1, with the n changes done in random order. What is the maximal number of runs of 1’s? We give asymptotic results for the distribution and mean. It turns out that, as in many problems involving a maximum, the maximum is asymptotically normal, with fluctuations of order n 1/2, and to the first order well approximated by the number of runs at the instance when the expectation is maximized, in this case when half the elements have changed to 1; there is also a second order term of order n 1/3. We also treat some variations, including priority queues and sock-sorting. The proofs use methods originally developed for random graphs.
Keywordssorting algorithm runs priority queues sock-sorting evolution of random strings Brownian motion
AMS Subject Classification60C05 68W40
Unable to display preview. Download preview PDF.
- 18.W.V. Li and G. Pritchard, A central limit theorem for the sock-sorting problem, In: High Dimensional Probability, Progr. Probab., Vol. 43, Birkhäuser, Basel, (1998) pp. 245–248.Google Scholar
- 23.D. Steinsaltz, Random time changes for sock-sorting and other stochastic process limit theorems, Electron. J. Probab. 4 (1999) paper 14.Google Scholar