Lecture Slides on Sorting III: Quick Sort | COMP 4030, Study notes of Algorithms and Programming

Material Type: Notes; Class: Design/Analysis Algorithms; Subject: COMP Computer Science; University: University of Memphis; Term: Spring 2006;

Typology: Study notes

Pre 2010

Uploaded on 08/18/2009

koofers-user-cqu
koofers-user-cqu 🇺🇸

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
COMP 4/6030:
Introduction to Algorithms
Sorting III
February 15, 2006
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Lecture Slides on Sorting III: Quick Sort | COMP 4030 and more Study notes Algorithms and Programming in PDF only on Docsity!

COMP 4/6030: Introduction to Algorithms

Sorting III February 15, 2006

Outline {

4 sorting algorithms

z Insertion sort z Quick sort z Merge sort z Heap sort {

Lower bound

{

Aims

z Correctness z Analysis (running time) z Design (divide and conquer) z Different algorithms for a same problem, optimality

Lower bounds for comparison sorting {

How fast can we sort?

{

Lower bounds

z

(n) to examine all the input z All sorts seen so far are

(nlgn) z To prove:

(nlgn) is a lower bound {

Decision tree

z Abstraction of any comparison sort { Abstract away everything else: control and datamovement { Count only comparisons z Represents comparisons made by { A particular sorting algorithm { On input of a given size

Optimality { Which is asymptotically optimal? z Insertion sort z Quick sort z Merge sort z Heap sort