HAL will be down for maintenance from Friday, June 10 at 4pm through Monday, June 13 at 9am. More information
Skip to Main content Skip to Navigation

Towards a realistic analysis of sorting and searching algorithms

Thu Hien Nguyen Thi 1
1 Equipe AMACC - Laboratoire GREYC - UMR6072
GREYC - Groupe de Recherche en Informatique, Image et Instrumentation de Caen
Abstract : We revisit classical textbook sorting or selecting algorithms under a complexity model that fully takes into account the elementary comparisons between symbols composing the records to be processed. Our probabilistic models belong to a broad category of information sources that encompasses memoryless (i.e., independent-symbols) and Markov sources, as well as many unbounded-correlation sources. Under this perspective, commonly accepted assertions, such as ``the complexity of Quicksort is O(n log n)'', are to be challenged, and the relative merits of sorting and searching methods relying on different principles (e.g., radix-based versus comparison-based) can be precisely assessed. For instance we establish that, under our conditions, the average-case complexity of QuickSort is O(n log2 n) (rather than O(n log n), classically),whereas that of QuickSelect remains O(n). In fact we propose a framework which allows to revisiting three sorting algorithms (QuickSort, Insertion Sort, Bubble Sort) and two selection algorithms (QuickSelect and Minimum Selection). For each algorithm a precise asymptotic estimate for the dominant term of the mean number of symbol comparisons is given where the constants involve various notions of coincidence depending on the algorithm. Explicit expressions for the implied constants are provided by methods from analytic combinatorics. As an aside, in our setting, we are able to derive a lower bound for the average number of symbol comparisons for algorithms solving the sorting problem and using usual comparisons between strings.
Complete list of metadata

Cited literature [73 references]  Display  Hide  Download

Contributor : Référent Amacc Référent de l'équipe Amacc - Laboratoire Greyc - Umr6072 Connect in order to contact the contributor
Submitted on : Sunday, March 22, 2015 - 4:43:02 PM
Last modification on : Tuesday, October 19, 2021 - 11:34:56 PM
Long-term archiving on: : Monday, April 17, 2017 - 9:28:34 PM


  • HAL Id : tel-01134104, version 1


Thu Hien Nguyen Thi. Towards a realistic analysis of sorting and searching algorithms. Computer Science [cs]. Université de Caen Basse-Normandie, 2014. English. ⟨tel-01134104⟩



Record views


Files downloads