CS 332: Algorithms


Time: 2:00-3:15 PM, Tuesdays and Thursdays
Place: EE 316
Instructor: David Luebke (Olsson #219)
Office hours: Mondays 2-3 PM, Wednesdays 3:30-4:30 PM
Assistants: Emily Evans, eje2a@cs.virginia.edu
Weilin Zhong, wz5r@cs.virginia.edu
Office hours: Tuesdays 3:30-6:30 PM, Thursdays 3:30-5:30 PM (CS Library)
Assignments:
Format: Two lectures per week, with several homework assignments and two or three tests.
Prerequisites: Grades of C- or better in 216 and 302. These prerequisites will be strictly enforced.
Description: This course will provide a rigorous introduction to the design and analysis of algorithms. We will discuss classic problems (e.g., sorting, traveling salesman problem), classic algorithm design strategies (e.g., divide-and-conquer, greedy approaches), and classic algorithms and data structures (e.g., hash tables, Dijkstra's algorithm). We will also analyze algorithm complexity throughout, and touch on issues of tractibility such as "NP-Completeness".
Texts:
Required:
Introduction to Algorithms by Cormen, Leiserson, and Rivest, McGraw-Hill (1990).
Handouts: None as of yet.
Lectures: A tentative schedule of lecture topics is given below. Since this is the first time I have taught this course, I do not have a good feel for how long various topics will take. You should expect the actual lecture dates to shift. If we get ahead of schedule, we will add some "culture" topics from fields such as computational geometry and computer graphics.

Note that though the schedule below only has two tests, I may add a third to space out the material more.
Number Date Topic Text
1 8/31 Introduction, administration
2 9/5 Asymptotic notation 2.1
3 9/7 Merge sort, Recurrences, the Master Theorem 4.1, 4.3
4 9/12 Sorting: insertion sort, mergesort, heapsort 1, 7
5 9/14 Sorting: priority queues, quicksort 8.1-8.2
6 9/19 Sorting: quicksort continued 8.3-8.4
7 9/21 Sorting: linear-time sorting algorithms 9
8 9/26 Medians and selection 10
9 9/28 Structures: binary search trees 13.1-13.3
10 10/3 Structures: red-black trees 14
11 10/5 Structures: Skip Lists (sadly, lecture 11 has been lost) --
12 10/10 Structures: Hash tables
(PowerPoint Source)
12
13 10/12 Augmenting data structures: Dynamic Order Statistics
(PowerPoint Source)
15.1
14 10/17 Augmenting data structures: Interval Trees
(Powerpoint Source)
15.2
15 10/19 Review for midterm
(Powerpoint Source)
--
-- 10/24 READING DAY --
-- 10/26 MIDTERM EXAMINATION --
16 10/31 Go over midterm, graph representations [PPT] 23
17 11/2 Graph algorithms: the basics [PPT] 24.1-24.2
18 11/7 Topological sort, minimum spanning tree [PPT] 25.1-25.2
19 11/9 Minimum spanning tree, shortest paths [PPT] 26.1-26.3
20 11/14 Disjoint-set structures, Kruskal's Algorithm [PPT] 22
21 11/16 Amortized Analysis [PPT] 20, 21.1-21.3
22 11/21 Dynamic programming [PPT] 16.1-16.2
-- 11/23 THANKSGIVING BREAK
23 11/28 Greedy algorithms [PPT] 16.3-16.4
24 11/30 NP-Completeness [PPT] 36.1-36.3
25 12/5 NP-Completeness continued: reductions [PPT] 36.4-36.5
26 12/7 Review for final [PPT]
EXAM 12/13 FINAL EXAMINATION: 9 AM

Grading: The final grade will be calculated as a weighted average:
  • Assignments: 40%
  • Midterm: 20%
  • Final: 35%
  • Participation: 5%
Assignments will be graded on a 10-point scale. Participation means coming to class, asking questions, taking part in discussions, not falling asleep, and so on.

I also reserve the right to institute quizzes (announced or unannounced).

Late Assignments: Assignments are always due by midnight of the due date. Assignments one day late subtract 10%; two days late loses 30%. After 2 days the assignment will be considered a zero.
Honor Code: The honor code applies to all work turned in for this course. Regarding homework: assignments are designed to facilitate your learning of the concepts; it is important that you understand the solutions to all problems, and the best way to gain an understanding is to work them out and write them up by yourself. However, there are occasions when outside help can be beneficial. Hence the policy: you are free to talk to others about problems at your discretion (though we strongly suggest you do this only when completely stuck), but you may not leave a meeting with any type of record of or notes pertaining to the discussion. (If you can recall the solution from memory, you probably understand it.) The actual write-up must be done entirely by yourself.