shortest paths as we saw in section the breadth-first search strategy can be used to find shortest path from some starting vertex to every other vertex in connected graph this approach makes sense in cases where each edge is as good as any otherbut there are many situations where this approach is not appropriate for examplewe might want to use graph to represent the roads between citiesand we might be interested in finding the fastest way to travel cross-country in this caseit is probably not appropriate for all the edges to be equal to each otherfor some inter-city distances will likely be much larger than others likewisewe might be using graph to represent computer network (such as the internet)and we might be interested in finding the fastest way to route data packet between two computers in this caseit again may not be appropriate for all the edges to be equal to each otherfor some connections in computer network are typically much faster than others (for examplesome edges might represent low-bandwidth connectionswhile others might represent high-speedfiber-optic connectionsit is naturalthereforeto consider graphs whose edges are not weighted equally weighted graphs weighted graph is graph that has numeric (for exampleintegerlabel (eassociated with each edge ecalled the weight of edge for (uv)we let notation (uvw(ewe show an example of weighted graph in figure bos ord sfo jfk lax dfw mia figure weighted graph whose vertices represent major airports and whose edge weights represent distances in miles this graph has path from jfk to lax of total weight , (going through ord and dfwthis is the minimumweight path in the graph from jfk to lax