Comp. Sci. 311 Study Guide for Final Fall, 2008

As you know, the final will be Wednesday, Dec. 17 from 4:00 to 6:00 pm in ELAB 303. Class on Thursday, Dec. 11 will be a summary and wrap up of the semester's material. At the discussion section Thursday afternoon, Creidieki and I will hand out the model solutions to homework 11 and do a general review session.

The final is closed book and closed notes, with no calculators, computers, cell phones, etc. allowed. This is because I want you to understand the material beforehand.

I try hard to make my exams like my problem sets only much easier because they are closed book and there is a rather short limit on time.

The final will be a cummulative look at the whole course, but with some emphasis on the material that we've done since the last test, i.e., linear programming and NP completeness.

Even though you will have two hours, the final will be about the same length as the second test.

To study for the final, I urge you to do the following:

  1. Go over the homeworks 1 through 11, and their model solutions, making sure that you now understand all of these! I will hand out model solutions to homework 11 at the discussion section on Thursday, Dec. 11, and no late homework will be accepted after that.

  2. Go over your notes from all the lectures and the corresponding readings. I will not cover new material the last week of classes, but instead concentrate on review and consolidation. In particular, we studied a bunch of topics and algorithms that I expect you to be comfortable and familiar with. Below is a list of the topics and algorithms that I have in mind.

  3. Next Tuesday evening, relax and get a good night's sleep.

Main Topics Covered

  1. Asymptotic analysis: mostly big-oh, but also big-omega and big-theta.
  2. Number Theoretic Algorithms, and a little bit of number theory concerning modular arithmetic and Fermat's Little Theorem.
  3. Divide and Conquer Algorithms: how this works; how to come up with the relevant recurrence equation; how to solve the recurrence equation using the master theorem. (As I did on the first test, I will put a statement of the master theorem on the top of the last page of the final just in case you need it.)
  4. Sorting algorithms and the Omega(nlog n) lower bound for comparison sorts.
  5. Graphs and their data structures and algorithms.
  6. Union/Find
  7. Greedy Algorithms.
  8. Dynamic Programming.
  9. Linear Programming: how to model a problem via linear programming; the dual of a linear program.
  10. Network Flow, and Bipartite Matching.
  11. P and NP, NP Complete problems, what it means for a problem to be NP complete, and how to prove that it is.
  12. How to handle optimization problems whose decision problems are NP complete, e.g., SAT, TSP, Knapsack.

Main Algorithms Studied

  1. Number theoretic algorithms: Euclid's algorithm, Modular exponentiation, Fast Primality testing using Fermat's Little Theorem, and RSA.
  2. Merge sort, Bucket Sort, and Radix Sort.
  3. Strassen's Fast Matrix Multiplication Algorithm and Fast Extended Precision Integer Multiplication
  4. Sorting algorithms and the Omega(nlog n) lower bound for comparison sorts.
  5. We didn't cover universal hashing, but I will assume that your general knowledge about dictionaries from 187 includes the following two facts:
    1. There are good classes of hash functions that allow constant-time maps of about n items from a large key space to O(n) buckets so that with high probability the expected length of each bucket is bounded by a constant, although the worst case length is n. This allows us to have a dictionary that has average case time O(1) per operation, but worst case time O(n) per operation.
    2. We can also build balanced tree dictionaries with O(log n) worst case time per operation.
  6. Breadth First Search and its applications.
  7. Depth First Search and its many applications.
  8. Dijkstra's Algorithm: note we gave O(n2) and O((n+m)log n) implementations.
  9. Prim's MST Algorithm: note we gave O(n2) and O((n+m)log n) implementations.
  10. Kruskal's MST Algorithm and the Union-Find data structure.
  11. Huffman Greedy Coding Algorithm.
  12. Dynamic Programming Algorithms including:
  13. Ford Fulkerson Network Flow algorithm and its applications.
  14. Simplex algorithm: we didn't go into full detail but I expect you to understand the general idea of what it does and why it works.
  15. Backtracking
  16. Branch and Bound

Reminder: when I ask you on the test to come up with an algorithm, I will want you to use things we have learned to build an algorithm to solve the problem. If it makes sense to use a data structure and/or algorithm that we have studied, then you can just quote it by name and state its running time -- you do not have to write its pseudo-code.

The most important thing is that you do the following:

  1. Clearly describe a correct algorithm;
  2. Explain why your algorithm is correct;
  3. Analyze your algorithm, i.e., compute its asymptotic running time
Even if you can't get the absolute fastest possible algorithm, I will be generous with partial credit if you successfully complete the above steps.