Mar 11
old business
I've cleaned up and finished the prims2.py
code we started last week. It's in
prims2 .
Is this week's assignment clear?
review
We've been through several graph algorithms now :
- Prim's
- Kruskal's
- Dijkstra's
Just so we're all on the same page, review
- what they are
- how they work
- how fast they run as a function of |V| = number of vertices, |E| = number of edges
A variation:
- how would you find the minimum distance between two points if the costs were on the vertices?
new business
Floyd-Warshall , pg 211 in Skienna's text
- All-pairs minimum path
- Very, very, short implementation
- One of the few algorithms that prefers the graph adjacency matrix.
- Can also be done with Dijkstra's, in same O(). (Show this.)
A*
- popular path finding algorithm (part of many gaming "get there" and robot engines)
- similar to Dijkstra's, but with a goal in mind.
- uses an approximate distance to goal as a way to sort choices in the fringe
- almost a "greedy" algorithm ... but includes cost from start to current location, so isn't just taking the local best at each point.
for Thursday
finish up graphs :
- discuss ideas of graph flow problems?
- Perhaps discuss some from the "reference" part of the textbook ?
- I invite you to browse through it to get a feel for the sorts of things that are in there.
- Traveling Salesman problem ?
- ... discuss some of the general ideas. No fast, exact solution known. Lots of approximate attempts.