Question

Apply Dijkstra's algorithm to find the shortest distance from vertex 0 to every other vertex in...


Apply Dijkstra's algorithm to find the shortest distance from vertex 0 to every other vertex in the graph shown in Figure 1 below. You must show supporting. You need to list the paths and the minimum distances. 

image.png

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

Vertex 0 is selected as the source.

  • Relaxing all the outgoing edges from the vertex 0.
  • Relaxing all the outgoing edges from the vertex 4.

  • Relaxing all the outgoing edges from the vertex 1.

  • Relaxing all the outgoing edges from the vertex 5.

  • Relaxing all the outgoing edges from the vertex 7.

  • Relaxing all the outgoing edges from the vertex 2.

  • Relaxing all the outgoing edges from the vertex 3.

  • Relaxing all the outgoing edges from the vertex 9.

  • Relaxing all the outgoing edges from the vertex 6.

  • Relaxing all the outgoing edges from the vertex 8.

  • Relaxing all the outgoing edges from the vertex 10.

  • All the outgoing edges from vertex 10 has been relaxed. This is the final Single source shortest path(SSSP) tree.

    All the edges in orange are part of the SSSP tree.
VERTEX DISTANCE FROM SOURCE VERTEX 0 SHORTEST PATH FROM THE SOURCE
0 0 0
1 4 0 - 4 - 1
2 5 0 - 4 - 5 - 2
3 7 0 - 4 - 5 - 2 - 3
4 1 0 - 4
5 4 0 - 4 - 5
6 8 0 - 4 - 5 - 9 - 6
7 4 0 - 7
8 8 0 - 7 - 8
9 7 0 - 4 - 5 - 7
10 10 0 - 4 - 5 - 2 - 3 - 10
Add a comment
Know the answer?
Add Answer to:
Apply Dijkstra's algorithm to find the shortest distance from vertex 0 to every other vertex in...
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