{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSE331 Lecture 38

# CSE331 Lecture 38 - Lecture 38 CSE 331 Dec 2 2011 Review...

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

Lecture 38 CSE 331 Dec 2, 2011

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

View Full Document
Review Sessions etc. Atri: (at least ½ of) class next Friday Jiun-Jie: Extra office hour next Friday Jesse: Review Session on Mon, Dec 12 (pick time slot on blog) Temp grades hopefully sometime next week
Homework 10 Posted on the blog

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

View Full Document
Backchannel open today
Need volunteers for today

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

View Full Document
Shortest Path Problem Input: (Directed) Graph G=(V,E) and for every edge e has a cost c e (can be <0 ) t in V Output: Shortest path from every s to t 1 1 100 -1000 899 s t Shortest path has cost negative infinity Shortest path has cost negative infinity Assume that G has no negative cycle Assume that G has no negative cycle
When to use Dynamic Programming There are polynomially many sub-problems Optimal solution can be computed from solutions to sub-problems There is an ordering among sub-problem that allows for iterative solution Richard Bellman

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

View Full Document
Recurrence Relation OPT(i,u) = cost of shortest path from u to t with at most i edges OPT(i,u) = min { OPT(i-1,u) , min (u,w) in E { c u,w + OPT(i-1, w) } } Path uses ≤ i-1 edges Path uses ≤ i-1 edges Best path through all neighbors Best path through all neighbors
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}