Se ha denunciado esta presentación.
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.
Single-Source Shortest PathSingle-Source Shortest Path
ProblemProblem
Prepare byPrepare by
Dweep SarkerDweep Sarker
Mohibu...
Outline
• Approach Dijksra’s Algorithm
• Use Application
• Improvement
• Advantages
• Disadvantages
• In Future
Algorithms Solving the Problem
• Dijkstra’s algorithm
– Solves only the problems with
nonnegative costs.
• Floyd-Warshall ...
Complexity
Weights Time complexity Author
ℝ+ O(E + V log V) Dijkstra 1959
ℕ O(E)
Thorup (requires
constant-time
multiplica...
Point-to-point Shortest Path Problem
o
Z
R
V
s
D
C
B
A
Dijkstra’s Idea
s x y
tentative d[y]
length(x,y)
settled d[x]
priority queue
Qsettled
nearest unsettled neighbor of x
1. S...
1. Google maps
2. Road routing
Example Application
Improve
• Heap sort requires only space of one record,
quick sort O(logn) and merge sort requires O(n)
node J&T(v) represe...
Advantage & Disadvantage
Advantage:
Finds shortest path in O( E+ V Log(V) ) if you use a min
priority queue.
This is true...
Advantage & Disadvantage
Disadvantage:
Fails in cases where you have a negative edge
It has a blind searching method for...
Run time:
For a dance graph it is:
O{E+(V*V)}
For a sparse graph it is:
O(E+ VlogV)
In Future
 Using in mapping.
 Using in city distance measurement.
 Traffic criteria management.
 Will use in networkin...
Conclusion
• The compute time complexity for
each of the Dijkstra’s algorithm
are acceptable in items of their
overall per...
Thank you
honorable Teacher
Nazia Hossain(Briti)
Prepared by :
Dweep sarker
Mohibulla Noman
CSE 052 06625
CSE 052 06646
Próxima SlideShare
Cargando en…5
×

Single source shortest path

presentation

  • 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.
  7. 7. 1. Google maps 2. Road routing Example Application
  8. 8. Improve • Heap sort requires only space of one record, quick sort O(logn) and merge sort requires O(n) node J&T(v) represent the label of node 0 to end D. • The cost from node 0 to D is the sum of cost WOA and cost w. • Reuse Dijkstra algorithm to get the optional path SPAD from A to D node.
  9. 9. Advantage & Disadvantage Advantage: Finds shortest path in O( E+ V Log(V) ) if you use a min priority queue. This is true only if you implement priority queue with Fibonacci heap, then amortized operation over it will take O(1). Otherwise, if you use any other implementation of priority_queue (like standard C++ STL) it should take E log(E) + V.
  10. 10. Advantage & Disadvantage Disadvantage: Fails in cases where you have a negative edge It has a blind searching method for this it take a huge amount of time.
  11. 11. Run time: For a dance graph it is: O{E+(V*V)} For a sparse graph it is: O(E+ VlogV)
  12. 12. In Future  Using in mapping.  Using in city distance measurement.  Traffic criteria management.  Will use in networking Station distance.  Will use in space distance measurement.
  13. 13. Conclusion • The compute time complexity for each of the Dijkstra’s algorithm are acceptable in items of their overall performance in solving the shortest path problem. All of algorithm produce only one solution.
  14. 14. Thank you honorable Teacher Nazia Hossain(Briti) Prepared by : Dweep sarker Mohibulla Noman CSE 052 06625 CSE 052 06646

×