Finding the Diameter in Real-World Graphs

Experimentally Turning a Lower Bound into an Upper Bound
  • Pierluigi Crescenzi
  • Roberto Grossi
  • Claudio Imbrenda
  • Leonardo Lanzi
  • Andrea Marino
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6346)


The diameter of an unweighted graph is the maximum pairwise distance among its connected vertices. It is one of the main measures in real-world graphs and complex networks. The double sweep is a simple method to find a lower bound for the diameter. It chooses a random vertex and performs two breadth-first searches (BFSes), returning the maximum length among the shortest paths thus found. We propose an algorithm called fringe, which uses few BFSes to find a matching upper bound for almost all the graphs in our dataset of 44 real-world graphs. In the few graphs it cannot, we perform an exhaustive search of the diameter using a cluster of machines for a total of 40 cores. In all cases, the diameter is surprisingly equal to the lower bound found after very few executions of the double sweep method. The lesson learned is that the latter can be used to find the diameter of real-world graphs in many more cases than expected, and our fringe algorithm can quickly validate this finding for most of them.


Collaboration Network Input Graph Connected Vertex Default Case Patent Citation Network 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Alegre, I., Fiol, M., Yebra, J.: Some large graphs with given degree and diameter. J. Graph Theory 10, 219–224 (1986)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Boldi, P., Vigna, S.: Webgraph (2001),
  3. 3.
    Boldi, P., Vigna, S.: The WebGraph framework I: Compression techniques. In: Proc. of the 13th International World Wide Web Conference, pp. 595–601 (2004)Google Scholar
  4. 4.
    Brandes, U., Erlebach, T.: Network Analysis: Methodological Foundations. Springer, Heidelberg (2005)zbMATHGoogle Scholar
  5. 5.
    Complexnetworks Team: Complex networks and real-world graphs (2008),
  6. 6.
    Corneil, D.G., Dragan, F.E., Habib, M., Paul, C.: Diameter determination on restricted graph families. Discrete Appl. Math. 113(2-3), 143–166 (2001)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Faloutsos, C.: Graph mining: Patterns, generators and tools. In: Combinatorial Pattern Matching, p. 274 (2009)Google Scholar
  8. 8.
    Handler, G.: Minimax location of a facility in an undirected tree graph. Transportation Science 7(287–293) (1973)Google Scholar
  9. 9.
    IMDB: The internet movie database (1990),
  10. 10.
    Leskovec, J.: Stanford Network Analysis Package (SNAP) Website (2009),
  11. 11.
    Library, S.L.D.: Citeseer Website (1997),
  12. 12.
    Magnien, C., Latapy, M., Habib, M.: Fast computation of empirically tight bounds for the diameter of massive graphs. J. Exp. Algorithmics 13 (2009)Google Scholar
  13. 13.
    Massa, P., Souren, K.: Trustlet Website (2007),
  14. 14.
    Mehlhorn, K., Meyer, U.: External-memory breadth-first search with sublinear i/o. In: Proceedings of the 10th Annual European Symposium on Algorithms, pp. 723–735 (2002)Google Scholar
  15. 15.
    Sommer, C.: Christian sommer’s homepage (2009),
  16. 16.
    Zwick, U.: Exact and approximate distances in graphs - a survey. In: Meyer auf der Heide, F. (ed.) ESA 2001. LNCS, vol. 2161, pp. 33–48. Springer, Heidelberg (2001)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Pierluigi Crescenzi
    • 1
  • Roberto Grossi
    • 2
  • Claudio Imbrenda
    • 2
  • Leonardo Lanzi
    • 1
  • Andrea Marino
    • 1
  1. 1.Dipartimento di Sistemi e InformaticaUniversità di Firenze 
  2. 2.Dipartimento di InformaticaUniversità di Pisa 

Personalised recommendations