Elsevier

Theoretical Computer Science

Volume 514, 25 November 2013, Pages 84-95
Theoretical Computer Science

On computing the diameter of real-world undirected graphs

https://doi.org/10.1016/j.tcs.2012.09.018Get rights and content
Under an Elsevier user license
open archive

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.

Keywords

Breadth-first search
Diameter
Complex network
Experimental analysis

Cited by (0)

This research was supported in part by funds of the following projects or institutions: “DISCO” PRIN (National Research Project), “AlgoDEEP” PRIN (National Research Project), Florence section of INFN (National Institute of Nuclear Physics).