Problem: Find the shortest path from V0 to each of the other vertices in this example weighted undirected graph:
The shortest distance from V0 to itself is clearly 0.
The shortest distance from V0 to the other vertices will be determined incrementally.
At each step we will discover one more vertex whose shortest distance from V0 is known as well as the path from V0.