A path in a graph is sequence of vertices such that there is an edge that we can follow between each consecutive pair of vertices.
Shortest path from vertex v to vertex w is a path for which the sum of the weights of the arcs or edges on the path is minimum.
We have a single source vertex and we seek a shortest path from this source vertex v to every other vertex of the graph. It is called single source shortest path problem.
1) AFDEH = 1 + 3 + 4 + 6 = 14
2) ABCEH. = 2+2+3+6 = 13. Shortest path is 2 one.
A tree T is a spanning tree of a connected graph G(V,E) such that
1) Every vertex of G (Graph) belongs to an edge in T and
2) The edges in T form a tree.