Fast approximation algorithms for the diameter and radius of sparse graphs
Summary (3 min read)
1. INTRODUCTION
- The diameter and the radius are two of the most basic graph parameters.
- The diameter of a graph is the largest distance between its vertices.
- Being able to compute the diameter, center and radius of a graph efficiently has become an increasingly important problem in the analysis of large networks [35].
- For general graphs with arbitrary edge weights, the only known algorithms computing the diameter and radius exactly compute the distance between every pair of vertices in the graph, thus solving the all-pairs shortest paths problem (APSP).
Our contributions.
- The authors give the first improvement over the diameter approximation algorithm of Aingworth et al. for sparse graphs.
- The authors present an algorithm with a slightly better approximation and an expected running time of Õ(m √ n).
- The fastest known algorithm for CNF-SAT is the exhaustive search algorithm that runs in O∗(2n) time by trying all possible 2n assignments to the variables.
- (We elaborate on this hypothesis later on in the paper.)the authors.
Notation.
- It can be directed or undirected; this will be specified in each context.
- Unless explicitly specified, the graphs the authors consider are unweighted.
- In an unweighted graph, the eccentricity of a vertex v denoted with ecc(v) is the depth of its BFS tree BFS(v).
- The authors assume throughout the paper that for each v and each s ≤ n, |N ins (v)| = |Nouts (v)| = s, as otherwise the diameter of the graph would be ∞, and this can be checked with two BFS runs from and to an arbitrary node.
- The authors use the following standard notation for running times.
2. DIAMETER
- The authors first revisit the algorithm of Aingworth et al. and tighten its approximation analysis.
- The authors then present their new neighborhood estimation approach that is at the basis of their improved algorithm.
- Aingworth et al. set s = √ n and obtain their running time.
- The authors note that if one sets s = m1/3 instead, one can get a runtime of Õ(m2/3n) that is better for sparse graphs; they later show that both of these runtimes can be improved using their new method.
- The authors now analyze the quality of the estimate returned by the algorithm.
2.2 Improving the running time
- While keeping the quality of the estimate unchanged.the authors.
- In the next Lemma the authors analyze the running time of the algorithm.
- D̂ be the estimate returned by the above algorithm.
- The authors can assume also that dout(w) < 2h + z since the algorithm computes BFSout(w) and if dout(w) ≥.
- In each run, S∩Nouts (w) = ∅ holds with very small probability: S is large enough so that whp it intersects the s-neighborhoods of all n vertices of the graph.
3. ECCENTRICITIES
- A good approximation ê(v) of its eccentricity ecc(v).the authors.
- The authors note that their eccentricities algorithm can also be made to work for undirected graphs with nonnegative weights at most W by again using Dijkstra’s algorithm in place of BFS.
- Then it computes all BFS trees for the vertices of S ∪Ns(w) for s = √ n. Let vt ∈ Ns(w) be the closest vertex to v on the shortest path between w and v. Such a vertex exists since w ∈ Ns(w), and for every v it can be computed during the computation of the BFS tree from w.
- In the next three lemmas the authors prove the bounds on the approximation.
- Consider the node v′t that is after vt on the shortest path between w and v. Since vt is the closest node to v on the shortest path between w and v that belongs to Ns(w) it follows that v ′ t /∈ Ns(w).
4. HARDNESS UNDER SETH
- Impagliazzo, Paturi, and Zane [23, 24] introduced the Exponential Time Hypothesis (ETH) and its stronger variant, the Strong Exponential Time Hypothesis (SETH).
- These two complexity hypotheses assume lower bounds on how fast satisfiability problems can be solved.
- A natural question is how fast can one solve r-SAT as r grows.
- Create a vertex for every one of the 2n/2 partial assignments to the variables in S1 and 2Pǎtraşcu and Williams [29] are able to show that improving the runtime for k-dominating set can be reduced to improving the known algorithms for a problem related to CNFSAT, but that problem could still be harder than CNF-SAT.
5. IMPROVED APPROXIMATIONS
- In this section the authors show that in some cases it is possible to obtain fast (3/2 − ε)-approximations for the diameter.
- The authors present two algorithms, one works well for dense graphs and the other for sparse graphs.
5.1 Dense graphs
- Both theorems rely on algorithm Approx-Diam(G) that works as follows.
- Next, the algorithm scans all pairs of vertices u and v and checks whether the following condition holds: BFSout(u, douts (u)−1) and BFSin(v, dins (v)−1) are disjoint and there is no edge between BFSout(u, douts (u)−.
- If Approx-Diam(G) returns the value that it gets from one of the runs of Aingworth et al. algorithm then the claim follows from Lemma 2.
- In this case let w be the vertex with the largest douts (w) value.
- 1) (and no vertex in common between the two trees).
5.2 Sparse graphs
- The authors now show that for graphs of constant diameter, it is sometimes possible to obtain a better than 3/2-approximation in Õ(m2−ε) time for constant ε >.
- Finally, it returns the maximum depth of all computed BFS trees.
- The authors now analyze the quality of the approximation.
- Let yi be the vertex with the deepest incoming BFS among the vertices of BFSout(w, h′), where h′ = min{h̃+.
- The algorithm computes a BFS tree for every vertex of H. |H| = O(m/∆) since there are at most that many vertices of outdegree at least ∆.
6. REFERENCES
- Fast estimation of diameter and shortest paths (without matrix multiplication).
- On the possibility of faster SAT algorithms.
- On the all-pairs-shortest-path problem in unweighted undirected graphs.
- All pairs shortest paths using bridging sets and rectangular matrix multiplication.
Did you find this useful? Give us your feedback
Citations
308 citations
264 citations
236 citations
Cites background from "Fast approximation algorithms for t..."
...Recently, SETH has been shown to imply many interesting lower bounds for polynomial time solvable problems [3], [5], [9], [15], [42], [46]....
[...]
195 citations
192 citations
References
39,297 citations
"Fast approximation algorithms for t..." refers background in this paper
...Being able to compute the diameter, center and radius of a graph efficiently has become an increasingly important problem in the analysis of large networks [35]....
[...]
4,135 citations
"Fast approximation algorithms for t..." refers background in this paper
...were able to show experimentally that it is roughly 19 [2]....
[...]
...It is complete for W[2], and improving on the n running time is a major open problem....
[...]
2,454 citations
"Fast approximation algorithms for t..." refers background in this paper
...38 is the matrix multiplication exponent [14, 33, 34] and n is the number of nodes in the graph....
[...]
2,224 citations
"Fast approximation algorithms for t..." refers background in this paper
...For special classes of graphs there are efficient algorithms [21, 19, 15, 11, 12, 5]....
[...]
1,410 citations
Related Papers (5)
Frequently Asked Questions (10)
Q2. What is the known algorithm for calculating the diameter and radius of a graph?
For sparse directed or undirected unweighted graphs, the best known algorithm (ignoring poly-logarithmic factors)1 for APSP, diameter and radius, does breadth-first search (BFS) from every node and hence runs in O(mn) time, where m is the number of edges in the graph.
Q3. How can the authors make their algorithm work for undirected graphs?
The authors note that their eccentricities algorithm can also be made to work for undirected graphs with nonnegative weights at most W by again using Dijkstra’s algorithm in place of BFS.
Q4. What is the running time for a sparse graph?
For sparse graphs with m = O(n), the running time is Θ(n2) which is natural for APSP since the algorithm needs to output n2 distances.
Q5. How can the authors get a 2-approximation to the diameter?
In O(m) time the authors can get a 2-approximation to the diameter, i.e. an estimate E with D/2 ≤ E ≤ D. Since D = 3h + z, the authors have that (E − 2)/3 ≤ h ≤ 2E/3.
Q6. How does the algorithm compute a BFS tree?
The algorithm computes a BFS tree for every vertex of H. |H| = O(m/∆) since there are at most that many vertices of outdegree at least ∆.
Q7. How can one compute the diameter and radius of a graph?
For dense directed unweighted graphs, one can compute both the diameter and the radius using fast matrix multiplication (this is folklore; for a recent simple algorithm see [17]), thus obtaining Õ(nω) time algorithms, where ω < 2.38 is the matrix multiplication exponent [14, 33, 34] and n is the number of nodes in the graph.
Q8. What is the deterministic time algorithm for a graph with a diameter of D?
There is an Õ(m2/3n4/3) time algorithm that reports an estimate D̂ such that 2h+ z ≤ D̂ ≤ D.Theorem 6. There is an Õ(m2/3n4/3) time algorithm that when run on an undirected unweighted graph with diameter D, reports an estimate D̂ with ⌊4D/5⌋ ≤
Q9. What is the douts (a) dins (b)?
Since the estimate reported by the algorithm is the maximum among values that also include douts (a) + dins (b) = 2h+ 2, the authors get that D̂ ≥ 2h+ 2, as required.
Q10. What is the way to get an estimate of D?
If D̂ = 2 then D mightbe either 2, 3 or 4, and for this case the authors can just use the Aingworth et al. algorithm to get an estimate of 3 whenever D = 4 which gives the desired approximation.