[FrontPage] [TitleIndex] [WordIndex

Notes for Tuesday November 30, 2004

What's coming up

Graphs: the Basics

The code: 
 <course id = "FOCS">
     <student>
       Chris
     <\student>
     <student>
       Kathy
     <\student>

is a text-based representation of this graph (where "FOCS", "Chris", and "Kathy" are the names of vertices):

                 Chris 
                 /
                /student
               /
            FOCS
               \
                \student 
                 \
                Kathy

Searching in Graphs

Sometimes, we want to determine whether a particular element is in a graph. This requires that we need an efficient way to step through each vertex of the graph. We can use a breadth first search or a depth first search to do this.

In doing a breadth first search, we will change our graph into a tree by keeping all of the vertices in the graph, but only some of the edges.

Complexity of Searching Graphs

Minimum Spanning Trees

Weighted edges can be used to indicate the distance between two objects (represented as nodes), or perhaps the cost or desireablity of connecting them. Because of this, it is sometimes desireable to know create a spanning tree of the graph. A spanning tree of a graph is a subset of the graph in which all of the vertices are connected. In a minimum spanning tree, the edges are chosen such that the sum of the edge weights is minimized. A maximum spanning tree is when the sum of the edge weights is maximized. Special algorithms have been created to find these trees.

Prim's Algorithm: how it works

Prim's Algorithm is a greedy algorithm that can be used to find the minimum spanning tree of a graph. Here's how:

About Prim's Algorithm

Single Source Shortest Path: Dijkstra's Algorithm

It is often desireable to know the shortest path on a graph. Dijkstra's Algorithm works on directed graphs (which means that it will also work on undirected graphs, if you just put two directed edges in place of each undirected one). The best way to understand how it works is to look at the demo we saw in class.

Demo from class: http://www-b2.is.tokushima-u.ac.jp/~ikeda/suuri/dijkstra/DijkstraApp.shtml?demo2

Miscellaneous

Reading

Corman - ch 22, 23, and 24 (through 588, and then pgs 595-601)


2013-07-17 10:43