Graph Representation
Shortest path representation
Edge relaxation
Manually performing Dijkstra's algorithm, Acyclic Shortest Paths algorithm, and Bellman-Ford algorithm. These should be very easy to manully execute.
Dijkstra's algorithm
Acyclic shortest paths
Bellman-Ford algorithm
edge | weight | edge | weight |
---|---|---|---|
0 --> 2 | 6.0 | 5 --> 1 | 12.0 |
0 --> 4 | 6.0 | 5 --> 2 | 1.0 |
0 --> 5 | 17.0 | 5 --> 4 | 3.0 |
1 --> 3 | 17.0 | 5 --> 7 | 10.0 |
2 --> 5 | 11.0 | 5 --> 8 | 4.0 |
2 --> 7 | 6.0 | 6 --> 0 | 12.0 |
3 --> 0 | 1.0 | 6 --> 1 | 5.0 |
3 --> 10 | 3.0 | 6 --> 2 | 1.0 |
3 --> 1 | 25.0 | 6 --> 4 | 9.0 |
3 --> 6 | 13.0 | 6 --> 9 | 4.0 |
3 --> 8 | 9.0 | 7 --> 1 | 7.0 |
4 --> 5 | 3.0 | 7 --> 5 | 11.0 |
4 --> 6 | 4.0 | 7 --> 9 | 6.0 |
4 --> 7 | 3.0 | 10 --> 1 | 15.0 |
4 --> 8 | 1.0 | 10 --> 5 | 2.0 |
4 --> 9 | 15.0 | 10 --> 8 | 7.0 |
Dijkstra in progress v distTo[] edgeTo[] 0 1.0 3 --> 0 1 17.0 5 --> 1 2 6.0 5 --> 2 3 0.0 null 4 7.0 0 --> 4 5 5.0 10 --> 5 6 13.0 3 --> 6 7 12.0 2 --> 7 8 9.0 3 --> 8 9 8 null 10 3.0 3 --> 10