CMSC-441 Algorithms (Sherman, Fall 2001): Schedule
Lectures: CMSC-441 Algorithms
Spring 2001
Alan T. Sherman
30 lectures + final exam (Mon/Wed 3:30-4:45pm in SS 409, Jan 29-May
16). (*) denotes primary example of lecture. Most effective ways to
learn through lectures are (1) ask thoughtful questions based on home
problem-solving, and (2) thoroughly master primary example to extent
that student can reproduce (and preferably also adapt, modify, and
extend) complete example in technical detail without referring to any
notes. Each class begins with student questions and, if requested,
discussion of current homework and readings. Readings from text
follow lecture topics.
-
1. Introduction. Course goals: design, analysis, fund algs, math
tools, problem-solving, effective communication. Motivating examples
(RSA, Pingala, lower bounds, Steiner tree, approximation, NPC, models
of computation: uniform RAM vs. log-cost RAM, avg vs. worst case,
problem complexity). Types of complexity: abstract, unrestricted,
algebraic, descriptive. Tale of two programs: n^2 vs. n running times
for solutions to maximum subvector sum problem empirically measured on
Cray 1 running finely optimized Fortran and TRS80 running interpreted
Basic (*).
-
2. Asymptotic notations and how to analyze a looping algorithm.
Analysis of insertion sort (*). Comparison of various orders or
growth including n^(1/2) vs. log n. Defs of six asymptotic notations
based on limit of ratios.
-
3. Master Theorem. How to analyze a recursive algorithm. Analysis of
mergesort (*). Idea of "two-finger" algorithms and their analysis.
Mention Strassen's algorithm (example of divide and conquer) and
complexity of matrix multiplication (example of open problem) and note
how recurrence can focus attention on where algorithm might be
improved.
-
4. Other techniques for solving recurrences: iteration,
transformation, guess and check, characteristic equations. Algorithm
design, including scanning, divide-and-conquer, and precomputation:
Various solutions to maximum subvector sum problem (*). See CACM
column by Bently on algorithm design. [HW1 due]
-
5. Heapsort as example of interaction of algorithms and data
structures. Data abstraction vs. data structure. Analysis of
heapsort, including building heap in linear time (*).
-
6. Quicksort. Analysis of average case running time by guess and
check using "constructive induction" (*). Optimizations of quicksort
(see CACM paper by Sedgewick): median of three, explicit stack
management, order of subproblems by size, small subproblem cutoff.
Randomized algorithms and their benefits. [HW 2 due]
-
7. Medians and order statistics. Analysis of problem complexity for
max and 2nd largest. Analysis of linear-time selection (*). As part
of this analysis, carefully solve recurrence T(n) = T(ceil(an)) +
T(floor(bn)) + n, with 0 <= a + b < 1, to illustrate guess and check
and "goal-directed" algebra (*).
-
8. Lower bounds on sorting and "linear-time" sorting algs. n lg n
lower bound on sorting in decision-tree model of computation (*).
Analysis of radix sort, bucket sort, and selection sort (in both
uniform-cost and log-cost models of computation), including avg-case
analysis of bucket sort assuming uniform distribution of input (*).
Theoretical and practical value of proving tight bounds on problem
complexity. [HW 3 due]
-
9. Hashing. Dictionary operations, hashing techniques, collisions,
open- and closed hashing, examples of hashing functions, universal
hashing. Analysis of average-case time for successful and
unsuccessful searches with open and closed hashing (*).
-
10. Red-Black trees. Defs, operation, and analysis (*). Begin
dynamic programming. Discuss idea of designing algs by
"reverse-engineering" from running times [HW 4 due]
-
11. Dynamic programming. Carry out four-step design process to solve
matrix chain mult problem, including iterative and recursive
variations (*). Analyze resulting algorithm using "count-by-data"
method (*).
-
12. Exam I on algorithm design and analysis (*). Questions to focus
on analyzing new looping and recursive algorithms, designing new
scanning and divide-and-conquer algs, properties and applications of
fundamental algs, and math tools (asymptotic notations and solving
recurrences).
-
13. More dynamic programming examples. Mention greedy algorithms.
[progress report due on project]
-
14. More dynamic programming examples. Begin graphs. [HW 5 due]
spring break
-
15. Breadth-first and depth-first search on graphs.
-
16. Topological sort and connected components. [HW 6 due]
-
17. Disjoint sets and the union-find algorithm. Balancing and
path-compression heuristics.
-
18. Minimum spanning trees. Analysis of algorithms of Prim and
Kruskal (*). [HW 7 due]
-
19. Single-source shortest paths. Dijkstra's algorihtm (*).
-
20. All-pairs shortest paths. Floyd-Warshall algorihtm, Bellman-Ford
algorithm (*). [HW 8 due]
-
21. open: more examples of graphs algorithms and graph problems
-
22. Exam II on algorithm design and analysis (*). Questions to focus
on analyzing graph algorithms and designing algorithms by dynamic
programming.
-
23. Parallel algorithms.
-
24. Primality and factoring. [HW 9 due-short HW due to project]
-
25. NP-completeness.
-
26. NP-completeness. [HW 10 due-short HW due to project]
-
27. Approximation algorithms. Local vs. global optimization.
-
28. open. [project due]
-
29. Project presentations.
-
30. Project presentations.
-
31. Comprehensive final exam