Graphs
Directed Graphs
Topological Sorting
An list showing the order to visit the vertices. The steps are as follows:
1. find a vertex with no successors
2. delete that vertex and place it at the top of your list
For example, let's say you want to earn a degree, and need to know the correct order
to take the classes. Each class has one or more prerequites.
Here are the courses to take to get the degree:
Advanced Algebra
Algebra
Analytic Geometry
Comparative Literature
English Literature
Geometry
Senior Seminar
The process of graphing them will give is our topoligical sort. (DirectedGraph.ppt)
Degree
Comparative Literature
English Literature
Senior Seminar
Advanced Algebra
Analytic Geometry
Algebra
Geometry
Minimum Spanning Tree
The idea is to minimize how the graph is traversed.
Un-Weighted Graphs
minimum number of edges to connect all vertices
Weighted Graphs
minimize some value (cost, time, distance) (WeightedGraph.ppt)
1. start at one vertex
2. deteremine value to each adjacent vertex
3. draw an edge to the cheapest vertex
4. move to new vertex
5. loop back to step 2