Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CS253: Shortest Path Algorithms (2019)

119 views

Published on

https://github.com/emory-courses/cs253

Published in: Technology
  • Be the first to comment

  • Be the first to like this

CS253: Shortest Path Algorithms (2019)

  1. 1. Shortest Path Algorithm Data Structures and Algorithms Emory University Jinho D. Choi
  2. 2. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 92 3 3 4 Dijkstra's Algorithm
  3. 3. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 S T 2 3 3 4 Dijkstra's Algorithm
  4. 4. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous S T 2 3 3 4 Dijkstra's Algorithm
  5. 5. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T Visited 2 3 3 4 Dijkstra's Algorithm
  6. 6. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 (5, 0) ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 2 3 3 4 Dijkstra's Algorithm
  7. 7. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 5 2 3 3 4 Dijkstra's Algorithm
  8. 8. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 (3, 3)5 5 2 3 3 4 Dijkstra's Algorithm
  9. 9. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 (3, 3)5 5 2 3 3 4 Dijkstra's Algorithm
  10. 10. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 (3, 3)5 5 9 5 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  11. 11. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 5 9 5 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  12. 12. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13)9 5 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  13. 13. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13)9 5 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  14. 14. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) (4, 7) 97 53 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  15. 15. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 (4, 9) 2 3 3 4 Dijkstra's Algorithm
  16. 16. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 (4, 9) 10 4 (2, 10) 2 3 3 4 Dijkstra's Algorithm
  17. 17. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 10 4 (2, 10) 2 3 3 4 Dijkstra's Algorithm
  18. 18. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 10 4 2 2 3 3 4 Dijkstra's Algorithm
  19. 19. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 10 4 2 12 2 (0, 12) 2 3 3 4 Dijkstra's Algorithm
  20. 20. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 10 4 2 12 2 (0, 12) 2 3 3 4 Dijkstra's Algorithm
  21. 21. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 (1, 13) 4 97 53 10 4 2 12 2 0 2 3 3 4 Dijkstra's Algorithm
  22. 22. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  23. 23. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  24. 24. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  25. 25. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  26. 26. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  27. 27. Emory University Logo Guidelines - 2 0 1 2 3 4 5 4 5 10 9 ∞ ∞ ∞ ∞ ∞ ∞ 0 1 2 3 4 5 Distance ∅ ∅ ∅ ∅ ∅ ∅Previous Queue S T 0 Visited 3 5 3 13 53 4 97 53 10 4 2 12 2 0 2 3 3 4 1 Dijkstra's Algorithm
  28. 28. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited 21 12 4
  29. 29. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 21 12 4
  30. 30. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 (3, 0) 21 12 4
  31. 31. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 12 4
  32. 32. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 (1, 1)12 4
  33. 33. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 (1, 1)12 4
  34. 34. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 (1, 1) 2 3 (2, 2) 12 4
  35. 35. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 (2, 2) 1 12 4
  36. 36. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 (2, 2)1 3 1 (0, 3) 12 4
  37. 37. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 (0, 3) 2 12 4
  38. 38. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  39. 39. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  40. 40. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  41. 41. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  42. 42. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  43. 43. Emory University Logo Guidelines - Dijkstra's Algorithm 3 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 21 3 1 3 2 3 1 3 1 2 0 12 4
  44. 44. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited 1 1 2 2 -4
  45. 45. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 1 1 2 2 -4
  46. 46. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 (3, 0)1 1 2 2 -4
  47. 47. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 2 2 -4
  48. 48. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 (1, 1) 2 2 -4
  49. 49. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 (1, 1) 2 2 -4
  50. 50. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 (1, 1) 2 3 (2, 2) 2 2 -4
  51. 51. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 (2, 2) 1 2 2 -4
  52. 52. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 (2, 2)1 3 1 (0, 3) 2 2 -4
  53. 53. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 (0, 3) 2 2 2 -4
  54. 54. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 (0, 3) 2 -2 2 (1, -2) 2 2 -4
  55. 55. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 (0, 3) 2 -2 2 2 2 -4
  56. 56. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 2 0 -2 2 2 2 -4
  57. 57. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 2 0 -2 2 2 2 -4
  58. 58. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 2 0 -2 2 2 2 -4
  59. 59. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 2 0 -2 2 2 2 -4
  60. 60. Emory University Logo Guidelines - Dijkstra's Algorithm 4 1 0 3 2 ∅∅∅∅Previous ∞∞∞∞Distance 0 1 2 3 QueueVisited TS 0 1 1 3 1 3 2 3 1 3 1 2 0 -2 2 2 2 -4
  61. 61. Emory University Logo Guidelines - Vertex Distance Pair 5 private class VertexDistancePair implements Comparable<VertexDistancePair> { public int vertex; public double distance; public VertexDistancePair(int vertex, double distance) { this.vertex = vertex; this.distance = distance; } @Override public int compareTo(VertexDistancePair p) { double diff = this.distance - p.distance; if (diff > 0) return 1; if (diff < 0) return -1; return 0; } }
  62. 62. Emory University Logo Guidelines - Dijkstra's Algorithm 6 public Integer[] getShortestPath(Graph graph, int source, int target) { PriorityQueue<VertexDistancePair> queue = new PriorityQueue<>(); Integer[] previous = new Integer[graph.size()]; double[] distances = new double[graph.size()]; Set<Integer> visited = new HashSet<>(); init(distances, previous, target); queue.add(new VertexDistancePair(target, distances[target])); while (!queue.isEmpty()) { // To be filled. } return previous; }
  63. 63. Emory University Logo Guidelines - Dijkstra's Algorithm 6 public Integer[] getShortestPath(Graph graph, int source, int target) { PriorityQueue<VertexDistancePair> queue = new PriorityQueue<>(); Integer[] previous = new Integer[graph.size()]; double[] distances = new double[graph.size()]; Set<Integer> visited = new HashSet<>(); init(distances, previous, target); queue.add(new VertexDistancePair(target, distances[target])); while (!queue.isEmpty()) { // To be filled. } return previous; }
  64. 64. Emory University Logo Guidelines - Dijkstra's Algorithm 6 public Integer[] getShortestPath(Graph graph, int source, int target) { PriorityQueue<VertexDistancePair> queue = new PriorityQueue<>(); Integer[] previous = new Integer[graph.size()]; double[] distances = new double[graph.size()]; Set<Integer> visited = new HashSet<>(); init(distances, previous, target); queue.add(new VertexDistancePair(target, distances[target])); while (!queue.isEmpty()) { // To be filled. } return previous; }
  65. 65. Emory University Logo Guidelines - Dijkstra's Algorithm 7 private void init(double[] distances, Integer[] previous, int target) { for (int i=0; i<distances.length; i++) { if (i == target) distances[i] = 0; else { distances[i] = Double.MAX_VALUE; previous[i] = null; } } }
  66. 66. Emory University Logo Guidelines - Dijkstra's Algorithm 7 private void init(double[] distances, Integer[] previous, int target) { for (int i=0; i<distances.length; i++) { if (i == target) distances[i] = 0; else { distances[i] = Double.MAX_VALUE; previous[i] = null; } } }
  67. 67. Emory University Logo Guidelines - 8 while (!queue.isEmpty()) { VertexDistancePair u = queue.poll(); visited.add(u.vertex); for (Edge edge : graph.getIncomingEdges(u.vertex)) { int v = edge.getSource(); if (!visited.contains(v)) { double dist = distances[u.vertex] + edge.getWeight(); if (dist < distances[v]) { distances[v] = dist; previous [v] = u.vertex; queue.add(new VertexDistancePair(v, dist)); } } } }
  68. 68. Emory University Logo Guidelines - 8 while (!queue.isEmpty()) { VertexDistancePair u = queue.poll(); visited.add(u.vertex); for (Edge edge : graph.getIncomingEdges(u.vertex)) { int v = edge.getSource(); if (!visited.contains(v)) { double dist = distances[u.vertex] + edge.getWeight(); if (dist < distances[v]) { distances[v] = dist; previous [v] = u.vertex; queue.add(new VertexDistancePair(v, dist)); } } } } Complexity?
  69. 69. Emory University Logo Guidelines - Dijkstra's vs A* 9 private void init(double[] distances, Integer[] previous, int target) { for (int i=0; i<distances.length; i++) { if (i == target) distances[i] = 0; else { distances[i] = Double.MAX_VALUE; previous[i] = null; } } }
  70. 70. Emory University Logo Guidelines - Dijkstra's vs A* 9 private void init(double[] distances, Integer[] previous, int target) { for (int i=0; i<distances.length; i++) { if (i == target) distances[i] = 0; else { distances[i] = Double.MAX_VALUE; previous[i] = null; } } } + heuristic(i, target);
  71. 71. Emory University Logo Guidelines - 10 while (!queue.isEmpty()) { VertexDistancePair u = queue.poll(); visited.add(u.vertex); for (Edge edge : graph.getIncomingEdges(u.vertex)) { int v = edge.getSource(); if (!visited.contains(v)) { double dist = distances[u.vertex] + edge.getWeight(); if (dist < distances[v]) { distances[v] = dist; previous [v] = u.vertex; queue.add(new VertexDistancePair(v, dist)); } } } }
  72. 72. Emory University Logo Guidelines - 10 while (!queue.isEmpty()) { VertexDistancePair u = queue.poll(); visited.add(u.vertex); for (Edge edge : graph.getIncomingEdges(u.vertex)) { int v = edge.getSource(); if (!visited.contains(v)) { double dist = distances[u.vertex] + edge.getWeight(); if (dist < distances[v]) { distances[v] = dist; previous [v] = u.vertex; queue.add(new VertexDistancePair(v, dist)); } } } } + heuristic(v, target);
  73. 73. Emory University Logo Guidelines - A* Abstract Class 11 public abstract class AStar { public Integer[] getShortestPath(Graph graph, int source, int target) { PriorityQueue<VertexDistancePair> queue = new PriorityQueue<>(); Integer[] previous = new Integer[graph.size()]; double[] distances = new double[graph.size()]; Set<Integer> visited = new HashSet<>(); ... return previous; } } protected abstract double heuristic(int source, int target);
  74. 74. Emory University Logo Guidelines - Dijkstra’s Algorithm 12 public class Dijkstra extends AStar { @Override protected double heuristic(int source, int target) { return 0; } }

×