Graphs of low diameter
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. The girth of a graph, the length of its shortest cycle, can be at most for a graph of diameter . TheAlgorithms
In arbitrary graphs
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. In an unweighted-graph, Dijkstra's algorithm may be replaced by aIn special classes of graphs
The diameter can be computed in linear time for interval graphs, and in near-linear time for graphs of boundedSee also
*References
{{reflist, refs= {{citation , last1 = Amaral , first1 = L. A. N. , last2 = Scala , first2 = A. , last3 = Barthélémy , first3 = M. , last4 = Stanley , first4 = H. E. , date = September 2000 , doi = 10.1073/pnas.200327197 , issue = 21 , journal = Proceedings of the National Academy of Sciences , pages = 11149–11152 , title = Classes of small-world networks , volume = 97, doi-access = free , pmid = 11005838 , arxiv = cond-mat/0001458 {{citation , last1 = Bergé , first1 = Pierre , last2 = Ducoffe , first2 = Guillaume , last3 = Habib , first3 = Michel , doi = 10.1007/s00224-023-10153-9 , issue = 1 , journal = Theory of Computing Systems , mr = 4699679 , pages = 144–193 , title = Subquadratic-time algorithm for the diameter and all eccentricities on median graphs , volume = 68 , year = 2024, arxiv = 2110.02709 {{citation , last1 = Bringmann , first1 = Karl , last2 = Husfeldt , first2 = Thore , last3 = Magnusson , first3 = Måns , doi = 10.1007/s00453-020-00680-z , issue = 8 , journal = Algorithmica , mr = 4132892 , pages = 2292–2315 , title = Multivariate analysis of orthogonal range searching and graph distances , volume = 82 , year = 2020, doi-access = free {{citation , last1 = Chechik , first1 = Shiri , last2 = Larkin , first2 = Daniel H. , last3 = Roditty , first3 = Liam , last4 = Schoenebeck , first4 = Grant , last5 = Tarjan , first5 = Robert Endre , last6 = Vassilevska Williams , first6 = Virginia , editor-last = Chekuri , editor-first = Chandra , contribution = Better approximation algorithms for the graph diameter , doi = 10.1137/1.9781611973402.78 , pages = 1041–1052 , publisher = SIAM , title = Proceedings of the Twenty-Fifth Annual ACM–SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014 , year = 2014, isbn = 978-1-61197-338-9 {{citation , last1 = Cygan , first1 = Marek , last2 = Gabow , first2 = Harold N. , last3 = Sankowski , first3 = Piotr , contribution = Algorithmic applications of Baur-Strassen's theorem: shortest cycles, diameter and matchings , doi = 10.1109/FOCS.2012.72 , pages = 531–540 , publisher = IEEE Computer Society , title = 53rd Annual IEEE Symposium on Foundations of Computer Science, FOCS 2012, New Brunswick, NJ, USA, October 20-23, 2012 , year = 2012, arxiv = 1204.1616 , isbn = 978-0-7695-4874-6 {{citation , last = Dalfó , first = C. , doi = 10.1016/j.laa.2018.12.035 , journal = Linear Algebra and Its Applications , mr = 3901732 , pages = 1–14 , title = A survey on the missing Moore graph , volume = 569 , year = 2019, hdl = 2117/127212 , s2cid = 126689579 , hdl-access = free , url = https://upcommons.upc.edu/bitstream/2117/127212/1/monster%2818oct2017-rev30dec2018%29.pdf {{citation , last1 = Ducoffe , first1 = Guillaume , last2 = Habib , first2 = Michel , last3 = Viennot , first3 = Laurent , arxiv = 1907.04385 , doi = 10.1137/20M136551X , issue = 5 , journal = SIAM Journal on Computing , mr = 4502132 , pages = 1506–1534 , title = Diameter, eccentricities and distance oracle computations on {{mvar, H-minor free graphs and graphs of bounded (distance) Vapnik-Chervonenkis dimension , volume = 51 , year = 2022 {{citation , last1 = Miller , first1 = Mirka , author1-link = Mirka Miller , last2 = Širáň , first2 = Jozef , title = Moore graphs and beyond: A survey of the degree/diameter problem , journal = Electronic Journal of Combinatorics , volume = Dynamic survey , pages = DS14 , year = 2005 , url = http://www.combinatorics.org/ojs/index.php/eljc/article/download/DS14/pdf {{citation , last = Olariu , first = Stephan , doi = 10.1080/00207169008803870 , issue = 3–4 , journal = Int. J. Comput. Math. , pages = 121–128 , title = A simple linear-time algorithm for computing the center of an interval graph , volume = 34 , year = 1990 {{citation , last1 = Roditty , first1 = Liam , last2 = Vassilevska Williams , first2 = Virginia , author2-link = Virginia Vassilevska Williams , editor1-last = Boneh , editor1-first = Dan , editor2-last = Roughgarden , editor2-first = Tim , editor3-last = Feigenbaum , editor3-first = Joan , contribution = Fast approximation algorithms for the diameter and radius of sparse graphs , doi = 10.1145/2488608.2488673 , pages = 515–524 , publisher = Association for Computing Machinery , title = Symposium on Theory of Computing Conference, STOC'13, Palo Alto, CA, USA, June 1-4, 2013 , year = 2013, isbn = 978-1-4503-2029-0 Graph distance Graph invariants Computational problems in graph theory