Shortest path is a > c > d > e > g > z. When I go through the algorithm on paper I end up with a > c > b > d > e > g > z. This happens on iteration k = 2, when u is updated with the element of V that has the shortest distance from a (in this case b). This adds b to the path which makes it longer than the shortest path. I must be missing something here. Any help is appreciated.
#Dijkstra’s Algorithm help..
4 messages · Page 1 of 1 (latest)
- Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
- Wait patiently for a helper to come along.
- Once someone helps you, say thank you and close the thread with:
+close - Feel free to nominate the person for helper of the week in #helper-nominations
- Do not ping the mods, unless someone is breaking the rules.
- If you're happy with the help you got here, and the server overall, you can contribute financially as well:
+close