Lecture 10: Analysis of Quicksort


This lecture provides an analysis of quicksort and utilizes generating functions to analyze the expected number of comparisons. A recurrence relation for the expected number of comparisons is derived under the assumption that the input elements are distinct and that each of the possible orderings are equally likely to occur. First the recurrence relation is solved using rsolve and then a functional equation is derived for the generating function. The functional equation is a differential equation and this equation is solved using dsolve.

Background Material

Reading

Review the material on generating functions in Also study Maple's dsolve command.

Topics

Maple worksheets and programs and other resources

Assignments

Created: Nov. 4, 2006 by jjohnson@cs.drexel.edu