Shellsort with O(n n) Average-Case Complexity
Cheng Du, Zongqi Wan
Abstract
We show that Shellsort admits a fixed sequence of O( n) gaps that sorts a uniform random permutation in O(n n) 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.
Create a lesson
Related papers
Space-Efficient Text Indexing for Advanced Counting Queries
Solon P. Pissis, Sharma V. Thankachan
Tight Logarithmic Separations between LZ77 and LZRR
Yuto Fujie
Balanced Divide and Conquer for Rooted Maximum Agreement Forests
Feng Shi, Yexin Peng, Xin Zeng et al.
Distribution-Robust Halfspace Testing
Xi Chen, Renato Ferreira Pinto, Nathaniel Harms et al.
Testable Testing: Distribution-Robust Property Testing
Xi Chen, Renato Ferreira Pinto, Nathaniel Harms et al.
Revisiting Generalized Median Estimators: Exact Bitwise Computation and Gray Code Acceleration
Robin Nunkesser