Sorting by Placement and Shift
Combinatorics
2008-09-18 v1 Discrete Mathematics
Data Structures and Algorithms
Abstract
In sorting situations where the final destination of each item is known, it is natural to repeatedly choose items and place them where they belong, allowing the intervening items to shift by one to make room. (In fact, a special case of this algorithm is commonly used to hand-sort files.) However, it is not obvious that this algorithm necessarily terminates. We show that in fact the algorithm terminates after at most steps in the worst case (confirming a conjecture of L. Larson), and that there are super-exponentially many permutations for which this exact bound can be achieved. The proof involves a curious symmetrical binary representation.
Cite
@article{arxiv.0809.2957,
title = {Sorting by Placement and Shift},
author = {Sergi Elizalde and Peter Winkler},
journal= {arXiv preprint arXiv:0809.2957},
year = {2008}
}
Comments
13 pages, 4 figures, Proceedings of SODA 2009