Lec24_Dijkstra

# Lec24_Dijkstra - Dijkstra Algorithm Single-Source Shortest...

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

Dijkstra Algorithm

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

View Full Document
Single-Source Shortest Paths We wish to find the shortest route between Binghamton and NYC. Given a NYS road map with all the possible routes how can we determine our shortest route? We could try to enumerate all possible routes. It is certainly easy to see we do not need to consider a route that goes through Buffalo.
Modeling Problem We can model this problem with a directed graph. Intersections correspond to vertices, roads between intersections correspond to edges and distance corresponds to weights. One way roads correspond to the direction of the edge. The problem: Given a weighted digraph and a vertex s in the graph : find a shortest path from s to t

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

View Full Document
Case: The graph may have negative edges but no negative cycles. The shortest distance from s to t can be computed. The distance of a shortest path A B s t -3 1 8 d(s,t)=6
Shortest Path Algorithms Dijkstra’s algorithm does NOT allow negative edges. Uses a greedy heuristic. undirected/directed graph

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

View Full Document
Solving Optimization Problems Solving strategy: 2 stages: First Stage: solves an intermediate problem and saves an additional data structure.
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 01/04/2010.

### Page1 / 18

Lec24_Dijkstra - Dijkstra Algorithm Single-Source Shortest...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online