Suppose source was A:
| Next To Do | Certain | Pathlength (from source) | Pathpred |
| Of: D Is: 20
Of: E Is: 15 |
Of: D Is: A
Of: E Is: A | ||
| Of: B Is: 45
Of: D Is: 25 - keep 20 Of: T Is: 40 |
Of: B Is: E
Of: D Is: still A Of: T Is: E | ||
| Of: T Is: 35 | Of: T Is: D | ||
| Of: no neighbors | Of: T Is: D | ||
| Of: A Is: 55 Of: D Is: 70 - keep 20! |
Of: A Is: source? What? Of: D Is: still A |
But, daaa...obviously they wanted us to start at the node with no label (sigh). Nonetheless IF A were the source, backtrack on the Pathpred from T and
see the backward path is T - D - A, so the shortest path from A to T is A-D-T
OK try with the right start state: Call the node on the far left S
| Next To Do | Certain | Pathlength | Pathpred |
| Of: A Is: 15
Of: B Is: 2 |
Of: A Is: S
Of: B Is: S | ||
| Of: A Is: 12
Of: D Is: 27 |
Of: A Is: B
Of: D Is: B | ||
| Of: D Is: 32 - keep 27
Of: E Is: 27 |
Of: D Is: same as above
Of: E Is: A |
Notice how at this point, any path through A will go to B first. The link <S,A> will never be used. Greedy.
Similarly, at this point any link to D will not use path <S,A>, <A,D> but rather will go through B: <S,B>, <B,D>. Greedy.
Note, also, that these paths are determined to be the shortest from this point S no matter how much further we go on the graph (they are "Certain" ... in the Set of vertices that have been looked at so far)
You can finish. (or look here)