Distance in a Graph

Distance in a graph isn't measured in inches or kilmoters. This isn't surprising, because you don't do any measuring in inches or kilometers when you draw a graph in the first place.

Still, when you look at a graph, you can see how it might be possible to say that some vertices are closer together then others.

The distance between two vertices is a count of the number of edges along which you must travel to get from one of the verticesto the other.

If there is more than one path between two vertices, the number of edges in the shortest path is the distance.

The number of edges in a path is called the length of the path.