{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

_lec15 - CS 323 Lecture 15 Design and Analysis of...

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

n CS 323 ± ± Lecture 15 o Design and Analysis of Algorithms Hoeteck Wee · [email protected] http://www.cs.qc.edu/~hoeteck/f09/

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

View Full Document
Announcements I mid-term 2 next Wed I themes: greedy, divide-and-conquer, dynamic programming I algorithms: (1) Prim’s & Kruskal’s, (2) sequence alignment, (3) Dijkstra’s & Bellman-Ford I solved exercises in textbook I one double-sided cheat sheet (type-written ok) Hoeteck Wee CS 323 Oct 28, 2009 2 / 9
Shortest paths in graphs SHORTEST PATH PROBLEM. I Input: weighted, directed graph G = ( V , E ) , start node s , destination t . I each edge e has a positive cost/weight/length ce I length of a (directed) path = sum of lengths of all edges on the path I Find the shortest directed path from s to t . I Dijkstra’s: O ( m log n ) time SHORTEST PATHS WITH NEGATIVE EDGE WEIGHTS. I handle negative edge weights I e.g. ﬁnancial modeling, edge costs = transaction costs I assume no negative cycles ⇒ ∃ a simple shortest path, i.e. no repeating node s b e t 2 1 3 - 6 s b e t 2 1 3 - 6 2 Hoeteck Wee CS 323 Oct 28, 2009 3 / 9

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.

{[ snackBarMessage ]}

Page1 / 8

_lec15 - CS 323 Lecture 15 Design and Analysis of...

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

View Full Document
Ask a homework question - tutors are online