Fastest gap sequence for shell sort ?
Posted
by Tony
on Stack Overflow
See other posts from Stack Overflow
or by Tony
Published on 2010-03-29T16:23:16Z
Indexed on
2010/03/29
16:33 UTC
Read the original article
Hit count: 613
According to Marcin Ciura's Optimal (best known) sequence of increments for shell sort algorithm.
The best sequence for shellsort is 1, 4, 10, 23, 57, 132, 301, 701... But how can I generate such a sequence ? In Marcin Ciura's paper he said :
Both Knuth’s and Hibbard’s sequences are relatively bad, because they are defined by simple linear recurrences
but most algorithm books I searched , they all tend to use Knuth’s sequence : k = 3k + 1 ; because it's easy to generate , what's your way of generating shellsort sequence ?
© Stack Overflow or respective owner