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

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

CSCI-255 Advanced Data Structures Lecture 26

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

View Full Document
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?
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

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

View Full Document
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
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

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

View Full Document
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
Ask a homework question - tutors are online