Topics for CS4102, Exam 1, Spring 2010
- Terms and concepts: feasible, tractable, intractable,
brute-force, what's an algorithm?
- Total execution time and counting basic operations
- Worst-case, average-case, best-case
- Counting operations, using summations
- Asymptotic growth rate; order classes; BigTheta and all the
others
- Definitions and their conceptual meaning
- Limit definitions for BigTheta and the others
- Proof that a function belongs to an order class: use limit
definitions, proof by induction
- Lower bounds, optimal algorithms
- Searching: sequential, modified sequential, binary search
- Decision trees for searching
- Lower bound argument for searching, and why binary search is
optimal
- Definition of divide and conquer design strategy (D&C)
- Writing simple recursive divide and conquer algorithms
- Writing recurrence relations for D&C algorithms
- Reducing recurrences to closed form using the substitution method
- Using the Main and Master theorems (I'll give you the 3 cases for
each one)
- Examples: mergesort; finding max and min; binary search;
quicksort; Towers of Hanoi
- Trominos: example of D&C; the analysis doesn't require a
recurrence
- Nothing on closest-pair of points problem
- Strassens' matrix mult., just know the general ideas that make
this algorithms interesting. (No details on implementation.)
- Insertion sort: worst-case complexity; what's its advantages
- What is the Lower Bound argument about sorts that just swap
adjacent keys?
- Quicksort:
- What's the overall D&C strategy?
- Partition: only do the one in the book (the first one in the
slides). (This is not Hoare's partition; it's called Lomuto's
partition). W(n) = n-1 for this Partition
- For Quicksort, what's the recurrence of the worst-case? the
best-case?
- What leads to the worst-case? How can we prevent this?
(randomized choice of pivot element at start of partition code)
- Average case for QS: know the rationale behind the
initial recurrence. But no need to solve this. Know the bottom
line.
- Space complexities of sorts: insertion sort, quicksort,
mergesort. (General questions on these.)
- This
will not be covered on Exam 1. (This is slides 31 onwards in that
set.) Decision tree and
lower-bound arguments for optimal sorting.