0

I am trying to do as many examples as I can to practice Dijkstra's Algorithm however, I am confused with this particular problem as I do not know how to go about it. To solve questions like these, how should I go about them? I tried to follow online powerpoint presentations however the graph algorithms are only making me more confused.

This is the specific question I'd like to know how to go about step-by-step for better understanding:

Using Dijkstra’s algorithm, for the following digraph, find the shortest path from 0 to each of other four nodes.

digraph

Thank you in advance for your time and patience.

4
  • I'm not sure I understand the question. Do you mean how OSPF and ISIS run the algorithm?
    – Ron Maupin
    Dec 12 '17 at 19:51
  • @RonMaupin I have to indicate the shortest path that connects each node, starting from 0; along with the cost (by adding the values assigned to each link after finding the shortest path. I was trying to learn through this but I got confused: slideshare.net/ami_01/dijkstras-algorithm-7716656
    – justoneday
    Dec 12 '17 at 19:55
  • 3
    Looks like homework to me...
    – Zac67
    Dec 12 '17 at 21:42
  • @Zac67 nope. Wasn't homework. All I wanted was explanation since I was going through a review sheet yesterday and couldn't solve this one. Thanks anyways though.
    – justoneday
    Dec 13 '17 at 17:15
1

OSPF and ISIS routers advertise the networks about which they know to their neighbors, including the cost to reach the networks. As the network advertisement gets farther from the originating router, the costs of each hop are added in by the intervening hops. A router may receive several routes to the destination network, and it installs the route with the lowest cost in its routing table. The router will have all the routes to the destination network in its database, so if the current best route goes away, the next best route can be installed.

1
  • Thank you for explaining this, it helped me understand the whole process and visualize Dijkstra's algorithm. :)
    – justoneday
    Dec 13 '17 at 17:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.