English

Approximating the diameter of a graph

Data Structures and Algorithms 2012-07-17 v1 Computational Complexity

Abstract

In this paper we consider the fundamental problem of approximating the diameter DD of directed or undirected graphs. In a seminal paper, Aingworth, Chekuri, Indyk and Motwani [SIAM J. Comput. 1999] presented an algorithm that computes in \Ot(mn+n2)\Ot(m\sqrt n + n^2) time an estimate D^\hat{D} for the diameter of an nn-node, mm-edge graph, such that 2/3DD^D\lfloor 2/3 D \rfloor \leq \hat{D} \leq D. In this paper we present an algorithm that produces the same estimate in \Ot(mn)\Ot(m\sqrt n) expected running time. We then provide strong evidence that a better approximation may be hard to obtain if we insist on an O(m2\eps)O(m^{2-\eps}) running time. In particular, we show that if there is some constant \eps>0\eps>0 so that there is an algorithm for undirected unweighted graphs that runs in O(m2\eps)O(m^{2-\eps}) time and produces an approximation D^\hat{D} such that (2/3+\eps)DD^D (2/3+\eps) D \leq \hat{D} \leq D, then SAT for CNF formulas on nn variables can be solved in O((2δ)n)O^{*}((2-\delta)^{n}) time for some constant δ>0\delta>0, and the strong exponential time hypothesis of [Impagliazzo, Paturi, Zane JCSS'01] is false. Motivated by this somewhat negative result, we study whether it is possible to obtain a better approximation for specific cases. For unweighted directed or undirected graphs, we show that if D=3h+zD=3h+z, where h0h\geq 0 and z0,1,2z\in {0,1,2}, then it is possible to report in O~(minm2/3n4/3,m21/(2h+3))\tilde{O}(\min{m^{2/3} n^{4/3},m^{2-1/(2h+3)}}) time an estimate D^\hat{D} such that 2h+zD^D2h+z \leq \hat{D}\leq D, thus giving a better than 3/2 approximation whenever z0z\neq 0. This is significant for constant values of DD which is exactly when the diameter approximation problem is hardest to solve. For the case of unweighted undirected graphs we present an O~(m2/3n4/3)\tilde{O}(m^{2/3} n^{4/3}) time algorithm that reports an estimate D^\hat{D} such that 4D/5D^D\lfloor 4D/5\rfloor \leq \hat{D}\leq D.

Keywords

Cite

@article{arxiv.1207.3622,
  title  = {Approximating the diameter of a graph},
  author = {Liam Roditty and Virginia Vassilevska Williams},
  journal= {arXiv preprint arXiv:1207.3622},
  year   = {2012}
}
R2 v1 2026-06-21T21:36:07.794Z