Definition. Weighted graph [00NN]

A weighted (directed or undirected) graph is a graph where each edge is assigned a weight. That is, formally, there is a function w : E \to W which assigns to each edge e \in E a weight w(e) taken from a suitable set of weights W. The weight of an edge (u,v) is also denoted w(u,v) or w_{uv}.

The weight or length of a path is just the sum of the weights of its edges.