The final will be cumulative (covering all material taught in the course).

The final will be closed book, but you may bring a single sheet of 8.5x11in paper with any notes on both sides, prepared by you.

Although the final will cover all material taught, my primary recommendation for the final is that you know all of the algorithms taught in the course. Specifically, you should be able to

- run them on examples,
- answer basic questions about how they can be implemented,
- explain the basic ideas underlying their proofs of correctness, and
- explain what we've established about their worst-case running times are (for example, upper bounds on the worst-case running time, and the basic ideas underlying the proofs of those upper bounds).

- defining problems
- algorithms - what are they, how to describe them, difference between algorithms and implementations
- algorithm correctness - what does it mean for an algorithm to be correct?
- algorithm worst-case running time

- Euclid's algorithm for greatest common divisor (correctness, upper bound on worst-case running time, lower bound on worst-case run time)

- Fibonacci numbers
- recursion diagrams

- big-O notation and its cousins Ω,Θ
- summations -- geometric sums, bounding sums

Lecture 11

- recurrence relations (see S04_CS141:RecurrenceRelations)

/Lecture5, /Lecture6, Lectures 7 and 8

- Dynamic programming (using fib numbers as an example)
- converting a recursive algorithm into a dynamic programming algorithm
- dynamic programming via caching
- dynamic programming via filling out a table bottom-up

Specific dynamic programming algorithms:

- counting paths from S to T in a DAG (directed acyclic graph) in linear time
- finding longest paths from S to T in a DAG in linear time
- computing "n choose k" -- the number of size-k subsets of {1,2,...,n}
- subset sum
- longest ascending subsequence
- longest common subsequence
- formatting text

Graphs and graph algorithms:

- depth-first search - /Lecture9
- detecting cycles in undirected and directed graphs
- finding cut vertices using low numbers - /Lecture10
- topological sort using DFS (S04_CS141:TopologicalSortByDFS)
- breadth-first search - distances from a vertex (S04_CS141:BreadthFirstSearch)
- shortest paths in weighted graphs -- Dijkstra's algorithm (S04_CS141:ShortestPathsByDijkstras)