# Dijkstra's Algorithm Problem

• Mar 17th 2013, 09:51 AM
venomphil
Dijkstra's Algorithm Problem
Hi Maths Help Forum,

I have a problem which I have tried to solve with Dijkstra's Algorithm - As this is the first time I have used Dijkstra's I am unsure if I am correct, my solution seems too simple :P

 O A B C D E H O - 9 - - - 7 - A - - 3 2 - - - B - - - 7 - 3 - C - - - - 6 - 7 D - - - 6 - - 5 E - 4 3 - - - 2 H - - - - - - -

 O A B C D E H E 9(O) ∞ ∞ ∞ 7(O) ∞ E 9(O) 10(E) ∞ ∞ 7(O) 9(E) H 9(O) 10(E) ∞ ∞ 7(O) 9(E) A 9(O) 10(E) 11(A) ∞ 7(O) 9(E) B 9(O) 10(E) 11(A) ∞ 7(O) 9(E) C 9(O) 10(E) 11(A) 17(C) 7(O) 9(E) D 9(O) 10(E) 11(A) 17(C) 7(O) 9(E)

Do we have any Dijkstra experts that could give me a few pointers?
Any help is much appreciated and would set my mind at rest - been thinking about this non stop over the last few days (Nerd)
• Mar 17th 2013, 12:52 PM
venomphil
Re: Dijkstra's Algorithm Problem
Think this diagram might help :)

Attachment 27579
• Mar 17th 2013, 12:59 PM
ILikeSerena
Re: Dijkstra's Algorithm Problem
Hi venomphil! :)

Looks good.
And yes, it is that simple.
But in the last step you seem to have missed the connection from H to D that yields a shorter path to D via H (14).