{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

05_Dijkstra

# 05_Dijkstra - 15.082 and 6.855J Dijkstra's Algorithm for...

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

1 15.082 and 6.855J February 20, 2003 Dijkstra’s Algorithm for the Shortest Path Problem

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

View Full Document
2 Wide Range of Shortest Path Problems Sources and Destinations We will consider single source problems in this lecture Properties of the costs. We will consider non-negative cost coefficients in this lecture Network topology. We will consider all directed graphs
3 Assumptions for the Problem Today Integral, non-negative data There is a directed path from source node s to all other nodes. Objective: find the shortest path from node s to each other node. Applications. Vehicle routing Communication systems

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

View Full Document
4 Overview of today’s lecture One nice application (see the book for more) Dijkstra’s algorithm animation proof of correctness (invariants) time bound Dial’s algorithm (a way of implementing Dijkstra’s algorithm) animation time bound
5 Approximating Piecewise Linear Functions INPUT: A piecewise linear function n points a 1 = (x 1 ,y 1 ), a 2 = (x 2 ,y 2 ),..., a n = (x n ,y n ). x 1 x 2 ... x n . Objective: approximate f with fewer points c* is the “cost” per point included c ij = cost of approximating the function through points a i , a i+1 , . . ., a jj by a single line joining point a i to point a j . Find the minimum cost path from node 1 to node n. Each path from 1 to n corresponds to an approximation of the data points a 1 to a n .

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

View Full Document
6 c i,j is the cost of deleting points a i+1 , …, a j-1 x a 1 a 3 a a 4 a 5 a 6 a 8 a 7 a 10 a 9 f(x) f (x) 1 f (x) 2 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 1 0 1 3 c 1,3 10 2 4 6 5 7 8 9 a 1 a 2 a 3 e.g., c 1,3 = -c* + dist of a 2 to the line c 3,5 c 5,7 c 7,10
7 A Key Step in Shortest Path Algorithms In this lecture, and in subsequent lectures, we let d( ) denote a vector of temporary distance labels. d(i) is the length of some path from the origin node 1 to node i. Procedure Update(i) for each (i,j) A(i) do if d(j) > d(i) + c ij then d(j) : = d(i) + c ij and pred(j) : = i; Update(i) used in Dijkstra’s algorithm and in the label correcting algorithm

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

View Full Document
8 Update(7) 1 8 2 7 1 3 2 0 1 4 6 9 5 3 2 1 3 11 9 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern