Quicksort algorithm again revisited
We consider the standard Quicksort algorithm that sorts n distinct keys with all possible n! orderings of keys being equally likely. Equivalently, we analyze the total path length L(n) in a randomly built binary search tree. Obtaining the limiting distribution of L(n) is still an outstanding...
Main Authors: | , |
---|---|
Format: | Article |
Language: | English |
Published: |
Discrete Mathematics & Theoretical Computer Science
1999-12-01
|
Series: | Discrete Mathematics & Theoretical Computer Science |
Online Access: | http://www.dmtcs.org/dmtcs-ojs/index.php/dmtcs/article/view/96 |
Summary: | We consider the standard Quicksort algorithm that sorts n distinct keys with all possible n! orderings of keys being equally likely. Equivalently, we analyze the total path length L(n) in a randomly built binary search tree. Obtaining the limiting distribution of L(n) is still an outstanding open problem. In this paper, we establish an integral equation for the probability density of the number of comparisons L(n). Then, we investigate the large deviations of L(n). We shall show that the left tail of the limiting distribution is much ``thinner'' (i.e., double exponential) than the right tail (which is only exponential). Our results contain some constants that must be determined numerically. We use formal asymptotic methods of applied mathematics such as the WKB method and matched asymptotics. |
---|---|
ISSN: | 1462-7264 1365-8050 |