definition:
a weighted graph is such that is a graph (directed or not) and is a weight function that gives each edge a value . this value is called the weight or length of the edge
definition:
path length: let be a weighted graph, let be a path in , the length of the path is defined as the sum of weights of the edges in the path: