References | |
Exercises | |
Reading | |
Merge Sort, Analysis of Merge Sort. Guess and verify. Examples. Substitute and expand/simplify. Sorting problem review. Upper bounds and lower Bounds. Argument that any comparison sort must take at least Omega(n log n) comparisons.
References | |
Exercises | |
Reading | |
Analysis of Quicksort. Worst case and best case recurrences. Limitations of worst cases analysis. Average case analysis of algorithms. Intuition for average case analysis for Quicksort. Average case analysis for Insertion Sort. Connection between comparisons and inversions. Average number of inversions in a permutation on n elements.
References | |
Exercises | |
Reading | |
Exact computation of average number of inversions in a permutation of n-elements. Average case analysis of insertion sort.
Sorting Roundup. Stability in sorting algorithms. Stable implementations of Merge Sort. Stability analysis of standard implementations of Selection Sort, Insertion Sort, Merge Sort, Quick Sort.