TOPICS
Search

Graph Diameter


GraphDiameter

The graph diameter of a graph is the length max_(u,v)d(u,v) of the "longest shortest path" (i.e., the longest graph geodesic) between any two graph vertices (u,v), where d(u,v) is a graph distance. In other words, a graph's diameter is the largest number of vertices which must be traversed in order to travel from one vertex to another when paths which backtrack, detour, or loop are excluded from consideration. It is therefore equal to the maximum of all values in the graph distance matrix. The above random graphs on 10 vertices have diameters 3, 4, 5, and 7, respectively.

A disconnected graph has infinite diameter (West 2000, p. 71).

The diameter of a graph may be computed in the Wolfram Language using GraphDiameter[g], and a fast approximation to the diameter by GraphDiameter[g, Method -> "PseudoDiameter"]. Precomputed diameters for many named graphs can be obtained using GraphData[graph, "Diameter"].


See also

Diameter, Graph, Graph Distance, Graph Distance Matrix, Graph Eccentricity, Graph Geodesic, Graph Periphery, Graph Triameter, Moore Graph, Peripheral Point

Explore with Wolfram|Alpha

References

Harary, F. Graph Theory. Reading, MA: Addison-Wesley, p. 14, 1994.Skiena, S. Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica. Reading, MA: Addison-Wesley, p. 107, 1990.West, D. B. Introduction to Graph Theory, 2nd ed. Englewood Cliffs, NJ: Prentice-Hall, 2000.

Referenced on Wolfram|Alpha

Graph Diameter

Cite this as:

Weisstein, Eric W. "Graph Diameter." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/GraphDiameter.html

Subject classifications