https://hal.inria.fr/hal-00958926Knessl, CharlesCharlesKnesslUIC - Department of Mathematics, Statistics and Computer Science [Chicago] - UIC - University of Illinois [Chicago] - University of Illinois SystemSzpankowski, WojciechWojciechSzpankowskiDepartment of Computer Science [Purdue] - Purdue University [West Lafayette]Quicksort algorithm again revisitedHAL CCSD1999Binary search treeQuicksortSortingAlgorithmsAnalysis of algorithmsAsymptotic analysis[INFO.INFO-DM] Computer Science [cs]/Discrete Mathematics [cs.DM]Inria Sophia Antipolis-MÃ©diterranÃ©e / I3s, Service Ist2014-03-13 16:47:402019-08-01 14:12:402014-03-13 16:53:19enJournal articleshttps://hal.inria.fr/hal-00958926/document10.46298/dmtcs.252application/pdf1We 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 \emphbinary 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.