lecture26 - CSCI-255 Advanced Data Structures Lecture 26...

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

View Full Document Right Arrow Icon
CSCI-255 Advanced Data Structures Lecture 26
Background image of page 1

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

View Full DocumentRight Arrow Icon
Graph Connectivity and Graph Traversal • s-t connectivity problem : Given two nodes s and t, is there a path between s and t? • s-t shortest path problem : Given two nodes s and t, what is the length of the shortest path between s and t?
Background image of page 2
Shortest Path Problem • Directed graph G = (V, E) – Source s, destination t – Length λ e = length of edge e • Shortest path problem : find shortest directed path from s to t cost of path = sum of edge costs in path Cost of path s-2-3-5-t = 9 + 23 + 2 + 16 = 48 s 3 t 2 6 7 4 5 23 18 2 9 14 15 5 30 20 44 16 11 6 19 6
Background image of page 3

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

View Full DocumentRight Arrow Icon
Greedy Algorithms • Solve problems with the simplest possible algorithm • The hard part : showing that something simple actually works • Pseudo-definition – An algorithm is Greedy if it builds its solution by adding elements one at a time using a simple rule
Background image of page 4
Dijkstra's Algorithm • Dijkstra's algorithm – Maintain a set of explored nodes S for which we have determined the shortest path distance d(u) from s to u
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/26/2009 for the course MATH AND C CSCI255 taught by Professor Dr.ikergondraluja during the Spring '09 term at St. Francis Xavier, Antigonish.

Page1 / 13

lecture26 - CSCI-255 Advanced Data Structures Lecture 26...

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

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