Nowadays, Diameter (graph theory) is a topic that has gained relevance in various areas. From politics to science, Diameter (graph theory) has become a point of interest for researchers, activists, and citizens in general. With the advancement of technology and globalization, Diameter (graph theory) has acquired a dimension never seen before, impacting not only the way we interact with our environment, but also our perception of the world. In this article, we will explore different aspects related to Diameter (graph theory), from its origins to its impact on modern society.
In graph theory, the diameter of a connected undirected graph is the farthest distance between any two of its vertices. That is, it is the diameter of a set for the set of vertices of the graph, and for the shortest-path distance in the graph. Diameter may be considered either for weighted or for unweighted graphs. Researchers have studied the problem of computing the diameter, both in arbitrary graphs and in special classes of graphs.
The diameter of a disconnected graph may be defined to be infinite, or undefined.
The degree diameter problem seeks tight relations between the diameter, number of vertices, and degree of a graph. One way of formulating it is to ask for the largest graph with given bounds on its degree and diameter. For any fixed degree, this maximum size is exponential in diameter, with the base of the exponent depending on the degree.[1]
The girth of a graph, the length of its shortest cycle, can be at most for a graph of diameter . The regular graphs for which the girth is exactly are the Moore graphs. Only finitely many Moore graphs exist, but their exact number is unknown. They provide the solutions to the degree diameter problem for their degree and diameter.[2]
Small-world networks are a class of graphs with low diameter, modeling the real-world phenomenon of six degrees of separation in social networks.[3]
The diameter of a graph can be computed by using a shortest path algorithm to compute shortest paths between all pairs of vertices, and then taking the maximum of the distances that it computes. For instance, in a graph with positive edge weights, this can be done by repeatedly using Dijkstra's algorithm, once for each possible starting vertex. In a graph with vertices and edges, this takes time . Computing all-pairs shortest paths is the fastest known method for computing the diameter of a weighted graph exactly.[4]
In an unweighted-graph, Dijkstra's algorithm may be replaced by a breadth-first search, giving time . Alternatively, the diameter may be computed using an algorithm based on fast matrix multiplication, in time proportional to the time for multiplying matrices, approximately using known matrix multiplication algorithms.[5] For sparse graphs, with few edges, repeated breadth-first search is faster than matrix multiplication. Assuming the strong exponential time hypothesis, repeated breadth-first search is near-optimal: this hypothesis implies that no algorithm can achieve time for any .[4]
It is possible to approximate the diameter of a weighted graph to within an approximation ratio of 3/2, in time , where the notation hides logarithmic factors in the time bound.[6] Under the exponential time hypothesis, no substantially more accurate approximation, substantially faster than all pairs shortest paths, is possible.[4]
The diameter can be computed in linear time for interval graphs,[7] and in near-linear time for graphs of bounded treewidth.[8] In median graphs, the diameter can be found in the subquadratic time bound .[9] In any class of graphs closed under graph minors, such as the planar graphs, it is possible to compute the diameter in subquadratic time, with an exponent depending on the graph family.[10]