l13-sorting

l13-sorting - CS112: Data Structures Lecture 13 CS112:...

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

View Full Document Right Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 1 Lecture 13 CS112: Data Structures CS112: Data Structures Lecture 13
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 2 Lecture 13 Schedule Schedule Monday, August 8: Work on project 4 Wednesday, August 10: Review Monday August 15: Students present Projects 4 (attendance required) Wednesday, August 17: Final exam
Background image of page 2
CS112: Slides for Prof. Steinberg ʼ s lecture 3 Lecture 13 Review: Shortest Path Review: Shortest Path Dijkstra’s algorithm: to find shortest path from A to B: Build a tree of shortest paths from A Is set of shortest paths really a tree? Suppose not, then must have two shortest paths converge and then diverge A X B C
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 4 Lecture 13 Dijkstra Dijkstra s s algorithm algorithm Grow a tree of shortest paths from start grow it one edge / vertex at a time But which? Vertex has to be one edge from tree Of edges for a vertex, has to be edge that gives shortest path to start Of vertices one edge from tree, choose the one with the shortest ‘shortest path via tree’
Background image of page 4
CS112: Slides for Prof. Steinberg ʼ s lecture 5 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 F E 7 A Fringe D 4 A Fringe C 5 A Fringe B 0 -- Tree A Distance Lin K Status Node
Background image of page 5

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 6 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 12 C Fringe F E 7 A Fringe D 4 A Tree C 5 A Fringe B 0 -- Tree A Distance Lin K Status Node
Background image of page 6
CS112: Slides for Prof. Steinberg ʼ s lecture 7 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 12 C Fringe F E 6 B Fringe D 4 A Tree C 5 A Tree B 0 -- Tree A Distance Lin K Status Node
Background image of page 7

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 8 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 12 C Fringe F 7 D Fringe E 6 B Tree D 4 A Tree C 5 A Tree B 0 -- Tree A Distance Lin K Status Node
Background image of page 8
CS112: Slides for Prof. Steinberg ʼ s lecture 9 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 9 E Fringe F 7 D Tree E 6 B Tree D 4 A Tree C 5 A Tree B 0 -- Tree A Distance Lin K Status Node
Background image of page 9

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 10 Lecture 13 Example Example A B C D E F 5 1 7 4 8 1 2 9 E Tree F 7 D Tree E 6 B Tree D 4 A Tree C 5 A Tree B 0 -- Tree A Distance Link Status Node
Background image of page 10
CS112: Slides for Prof. Steinberg ʼ s lecture 11 Lecture 13 Minimum Spanning Tree Minimum Spanning Tree Spanning Tree: a subgraph with All the nodes Some of the edges A tree, I.E., one path between any pair of nodes Minimum spanning tree A spanning tree With minimum total edge weight
Background image of page 11

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

View Full DocumentRight Arrow Icon
CS112: Slides for Prof. Steinberg ʼ s lecture 12 Lecture 13 A B C D E F 5 1 7 8 1 Not a tree (has
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 11/01/2011 for the course 198 112 at Rutgers.

Page1 / 47

l13-sorting - CS112: Data Structures Lecture 13 CS112:...

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

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