Lecture 7 (Unfinished) Flashcards
Different types of graphs
Undirected - Edges go both ways
Directed - Edges have arrows
Complete - There is an edge between all nodes
Weighted - Each edge has a value associated to it
What is Depth-First Traversal?
1) We visit the starting node and then proceed to follow links through the graph until we reach a dead end
2) We then back up along our path until we find an unvisited adjacent node, and continue in that new direction
3) The process completes when we back up to the starting node and all the nodes adjacent to it have been visited
4) If presented with two choices, we choose the node with numerically and/or alphabetically smaller label (just for convenience
What is MST
A minimum spanning tree (MST) is the spanning tree with the minimum cost