Lecture 8
Learning objectives
After this class, you should be able to:
- Given an input to a sorting algorithm, give the permutation corresponding to it.
- Given a sorting algorithm and
n
, give the decision tree for sorting all permutations of1, ..., n
.- Derive a lower bound on comparison based sorting, and other variants of this problem.
- Given a data structure, some operation on it, and a time complexity, show that no algorithm exists to perform that operation with the specified time complexity.
Reading assignment
- Lectures 6-9 slides.
- CLR: Section 8.1.
Exercises and review questions
- Questions on current lecture's material
- Exercise 8.1-2.
- Exercise 8.1-3.
- Prove that there is no algorithm (based on comparisons) which, when given an array of data, will create a binary search tree containing that data in linear time (analogous to the
BuildMaxHeap
function for heaps).- Questions on next lecture's material
- None.