615.06 - Shell Shell Sort Biostatistics 615/815 Lecture 6...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Shell Sort Biostatistics 615/815 ecture 6 Lecture 6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ousekeeping Note: Housekeeping Note: Homework Grading z Weihua Guan is the GSI z He requests that you e-mail him source ode for your assignments to: code for your assignments to: guan@umich.edu wguan@umich.edu hanks! z Thanks!
Background image of page 2
Last Lecture … z Properties of Sorting Algorithms Adaptive Stable z Elementary Sorting Algorithms Selection Sort Insertion Sort Bubble Sort
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Stable” and “Unstable” Sorts “Stable” and “Unstable” Sorts City State Season Las Vegas NV All Year Stable Sort by tate Unstable Sort by tate Denver CO All Year Traverse City MI Summer olland I ummer State State Holland MI Summer Boulder CO Winter City State Season Denver CO All Year City State Season Boulder CO Winter Boulder CO Winter Traverse City MI Summer Holland MI Summer Denver CO All Year Holland MI Summer Traverse City MI Summer Las Vegas NV All Year Las Vegas NV All Year
Background image of page 4
Selection Insertion Bubble
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Recap z Selection, Insertion, Bubble Sorts z Can you think of: ne property that all of these share? One property that all of these share? One useful advantage for Selection sort? ne useful advantage for Insertion sort? One useful advantage for Insertion sort? ituations where these sorts can be used? z Situations where these sorts can be used?
Background image of page 6
Today … z Shellsort An algorithm that beats the O(N 2 ) barrier Suitable performance for general use ery popular z Very popular It is the basis of the default R sort() function z Tunable algorithm an use different orderings for comparisons Can use different orderings for comparisons
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Shellsort z Donald L. Shell (1959) A High-Speed Sorting Procedure Communications of the Association for Computing Machinery 2 :30-32 Systems Analyst working at GE Back then, most computers read punch-cards z Also called: Diminishing increment sort “Comb” sort “Gap” sort
Background image of page 8
Intuition z Insertion sort is effective: For small datasets For data that is nearly sorted z Insertion sort is inefficient when: Elements must move far in array
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 33

615.06 - Shell Shell Sort Biostatistics 615/815 Lecture 6...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online