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

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

View Full Document Right Arrow Icon
n CS 323 ± ± Lecture 15 o Design and Analysis of Algorithms Hoeteck Wee · hoeteck@cs.qc.cuny.edu http://www.cs.qc.edu/~hoeteck/f09/
Background image of page 1

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

View Full DocumentRight Arrow Icon
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
Background image of page 2
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. financial 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
Background image of page 3

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

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

This note was uploaded on 05/22/2010 for the course CS 700 taught by Professor Xikong during the Spring '10 term at Universidad San Martín de Porres.

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 Right Arrow Icon
Ask a homework question - tutors are online