Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Próxima SlideShare
Cargando en…5
×

# Single source shortest path

presentation

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Inicia sesión para ver los comentarios

• Sé el primero en recomendar esto

### Single source shortest path

1. 1. Single-Source Shortest PathSingle-Source Shortest Path ProblemProblem Prepare byPrepare by Dweep SarkerDweep Sarker Mohibulla NomanMohibulla Noman Stamford University BangladeshStamford University Bangladesh
2. 2. Outline • Approach Dijksra’s Algorithm • Use Application • Improvement • Advantages • Disadvantages • In Future
3. 3. Algorithms Solving the Problem • Dijkstra’s algorithm – Solves only the problems with nonnegative costs. • Floyd-Warshall and Bellman-Ford algorithm solve the problems on graphs that do not have a cycle with negative cost
4. 4. Complexity Weights Time complexity Author ℝ+ O(E + V log V) Dijkstra 1959 ℕ O(E) Thorup (requires constant-time multiplication).
5. 5. Point-to-point Shortest Path Problem o Z R V s D C B A
6. 6. Dijkstra’s Idea s x y tentative d[y] length(x,y) settled d[x] priority queue Qsettled nearest unsettled neighbor of x 1. Shortest distance from s to all nodes initially “unsettled”. 2. Shortest distance to s is zero. Tentative distance to others is ∞. 3. Put all nodes in queue ordered by tentative distance from s. 4. Take out nearest unsettled node, x. Settle its distance from s. 5. For each unsettled immediate neighbor y of x 6. If going from s to y through x is shorter than shortest path through settled nodes, update tentative distance to y. 7. Repeat from step 4, until distance to destination is settled.