Instructor: Patrick H. Madden email pmadden@acm.org
Lectures: MWF, 9:40-10:40am, in Science 2, room 243. Note that Google Calendar shows the time as 9:30-10:30, which is not correct.
Office Hours: MW from 12-1pm, Engineering Building N-14,
or by appointment.
TA: Gowrishankar Sivanathan, scgowrishankar at gmail dot com
Textbook: Introduction to Algorithms, Cormen/Leiserson/Rivest/Stein
Recommended: check out TopCoder algorithms competitions, to get an idea of the sort of folks you'll be up against in the job market.
Highly recommended: join the ACM Student chapter, and try the local programming contests.
Two in-class exams, 20% each
One final, 30%, during finals week. The final will mostly cover the last weeks of class, but a few questions from the first two exams will also be included.
Ten relatively easy programming assignments, 3% each. Programs will be done in either C or C++, and will need to run on Unix hardware.
Grade ranges are typically [90-100%] = [A- to A], [80=90%]=[B- to B+], [70-80%]=[C- to C+], and so on. Depending on the actual scores, the percentage range may change slightly. As long as attendance is good, we won't need to have pop quizzes. If I catch anyone cheating (or helping someone cheat), they will fail the course. If the course material is going over your head, be smart and drop the course early. All exams will be closed book/closed notes (and no cell phones, pagers, 2-way radios, cameras, calculators, and so on -- just pencil and paper).
Check the web calendar for updates, schedule changes.
| Monday, August 25 | Course introduction |
| Wednesday, August 27 | Chapters 1-3 |
| Friday, August 29 | Chapters 1-3 |
| Wednesday, September 3 | Simple sorting (insertion sort). Assignment 1 made. |
| Friday, September 5 | Simple search (binary search, vs. linear search) |
| Monday, September 8 | Quicksort, assignment 1 due. Assignment 2 made. |
| Wednesday, September 10 | Quicksort; randomization of pivots |
| Friday, September 12 | Heaps |
| Monday, September 15 | Heapsort. Assignment 2 due. Assignment 3 made. |
| Wednesday, September 17 | Heapsort |
| Friday, September 19 | Worst case, best case, amortized analysis |
| Monday, September 22 | Recursive algorithms, brute force. Assignment 3 due. Assignment 4 made. |
| Wednesday, September 24 | Dynamic programming |
| Friday, September 26 | Dynamic programming. Assignments 5 and 6 made. |
| Friday, October 3 | Dynamic programming. |
| Monday, October 6 | Dynamic programming. Assignment 4, 5 due in lab. |
| Wednesday, October 8 | EXAM 1. |
| Monday, October 13 | Greedy algorithms. Assignment 5 due in lab. |
| Wednesday, October 15 | Greedy algorithms |
| Friday, October 17 | Greedy algorithms |
| Monday, October 20 | Graphs, graph data structures, trees. Assignment 6 due in lab. Assignment 7 made. |
| Wednesday, October 22 | Spanning trees |
| Friday, October 24 | Spanning trees |
| Monday, October 27 | Spanning trees |
| Wednesday, October 29 | Spanning trees. Assignment 7 due. Assignment 8 made. |
| Friday, October 31 | Shortest paths |
| Monday, November 3 | Shortest paths |
| Wednesday, November 5 | Shortest paths |
| Friday, November 7 | Shortest paths. Assignment 8 due, Assignment 9 made. |
| Monday, November 10 | EXAM 2 |
| Wednesday, November 12 | Search trees (backtracking) |
| Friday, November 14 | Search trees (backtracking) |
| Monday, November 17 | Cycles, disjoint sets |
| Wednesday, November 19 | All pairs shortest paths, negative weight edges. Assignment 9 due. |
| Friday, November 21 | Parallel algorithms, Assignment 9 due. |
| Monday, November 24 | Problem solving strategies |
| Wednesday, November 26 | Problem solving strategies. Assignment 10 made. |
| Monday, December 1 | Complexity P and NP |
| Wednesday, December 3 | Boolean algebra, Cook's thesis |
| Friday, December 5 | NP-Completeness theorem, TSP |
| Monday, December 8 | Algorithmic time/space tradeoffs |
| Wednesday, December 10 | Problem solving strategies |
| Friday, December 12 | Last day of classes, final review, Assignment 10 due. |
Homeworks will need to be completed by the lab session; in lab, you will go over them, and hopefully sort out any confusion you might have.
You will be required to turn in printouts of your programs. They must be in C or C++, and will read/write to standard input/output. Include comments, and clearly identify your name, which program it is, and so on. For some of the assignments, you'll need to record the run times for your program on some sets of data. Use good programming style. If your program does not work correctly, you will get no credit (the TA will read through code, and will contact you if he spots a bug). You must write the programs yourself; if you run into trouble, contact either the TA or Prof. Madden. Programs are due on the dates indicated; there will not be extensions.
There's a simple program called genfile.c that can be used to produce large input files for sorting algorithms. Comple and run as genfile #### > your_file.txt
| Program 1 | Insertion sort |
| Program 2 | Quicksort |
| Program 3 | Heapsort |
| Program 4 | Variations of Fibonacci |
| Program 5 | Longest common subsequence |
| Program 6 | Integer and fractional knapsack |
| Program 7 | Breadth first and depth first search |
| Program 8 | Kruskal's Algorithm |
| Program 9 | Dijkstra's Algorithm |
| Program 10 | Travelling Salesperson Problem |