Last time | Next time |
I think that I've got the homeworks back on track now. Let me know if things are still crazy.
I made 6.3 an optional homework, to replace missing ones. I'll be dropping at least three of your homeworks (your lowest, of course); but if you do the optional one, I'll be effectively dropping your four lowest.
We did a depth-first traversal, in which one effectively builds a tree, using a recursive strategy, to list the nodes of the graph.
The breadth-first traversal, and how each traversal method works on rooted trees.
We have two more sections to go in chapter 8:
Then it's on to our last section, Section 9.3: Finite State Machines (we'll get two days on that; it's one of my favorites!).
That takes us up to a day of review, and then finals week.
I hope that you're working on your projects!
This was fun to program, but probably more trouble than it was worth. A direct approach, as in my implementation of Bellman-Ford below, would have been simpler to code. But, if I can do something recursively, I probably will...:)
If you check out this code, you'll see where I compute the power set ("all-subsets") of a set, to cover all the bases. I think that the end result is pretty beautiful, too!
(coded up following our author's algorithm, in section 3.3, p. 214, as closely as possible).