A general framework for the realistic analysis of sorting and searching algorithms. Application to some popular algorithms - Archive ouverte HAL
Communication Dans Un Congrès Année : 2013

A general framework for the realistic analysis of sorting and searching algorithms. Application to some popular algorithms

Résumé

We describe a general framework for realistic analysis of sorting and searchingalgorithms, and we apply it to the average-case analysis of five basic algorithms: threesorting algorithms (QuickSort, InsertionSort, BubbleSort) and two selection algorithms(QuickMin and SelectionMin). Usually, the analysis deals with the mean number of keycomparisons, but, here, we view keys as words produced by the same source, which arecompared via their symbols in the lexicographic order. The “realistic” cost of the algorithmis now the total number of symbol comparisons performed by the algorithm, and, in thiscontext, the average–case analysis aims to provide estimates for the mean number ofsymbol comparisons used by the algorithm. For sorting algorithms, and with respectto key comparisons, the average-case complexity of QuickSort is asymptotic to 2n log n,InsertionSort to n2/4 and BubbleSort to n2/2. With respect to symbol comparisons,we prove that their average-case complexity becomes (n log2 n),(n2),(n2 log n). Forselection algorithms, and with respect to key comparisons, the average-case complexityof QuickMin is asymptotic to 2n, of SelectionMin is n − 1. With respect to symbolcomparisons, we prove that their average-case complexity remains (n). In these fivecases, we describe the dominant constants which exhibit the probabilistic behaviour of thesource (namely, entropy, and various notions of coincidence) with respect to the algorithm.
Fichier principal
Vignette du fichier
ACTI-CLEMENT-2013-2.pdf (932.22 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-01086576 , version 1 (24-11-2014)

Identifiants

  • HAL Id : hal-01086576 , version 1

Citer

Julien Clément, Thu Hien Nguyen Thi, Brigitte Vallée. A general framework for the realistic analysis of sorting and searching algorithms. Application to some popular algorithms. 30th International Symposium on Theoretical Aspects of Computer Science (STACS 2013), Feb 2013, Kiel, Germany. ⟨hal-01086576⟩
232 Consultations
166 Téléchargements

Partager

More