WorksComputer Science
Shellsort with Average-Case Complexity
Abstract
We show that Shellsort admits a fixed sequence of gaps that sorts a uniform random permutation in expected comparisons. In fact, we give a distribution on decreasing gap sequences with this expected bound for every fixed input. We also give a randomized polynomial-time algorithm that, with high probability, constructs a sequence attaining the average-case bound.