Lecture 39 CSE 331 Dec 9, 2009. Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday.

Slides:



Advertisements
Similar presentations
Bellman-Ford algorithm
Advertisements

Lecture 38 CSE 331 Dec 7, The last few days Today: Solutions to HW 9 (end of lecture) Wednesday: Graded HW 9 (?), Sample final, Blog post on the.
1 Longest Path in a DAG Algorithm. Compute topological order of vertices: A B C D E F G H I. AB C G H D E F I time.
Lecture 13 CSE 331 Oct 2, Announcements Please turn in your HW 3 Graded HW2, solutions to HW 3, HW 4 at the END of the class Maybe extra lectures.
Lecture 40 CSE 331 Dec 8, Finals 3:35-6:05pm KNOX 104 Tue, Dec 14 Blog post on the finals up.
Lecture 16 CSE 331 Oct 9, Announcements Hand in your HW4 Solutions to HW4 next week Remember next week I will not be here so.
Lecture 12 CSE 331 Sep 30, Announcements Final exam: Dec 16, 11:45am-2:45pm, NSC 210 HW 2 solutions at the end of the lecture Mid term: Oct 16,
Lecture 38 CSE 331 Dec 3, A new grading proposal Towards your final score in the course MAX ( mid-term as 25%+ finals as 40%, finals as 65%) .
Lecture 39 CSE 331 Dec 6, On Friday, Dec 10 hours-a-thon Atri: 2:00-3:30 (Bell 123) Jeff: 4:00-5:00 (Bell 224) Alex: 5:00-6:30 (Bell 242)
Shortest Path Algorithm By Weston Vu CS 146. What is Shortest Paths? Shortest Paths is a part of the graph algorithm. It is used to calculate the shortest.
CSE 421 Algorithms Richard Anderson Lecture 10 Minimum Spanning Trees.
Lecture 24 CSE 331 Oct 30, Homework stuff Please turn in your HW 6 Graded HW 5 and HW 7 at the END of the lecture.
Lecture 36 CSE 331 Dec 2, Graded HW 8 END of the lecture.
Lecture 17 CSE 331 Oct 8, HW 4 due today Q1 and Q2 in one pile Q3 in another pile I will not take any HW after 1:15pm.
Lecture 27 CSE 331 Nov 3, Combining groups Groups can unofficially combine in the lectures.
Lecture 37 CSE 331 Dec 1, A new grading proposal Towards your final score in the course MAX ( mid-term as 25%+ finals as 40%, finals as 65%) .
Lecture 25 CSE 331 Nov 2, Adding teeth to group talk Form groups of size at most six (6) Pick a group leader I will ask group leader(s) to come.
Lecture 28 CSE 331 Nov 5, HW 7 due today Q1 in one pile and Q 2+3 in another I will not take any HW after 1:15pm.
Lecture 13 CSE 331 Oct 2, Announcements Mid term in < 2 weeks Graded HW2 at the END of the class.
Lecture 11 CSE 331 Sep 25, Homeworks Please hand in your HW 2 now HW 3 and graded HW 1 at the end of class.
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 22.
Shortest Path Algorithms. Definitions Variants  Single-source shortest-paths problem: Given a graph, finding a shortest path from a given source.
Lecture 38 CSE 331 Dec 2, Review Sessions etc. Atri: (at least ½ of) class next Friday Jiun-Jie: Extra office hour next Friday Jesse: Review Session.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
Lecture 23 CSE 331 Oct 24, Reminder 2 points for Piazza participation 3 points for mini-project.
Lecture 38 CSE 331 Dec 5, OHs today (only online 9:30-11)
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CSE 421 Algorithms Richard Anderson Lecture 21 Shortest Paths and Network Flow.
Lecture 23 CSE 331 Oct 26, 2016.
Lecture 21 CSE 331 Oct 21, 2016.
Lecture 24 CSE 331 Oct 28, 2016.
Lecture 36 CSE 331 Nov 29, 2017.
Lecture 21 CSE 331 Oct 20, 2017.
Lecture 36 CSE 331 Nov 30, 2016.
Lecture 35 CSE 331 Nov 27, 2017.
Lecture 35 CSE 331 Nov 28, 2016.
Lecture 37 CSE 331 Dec 1, 2017.
Lecture 13 CSE 331 Oct 1, 2012.
Lecture 24 CSE 331 Oct 25, 2013.
Lecture 22 CSE 331 Oct 23, 2017.
Lecture 23 CSE 331 Oct 25, 2017.
Lecture 24 CSE 331 Oct 29, 2012.
Lecture 23 CSE 331 Oct 24, 2011.
Lecture 26 CSE 331 Nov 2, 2012.
Lecture 22 CSE 331 Oct 24, 2016.
Lecture 37 CSE 331 Nov 30, 2011.
Lecture 12 CSE 331 Sep 28, 2012.
Lecture 12 CSE 331 Sep 26, 2011.
Lecture 34 CSE 331 Nov 21, 2016.
Lecture 22 CSE 331 Oct 15, 2014.
Lecture 11 CSE 331 Sep 23, 2011.
Lecture 11 CSE 331 Sep 19, 2014.
Lecture 24 CSE 331 Oct 24, 2014.
Lecture 36 CSE 331 Nov 28, 2011.
Lecture 36 CSE 331 Nov 30, 2012.
Lecture 37 CSE 331 Dec 2, 2016.
Lecture 11 CSE 331 Sep 21, 2017.
Autumn 2016 Lecture 10 Minimum Spanning Trees
Lecture 23 CSE 331 Oct 24, 2011.
Lecture 26 CSE 331 Nov 1, 2010.
Lecture 11 CSE 331 Sep 22, 2016.
Lecture 25 CSE 331 Oct 28, 2011.
Richard Anderson Lecture 20 Shortest Paths and Network Flow
Winter 2019 Lecture 10 Minimum Spanning Trees
Lecture 15 CSE 331 Oct 4, 2010.
Lecture 27 CSE 331 Nov 4, 2016.
Lecture 36 CSE 331 Nov 22, 2013.
Lecture 37 CSE 331 Dec 3, 2018.
Lecture 24 CSE 331 Oct 29, 2018.
Presentation transcript:

Lecture 39 CSE 331 Dec 9, 2009

Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday

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 s t Shortest path has cost negative infinity Assume that G has no negative cycle

Recurrence Relation OPT(i,v) = cost of shortest path from v to t with at most i edges OPT(i,v) = min { OPT(i-1,v), min (v,w) in E { c v,w + OPT(i-1, w) } } Path uses ≤ i-1 edges Best path through all neighbors

Some consequences OPT(i,v) = shortest path from v to t with at most i edges OPT(i,v) = min { OPT(i-1,v), min (v,w) in E { c v,w + OPT(i-1, w) } } OPT(n-1,v) is shortest path cost between v and t Group talk time: How to compute the shortest path between s and t given all OPT(i,v) values Group talk time: How to compute the shortest path between s and t given all OPT(i,v) values

Today’s agenda Finish Bellman-Ford algorithm Look at a related problem: longest path problem