Consider a connected, undirected network with one special node, called the source (or root).
Associated with each edge is a distance, a nonnegative number. The objective is to find the set of
edges connecting all nodes such that the sum of the edge lengths from the source to each node is
minimized. We call it a shortest-paths tree (SPT) rooted at the source.