Question

Question III - Shortest Path [30 Points! You wish to take a flight from city A to city I. The following graph shows the diffe

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

Dear student,

Djikstra's Algorithm for shortest path calculation is a Greedy Approach of finding out the shortest path from any one vertex in a graph to all other vertices.

In this method, we first assign the directly connected nodes to the first node the cost of their path, and set all other nodes cost to infinity. Then, one by one we travel to each shortest connected node and check if the path from the first node to the destination node via the intermediate node is shortest or not. If it is shortest then we reassign the cost at that destination vertex.

For the given graph, let us see the table:

35 25 А 65 65 95 50 80 65 70 B. G I 30 55 65 E 20 H

Table: Step o 0 8 8 8 1 2 3 4 Selected verter B с E F H T А С 165135 65 35 160185 B. 165 35 60 1850 125 e 165|35 145 195 60 1

b. As we can see above that the shortest path from city A to city I will cost 125.

The path is:

A-C-F-I

-------------------------------------------------------------------------------------------------------------------------------------------------

I hope the given solution helps clear your doubt.

Don't forget to give it a thumbs up.

Regards

Add a comment
Know the answer?
Add Answer to:
Question III - Shortest Path [30 Points! You wish to take a flight from city 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