Hey,

I havnt done dijkstra for a while and im having trouble understanding the universities notes etc.

For a very simple graph, nodes 1, 2, 3

{1,2} = length 2

{1, 3} = length 3

{2, 3} = length 2

Now, naturally, i'd have though Dijkstra's spanning tree starting from node 3 would be {2, 3} + {1,3} = 5

However, via table:

Nodes:

1 2 3

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

3 | 30 | Lowest is 2 so i highlight this. And write node 2 in next row2

2 |2 | lowest is 22

However this gives a spanning tree of {1,2}, {2, 3} = 4.

And whilst this is lower, i'd have thought it'd be the other...

What am i doing wrong? I have a feeling it's the table and i should be adding something to the values and checking each node, rather then selecting the lowest and taking the row it is in.