Home Preparation for National Talent Search Examination (NTSE)/ Olympiad
Chapter : Graph Theory
Labeled and Weighted Graph
A graph which has labels associated with each edge or each vertex. A graph having a weight, or number, associated with each edge. Some algorithms require all weights to be non negative, integral, positive, etc.
A Graph G is called a labeled graph if its edges or vertices are assigned data of one kind of other. In particular, graph G is called a weighted graph if each of the edge e of a graph G is allotted a non-negative number (positive real number) (/kukRed la[;k )is known the weight or the length of V.
Figure shows weighted graph where the weight of each edge is given. The weight of path is to be calculated by the sum of the weighted or length of the edges of a path.
One of the most important problems in a graph theory is to find the shortest path i.e. a path of a minimum length between the two vertices. The Length of the shortest path between D to A is 15.