Lecture 26 CSE 331 Nov 1, 2010.

Slides:



Advertisements
Similar presentations
The Greedy Approach Chapter 8. The Greedy Approach It’s a design technique for solving optimization problems Based on finding optimal local solutions.
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.
CSE 780 Algorithms Advanced Algorithms SSSP Dijkstra’s algorithm SSSP in DAGs.
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 27 CSE 331 Nov 3, Combining groups Groups can unofficially combine in the lectures.
Lecture 25 CSE 331 Oct 29, HW 6 due today All questions in one pile I will not take any HW after 1:15pm.
Lecture 39 CSE 331 Dec 9, Announcements Please fill in the online feedback form Sample final has been posted Graded HW 9 on Friday.
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 27 CSE 331 Nov 6, Homework related stuff Solutions to HW 7 and HW 8 at the END of the lecture Turn in HW 7.
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.
Lecture 22 CSE 331 Oct 26, Blog posts Please sign up if you have not If I have a pick a blogger I will only pick ONE/lecture Will lose out on 5%
Dynamic Single-source Shortest Paths Camil Demetrescu University of Rome “La Sapienza”
Using Dijkstra’s Algorithm to Find a Shortest Path from a to z 1.
CSE 331: Review. Main Steps in Algorithm Design Problem Statement Algorithm Real world problem Problem Definition Precise mathematical def “Implementation”
Minimum spanning trees (MST) Def: A spanning tree of a graph G is an acyclic subset of edges of G connecting all vertices in G. A sub-forest of G is an.
Lecture 23 CSE 331 Oct 24, Reminder 2 points for Piazza participation 3 points for mini-project.
CSE 421 Algorithms Richard Anderson Lecture 8 Optimal Caching Dijkstra’s algorithm.
Graph Algorithms BFS, DFS, Dijkstra’s.
Lecture 23 CSE 331 Oct 26, 2016.
Lecture 21 CSE 331 Oct 21, 2016.
Lecture 24 CSE 331 Oct 28, 2016.
Lecture 24 CSE 331 Oct 27, 2017.
Lecture 36 CSE 331 Nov 29, 2017.
Lecture 21 CSE 331 Oct 20, 2017.
Lecture 36 CSE 331 Nov 30, 2016.
Autumn 2016 Lecture 9 Dijkstra’s algorithm
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
Autumn 2015 Lecture 9 Dijkstra’s algorithm
Lecture 37 CSE 331 Dec 1, 2017.
Shortest-Paths Trees Kun-Mao Chao (趙坤茂)
Lecture 13 CSE 331 Oct 1, 2012.
Lecture 24 CSE 331 Oct 25, 2013.
Richard Anderson Lecture 9 Dijkstra’s algorithm
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.
Richard Anderson Lecture 9 Dijkstra’s algorithm
Lecture 26 CSE 331 Nov 2, 2012.
Algorithms and Data Structures Lecture XIII
Lecture 22 CSE 331 Oct 24, 2016.
Autumn 2015 Lecture 10 Minimum Spanning Trees
Lecture 37 CSE 331 Nov 30, 2011.
Lecture 12 CSE 331 Sep 26, 2011.
Lecture 25 CSE 331 Oct 27, 2014.
Lecture 22 CSE 331 Oct 15, 2014.
Lecture 11 CSE 331 Sep 23, 2011.
Chapter 24: Single-Source Shortest Paths
Lecture 24 CSE 331 Oct 24, 2014.
Weighted Graphs & Shortest Paths
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 12 CSE 331 Sep 22, 2014.
Lecture 23 CSE 331 Oct 24, 2011.
Winter 2019 Lecture 9 Dijkstra’s algorithm
Chapter 24: Single-Source Shortest Paths
CSE 417: Algorithms and Computational Complexity
Lecture 11 CSE 331 Sep 22, 2016.
Lecture 25 CSE 331 Oct 28, 2011.
Winter 2019 Lecture 10 Minimum Spanning Trees
Lecture 15 CSE 331 Oct 4, 2010.
Single-Source Shortest Path & Minimum Spanning Trees
Data Structures and Algorithm Analysis Lecture 8
Lecture 36 CSE 331 Nov 22, 2013.
Lecture 24 CSE 331 Oct 29, 2018.
Autumn 2019 Lecture 9 Dijkstra’s algorithm
Presentation transcript:

Lecture 26 CSE 331 Nov 1, 2010

Blog posts/Group Scribe leader Please sign up if you have not There are many lectures even in November with <3 students If I have a pick a blogger/leader I will only pick THREE/lecture Will lose out on 5%-10% of your grade

Shortest Path problem 15 5 s u v 100 Input: Directed graph G=(V,E) Edge lengths, le for e in E “start” vertex s in V 15 5 s u v Output: All shortest paths from s to v in V 5 s u

Naïve Algorithm Ω(n!) time

Dijkstra’s shortest path algorithm E. W. Dijkstra (1930-2002)

Dijkstra’s shortest path algorithm 1 d’(v) = min e=(u,v) in E, u in R d(u)+le 1 2 4 3 y 4 3 u d(s) = 0 d(u) = 1 s x 2 4 d(v) = 2 d(x) = 2 d(y) = 3 d(z) = 4 v z 5 4 2 s v Input: Directed G=(V,E), le ≥ 0, s in V u R = {s}, d(s) =0 Shortest paths x While there is a v not in R with (u,v) in E, u in R z y Pick w that minimizes d’(w) Add w to R d(w) = d’(w)

Couple of remarks The Dijkstra’s algo does not explicitly compute the shortest paths Can maintain “shortest path tree” separately Dijkstra’s algorithm does not work with negative weights Left as an exercise

Rest of today’s agenda Prove correctness of Dijkstra’s algorithm Efficient implementation of Dijkstra’s algorithm