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...

Full description

Bibliographic Details
Main Authors: Charles Knessl, Wojciech Szpankowski
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
_version_ 1811259915538268160
author Charles Knessl
Wojciech Szpankowski
author_facet Charles Knessl
Wojciech Szpankowski
author_sort Charles Knessl
collection DOAJ
description 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.
first_indexed 2024-04-12T18:38:49Z
format Article
id doaj.art-929b61642e4140c69f0e434d73ceee6f
institution Directory Open Access Journal
issn 1462-7264
1365-8050
language English
last_indexed 2024-04-12T18:38:49Z
publishDate 1999-12-01
publisher Discrete Mathematics & Theoretical Computer Science
record_format Article
series Discrete Mathematics & Theoretical Computer Science
spelling doaj.art-929b61642e4140c69f0e434d73ceee6f2022-12-22T03:20:51ZengDiscrete Mathematics & Theoretical Computer ScienceDiscrete Mathematics & Theoretical Computer Science1462-72641365-80501999-12-0132Quicksort algorithm again revisitedCharles KnesslWojciech SzpankowskiWe 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.http://www.dmtcs.org/dmtcs-ojs/index.php/dmtcs/article/view/96
spellingShingle Charles Knessl
Wojciech Szpankowski
Quicksort algorithm again revisited
Discrete Mathematics & Theoretical Computer Science
title Quicksort algorithm again revisited
title_full Quicksort algorithm again revisited
title_fullStr Quicksort algorithm again revisited
title_full_unstemmed Quicksort algorithm again revisited
title_short Quicksort algorithm again revisited
title_sort quicksort algorithm again revisited
url http://www.dmtcs.org/dmtcs-ojs/index.php/dmtcs/article/view/96
work_keys_str_mv AT charlesknessl quicksortalgorithmagainrevisited
AT wojciechszpankowski quicksortalgorithmagainrevisited