notes64

notes64 - This hmtl was generated using a script and is...

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

View Full Document Right Arrow Icon
This hmtl was generated using a script and is missing some date, use the pdf for a better view PDF view Latex Source cs251 Spring 2006 Notes Daniel Palacio April 23, 2006 Contents Dijastra Algorithm Shortest Path Algorithm Dijkstra's Algorithm Dijastra Algorithm - Finds the shorstes paths from a start vertex to all other vertices of the graph. - Requirments: Undirected Edges Non-negative edge lengths - The algorithm stores and array D[u] the estimated distance from the starting vertex v to vertex u. At the end of the algorithm, D contains the shortes distance. - Initially (v is starting index) D[v] = 0 and D[u] = as long as u v - At every step the vertex u with the minimun D[u] that has not been visited is visited
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. Starting at C. Q = {c, d, l, m, n,s} Unvisited vertices D[c] = 0; D[d] = D[l] = D[m] =
Background image of page 2
D[n] = D[s] = 2. u = min D[u] such that u is in Q = {c, d, l, m, n,s} = c D[c] = 0; D[d] = min( ,0 + 800) = 800 D[l] = ; D[m] = D[n] = min( , 0 + 740) = 740 D[s] = min(
Background image of page 3

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

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

Page1 / 7

notes64 - This hmtl was generated using a script and is...

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