lec19 - n CS 323 Lecture 19 o Design and Analysis of...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: n CS 323 Lecture 19 o Design and Analysis of Algorithms Hoeteck Wee · [email protected] http://www.cs.qc.edu/~hoeteck/f09/ Reductions PROBLEM. finding opportunity cycles ( hw 7, q1 ) I take logs to transform products into sums I construct a directed weighted graph G : a node for each stock; directed edge ( i , j ) with weight- log r ij for each pair of stocks I trading cycle ↔ negative cycle in G I finding trading cycles ↔ finding negative cycles in G I ALGORITHM . construct G , find negative cycles in G using Bellman-Ford PROBLEM. finding longest paths in unweighted DAG G ( midterm 2 ) I negate to transform long paths into short paths I construct a directed weighted graph G : same vertices and edges as G ; each edge has weight- 1 I path in G of length ‘ = path in G of length- ‘ I longest path in G = shortest path in G I ALGORITHM. construct G , compute shortest path in G using Bellman-Ford Hoeteck Wee CS 323 Nov 18, 2009 2 / 6 Reductions COMMON THEME....
View Full Document

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

Page1 / 6

lec19 - n CS 323 Lecture 19 o 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