lec0504-GraphAlgorithms - Announcements: MP7 due 5/4,...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements: MP7 due 5/4, 11:59p. Final exam: 5/11, 7-10p, rooms on web. Review sessions: 5/4, 7-10p, 1404 Siebel 5/8, 3-5p, 1404 Siebel Today: Graphs – Minimum Spanning Trees Single Source Shortest Path
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
How do we get from here to there? Need: 1. Common Vocabulary 2. Graph implementation 3. Traversal-DFS, BFS 4. Algorithms. a) MST b) Shortest Path
Background image of page 2
Minimum Spanning Tree Algorithms: •Input: connected, undirected graph G with unconstrained edge weights •Output: a graph G’ with the following characteristics - •G’ is a spanning subgraph of G •G’ is connected and acyclic (a tree) •G’ has minimal total weight among all such spanning trees C B A E D F 4 8 7 1 2 5 2 3 9
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example of Prim’s algorithm - B D C A F E 7 4 2 8 5 7 3 9 8 Initialize structure: 1. For all v, d[v] = “infinity”, p[v] = null 2. Initialize source: d[s] = 0 3. Initialize priority (min) queue 4. Initialize set of labeled vertices to . Repeat these steps n times:
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

lec0504-GraphAlgorithms - Announcements: MP7 due 5/4,...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online