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


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


Maple worksheets and programs and other resources


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