Feb 26
homework
Discuss ...
last week's code
I fleshed out the code we started last week
for breadth and depth searches of a graph,
using either adjacency lists or adjacency matrices
to store the graph.
The attached graphs.py can be used as a starting point
for further coding assignments this term ...
but only if you see what it's doing and
how it works. To use it a bit, let's plug the
homework graphs into it and see it do it's thing.
new material
Your written homework this week is the midterm.
But I'd like to continue to read and discuss
new graph ideas and algorithms, from both chapter 6
and the catalog of algorithms. Many of these
algorithms are classics. Which problems in
graph theory can be solved quickly and which
problems can't isn't at all obvious. The point
here isn't to memorize all of 'em, but to
see some of the tricks and to become familiar
with the methods.
Look for common ideas across these algorithms. For each,
- What is the definition of the problem?
- Which data structures are used within the algorith?
- What is the O() behavior, and why?
- Does the algorithm design fit into one of the common themes? (brute force, greedy, divide-and-conquer, ...)
The algorithms to start, from chap 6, are:
- Minimum spanning tree
- Shortest path
Your mission : understand these well enough to be able to explain in class what they are and how they work.
Others we might discuss:
Asides:
data examples