1 / 6

A Genetic Algorithm for Improved Shellsort Sequences

A Genetic Algorithm for Improved Shellsort Sequences. Tiffany Bennett, Elizabeth Hannon, Elizabeth Zehner, and Robert S. Roos Allegheny College, USA.

Download Presentation

A Genetic Algorithm for Improved Shellsort Sequences

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Genetic Algorithm for Improved Shellsort Sequences Tiffany Bennett, Elizabeth Hannon, Elizabeth Zehner, and Robert S. RoosAllegheny College, USA (Supported by a grant from the Computing Research Association, in cooperation with National Science Foundation's Partnership for Advanced Computational Infrastructure's Education, Outreach and Training program.) Genetic and Evolutionary Computation Conference (GECCO 2002) New York City, July 9 - 13, 2002

  2. Shellsort (Shell, 1959) Sort a0, a1, …, an-1. Assume: 1 = h0 < h1 < h2 < … < hk-1 < n for i := k-1 downto 0 do for j := 0 to hi -1 do sort*(aj,aj+hi,aj+2hi,...) *(Usually, insertion sort)

  3. Shellsort Example: n = 9, k = 2, h0 = 1, h1 = 3 Initial sequence: h1-sort: : j=0 : j=1 : j=2 Now h0-sort: Sorted sequence:

  4. Open Problem:What sequence h0, h1, … hk-1yields best average-case time? Use GA to evolve an increment sequence. CROSSOVER (1, 3, 11, 28, 67, 125, 907, 3157, 27559, 403218) × (1, 7, 39, 115, 764, 8291, 51983, 743285) = (1, 3, 11, 28, 67, 115, 764, 8291, 51983, 743285)

  5. MUTATION (1, 3, 11, 28, 67, 115, 764, 8291, 51983, 743285) (1, 3, 11, 28, 67, 115, 764, 8293, 51983, 743285) INITIAL POPULATION 50 individuals, each of the form (1, h1, h2, …, h max) (“max” is on the order of log n) h0 = 1 h1 = random between 2 and 10 For i > 1, hi = αihi-1 , where 2 < αi < 3

  6. FITNESS In advance, select a random permutation  of (0, 1, …, n-1). Then fitness(h0, h1, …) = clock time to sort , in msec. LOCAL IMPROVEMENT STEP (Noisy fitness function!) In initial population, and after each crossover and mutation, “nudge” increment sequence so there is at most one multiple of 2 and at most one multiple of 3. REASON: common multiples among hi-values cause duplicate comparisons

More Related