On computing the diameter of real-world undirected graphs

  • Authors:
  • Pilu Crescenzi;Roberto Grossi;Michel Habib;Leonardo Lanzi;Andrea Marino

  • Affiliations:
  • Dipartimento di Sistemi e Informatica, Universití degli Studi di Firenze, Viale Morgagni 65, 50134 Firenze, Italy;Dipartimento di Informatica, Universití degli Studi di Pisa, Largo Bruno Pontecorvo 3, 56127 Pisa, Italy;LIAFA, University Paris Diderot - Paris7, 175 rue du Chevaleret, 75013 Paris, France;Dipartimento di Sistemi e Informatica, Universití degli Studi di Firenze, Viale Morgagni 65, 50134 Firenze, Italy;Dipartimento di Sistemi e Informatica, Universití degli Studi di Firenze, Viale Morgagni 65, 50134 Firenze, Italy

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2013

Quantified Score

Hi-index 5.23

Visualization

Abstract

We propose a new algorithm for the classical problem of computing the diameter of undirected unweighted graphs, namely, the maximum distance among all the pairs of nodes, where the distance of a pair of nodes is the number of edges contained in the shortest path connecting these two nodes. Although its worst-case complexity is O(nm) time, where n is the number of nodes and m is the number of edges of the graph, we experimentally show that our algorithm works in O(m) time in practice, requiring few breadth-first searches to complete its task on almost 200 real-world graphs.