My presentation all shortestpath
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
519
On Slideshare
519
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. All-Pairs Shortest Path Theory and Algorithms Carlos Andres Theran SuarezProgram Mathematics and Scientific Computing University of Puerto Rico Carlos.theran@upr.edu October – 2011 Mayaguez-Puerto Rico Dr Marko Schütz
  • 2. Introduction
  • 3. Recall
  • 4. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 5. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 6. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 7. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 8. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 9. What do you think?Can we solve all-pair shortest paths by running asingle source-paths algorithms?
  • 10. Predecessor Matrix
  • 11. Predecessor Matrix
  • 12. Outline1. Present a dynamic programming algorithms based on matrix multiplication to solve the problem.2. Dynamic programming algorithms called Floyd-Warshall algorithms.3. Unlike the others algorithms, Johnsons algorithms used adjacency-list representation of a graph.
  • 13. Shortest path and matrix multiplication
  • 14. Shortest path and matrix multiplication (cont.)
  • 15. Shortest path and matrix multiplication (cont.)
  • 16. Shortest path and matrix multiplication (cont.)
  • 17. Shortest path and matrix multiplication (cont.)
  • 18. Shortest path and matrix multiplication (cont.)
  • 19. Shortest path and matrix multiplication (cont.)
  • 20. Shortest path and matrix multiplication (cont.)
  • 21. The Floyd-Warshall algorithm
  • 22. The Floyd-Warshall algorithm (cont)
  • 23. The Floyd-Warshall algorithm (cont)
  • 24. The Floyd-Warshall algorithm (cont)
  • 25. The Floyd-Warshall algorithm (cont)
  • 26. The Floyd-Warshall algorithm (cont)
  • 27. Johnsons algorithm for sparse graphs.• It is asymtoticaly better than repeated squaring of matrices or the Floyd-Warshall algoritm.• It use a subroutine both Dijkstra’s algorithm and Bellman- Ford algorithm.• Johnsons algorithm use the technique of reweighting.
  • 28. Johnsons algorithm for sparse graphs (cont.).
  • 29. Johnsons algorithm for sparse graphs (cont.).
  • 30. Johnsons algorithm for sparse graphs (cont.).• Producing no negative weight by reweighting
  • 31. Johnsons algorithm for sparse graphs (cont.).
  • 32. Johnsons algorithm for sparse graphs (cont.).