Optimization Perspectives on Shellsort

01/01/2023
by   Oscar Skean, et al.
0

Shellsort is a sorting method that is attractive due to its simplicity, yet it takes effort to analyze its efficiency. The heart of the algorithm is the gap sequence chosen a priori and used during sorting. The selection of this gap sequence affects the efficiency of Shellsort, and thus drives both its theoretical and experimental analysis. We contribute to Shellsort by identifying efficient gap sequences based on new parameterized functions. Specifically, a parameter grid-search identifies optimal parameters for different input sizes for sorting by observing minimal overhead in three categories: number of comparisons, number of exchanges, and running time. We report that our method finds sequences that outperform state-of-the-art gap sequences concerning the number of comparisons for chosen small array sizes. Additionally, our function-based sequences outperform the running time of the Tokuda sequence for chosen large array sizes. However, no substantial improvements were observed when minimizing the number of exchanges.

READ FULL TEXT

Please sign up or login with your details

Forgot password? Click here to reset