Question

Dijkstras Algorithm Shortest paths with negative weights: failed examples! 4 Dijkstras Algorithm А. B A FO то TO то TO 2 6

Wouldn't the Dijkstra algorithm visit the negative edge if the weights were changed as follows; A > B = 1, B > C = 2, A > D = 4?

I assume that the algorithm goes as follows, Node A is known, shortest path is to Node B at weight 1, and then it goes to Node C because of the smallest weight being 3, and then it would visit Node D via the negative weighted edge.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

B A B A 2 4 => ou C A 4 B 3 4 C -64 > A-)B - C - D is the path it does visit the node as per you.

Add a comment
Know the answer?
Add Answer to:
Wouldn't the Dijkstra algorithm visit the negative edge if the weights were changed as follows; A...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT