Among the most fundamental graph parameters is the Diameter, the largest distance between any pair of vertices. Computing the Diameter of a graph with $m$ edges requires $m^{2-o(1)}$ time under the Strong Exponential Time Hypothesis (SETH), which can be prohibitive for very large graphs, so efficient approximation algorithms for Diameter are desired.
There is a folklore algorithm that gives a $2$-approximation for Diameter in $\tilde{O}(m)$ time. Additionally, a line of work concludes with a $3/2$-approximation algorithm for Diameter in weighted directed graphs that runs in $\tilde{O}(m^{3/2})$ time. The $3/2$-approximation algorithm is known to be tight under SETH: Roditty and Vassilevska W. proved that under SETH any $3/2-ε$ approximation algorithm for Diameter in undirected unweighted graphs requires $m^{2-o(1)}$ time, and then Backurs, Roditty, Segal, Vassilevska W., and Wein and the follow-up work of Li proved that under SETH any $5/3-ε$ approximation algorithm for Diameter in undirected unweighted graphs requires $m^{3/2-o(1)}$ time.
Whether or not the folklore 2-approximation algorithm is tight, however, is unknown, and has been explicitly posed as an open problem in numerous papers. Towards this question, Bonnet recently proved that under SETH, any $7/4-ε$ approximation requires $m^{4/3-o(1)}$, only for directed weighted graphs.
We completely resolve this question for directed graphs by proving that the folklore 2-approximation algorithm is conditionally optimal. In doing so, we obtain a series of conditional lower bounds that together with prior work, give a complete time-accuracy trade-off that is tight with all known algorithms for directed graphs. Specifically, we prove that under SETH for any $δ>0$, a $(\frac{2k-1}{k}-δ)$-approximation algorithm for Diameter on directed unweighted graphs requires $m^{\frac{k}{k-1}-o(1)}$ time.
We present a $(1+ε)$-approximation algorithm running in $O(f(ε)\cdot n \log^4 n)$ time for finding the diameter of an undirected planar graph with non-negative edge lengths.
We prove several tight results on the fine-grained complexity of approximating the diameter of a graph. First, we prove that, for any $\varepsilon>0$, assuming the Strong Exponential Time Hypothesis (SETH), there are no near-linear time $2-\varepsilon$-approximation algorithms for the Diameter of a sparse directed graph, even in unweighted graphs. This result shows that a simple near-linear time 2-approximation algorithm for Diameter is optimal under SETH, answering a question from a survey of Rubinstein and Vassilevska-Williams (SIGACT '19) for the case of directed graphs. In the same survey,…
Let $G$ be a strongly connected directed graph. We consider the following three problems, where we wish to compute the smallest strongly connected spanning subgraph of $G$ that maintains respectively: the $2$-edge-connected blocks of $G$ (\textsf{2EC-B}); the $2$-edge-connected components of $G$ (\textsf{2EC-C}); both the $2$-edge-connected blocks and the $2$-edge-connected components of $G$ (\textsf{2EC-B-C}). All three problems are NP-hard, and thus we are interested in efficient approximation algorithms. For \textsf{2EC-C} we can obtain a $3/2$-approximation by combining previously known re…
The diameter of a graph is one if its most important parameters, being used in many real-word applications. In particular, the diameter dictates how fast information can spread throughout data and communication networks. Thus, it is a natural question to ask how much can we sparsify a graph and still guarantee that its diameter remains preserved within an approximation $t$. This property is captured by the notion of extremal-distance spanners. Given a graph $G=(V,E)$, a subgraph $H=(V,E_H)$ is defined to be a $t$-diameter spanner if the diameter of $H$ is at most $t$ times the diameter of $G$.…
For an $n$-vertex digraph $G=(V,E)$, a \emph{shortcut set} is a (small) subset of edges $H$ taken from the transitive closure of $G$ that, when added to $G$ guarantees that the diameter of $G \cup H$ is small. Shortcut sets, introduced by Thorup in 1993, have a wide range of applications in algorithm design, especially in the context of parallel, distributed and dynamic computation on directed graphs. A folklore result in this context shows that every $n$-vertex digraph admits a shortcut set of linear size (i.e., of $O(n)$ edges) that reduces the diameter to $\widetilde{O}(\sqrt{n})$. Despite …
We design approximation algorithms for Unique Games when the constraint graph admits good low diameter graph decomposition. For the ${\sf Max2Lin}_k$ problem in $K_r$-minor free graphs, when there is an assignment satisfying $1-\varepsilon$ fraction of constraints, we present an algorithm that produces an assignment satisfying $1-O(r\varepsilon)$ fraction of constraints, with the approximation ratio independent of the alphabet size. A corollary is an improved approximation algorithm for the ${\sf MaxCut}$ problem for $K_r$-minor free graphs. For general Unique Games in $K_r$-minor free graphs,…
We develop a new technique for computing maximum flow in directed planar graphs with multiple sources and a single sink that significantly deviates from previously known techniques for flow problems. This gives rise to an O(diameter*n*log(n)) algorithm for the problem.
Finding the diameter of a dataset in multidimensional Euclidean space is a well-established problem, with well-known algorithms. However, most of the algorithms found in the literature do not scale well with large values of data dimension, so the time complexity grows exponentially in most cases, which makes these algorithms impractical. Therefore, we implemented 4 simple greedy algorithms to be used for approximating the diameter of a multidimensional dataset; these are based on minimum/maximum l2 norms, hill climbing search, Tabu search and Beam search approaches, respectively. The time comp…
The girth of a graph, i.e. the length of its shortest cycle, is a fundamental graph parameter. Unfortunately all known algorithms for computing, even approximately, the girth and girth-related structures in directed weighted $m$-edge and $n$-node graphs require $Ω(\min\{n^ω, mn\})$ time (for $2\leqω<2.373$). In this paper, we drastically improve these runtimes as follows: * Multiplicative Approximations in Nearly Linear Time: We give an algorithm that in $\widetilde{O}(m)$ time computes an $\widetilde{O}(1)$-multiplicative approximation of the girth as well as an $\widetilde{O}(1)$-multiplicat…
Given a directed graph $G$ with non negative cost on the arcs, a directed tree cover of $G$ is a rooted directed tree such that either head or tail (or both of them) of every arc in $G$ is touched by $T$. The minimum directed tree cover problem (DTCP) is to find a directed tree cover of minimum cost. The problem is known to be $NP$-hard. In this paper, we show that the weighted Set Cover Problem (SCP) is a special case of DTCP. Hence, one can expect at best to approximate DTCP with the same ratio as for SCP. We show that this expectation can be satisfied in some way by designing a purely combi…
It was recently found that there are very close connections between the existence of additive spanners (subgraphs where all distances are preserved up to an additive stretch), distance preservers (subgraphs in which demand pairs have their distance preserved exactly), and pairwise spanners (subgraphs in which demand pairs have their distance preserved up to a multiplicative or additive stretch) [Abboud-Godwin SODA '16, Godwin-Williams SODA '16]. We study these problems from an optimization point of view, where rather than studying the existence of extremal instances we are given an instance an…
We present a new randomized algorithm for computing the diameter of a weighted directed graph. The algorithm runs in $\Ot(M^{\w/(\w+1)}n^{(\w^2+3)/(\w+1)})$ time, where $\w < 2.376$ is the exponent of fast matrix multiplication, $n$ is the number of vertices of the graph, and the edge weights are integers in $\{-M,...,0,...,M\}$. For bounded integer weights the running time is $O(n^{2.561})$ and if $\w=2+o(1)$ it is $\Ot(n^{7/3})$. This is the first algorithm that computes the diameter of an integer weighted directed graph polynomially faster than any known All-Pairs Shortest Paths (APSP) algo…
In the k-edge connected directed Steiner tree (k-DST) problem, we are given a directed graph G on n vertices with edge-costs, a root vertex r, a set of h terminals T and an integer k. The goal is to find a min-cost subgraph H of G that connects r to each terminal t by k edge-disjoint r,t-paths. This problem includes as special cases the well-known directed Steiner tree (DST) problem (the case k = 1) and the group Steiner tree (GST) problem. Despite having been studied and mentioned many times in literature, e.g., by Feldman et al. [SODA'09, JCSS'12], by Cheriyan et al. [SODA'12, TALG'14] and b…
Consider a directed or an undirected graph with integral edge weights from the set [-W, W], that does not contain negative weight cycles. In this paper, we introduce a general framework for solving problems on such graphs using matrix multiplication. The framework is based on the usage of Baur-Strassen's theorem and of Strojohann's determinant algorithm. It allows us to give new and simple solutions to the following problems: * Finding Shortest Cycles -- We give a simple \tilde{O}(Wn^ω) time algorithm for finding shortest cycles in undirected and directed graphs. For directed graphs (and undir…
This paper concerns proving almost tight (super-polynomial) running times, for achieving desired approximation ratios for various problems. To illustrate, the question we study, let us consider the Set-Cover problem with n elements and m sets. Now we specify our goal to approximate Set-Cover to a factor of (1-d)ln n, for a given parameter 0<d<1. What is the best possible running time for achieving such approximation? This question was answered implicitly in the work of Moshkovitz [Theory of Computing, 2015]: Assuming both the Projection Games Conjecture (PGC) and the Exponential-Time Hypothesi…
A subset $T \subseteq V$ of terminals is $k$-connected to a root $s$ in a directed/undirected graph $J$ if $J$ has $k$ internally-disjoint $vs$-paths for every $v \in T$; $T$ is $k$-connected in $J$ if $T$ is $k$-connected to every $s \in T$. We consider the {\sf Subset $k$-Connectivity Augmentation} problem: given a graph $G=(V,E)$ with edge/node-costs, node subset $T \subseteq V$, and a subgraph $J=(V,E_J)$ of $G$ such that $T$ is $k$-connected in $J$, find a minimum-cost augmenting edge-set $F \subseteq E \setminus E_J$ such that $T$ is $(k+1)$-connected in $J \cup F$. The problem admits tr…
In some applications of matching, the structural or hierarchical properties of the two graphs being aligned must be maintained. The hierarchical properties are induced by the direction of the edges in the two directed graphs. These structural relationships defined by the hierarchy in the graphs act as a constraint on the alignment. In this paper, we formalize the above problem as the weighted alignment between two directed acyclic graphs. We prove that this problem is NP-complete, show several upper bounds for approximating the solution, and finally introduce polynomial time algorithms for sub…
In this paper we consider the fundamental problem of approximating the diameter $D$ 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(m\sqrt n + n^2)$ time an estimate $\hat{D}$ for the diameter of an $n$-node, $m$-edge graph, such that $\lfloor 2/3 D \rfloor \leq \hat{D} \leq D$. In this paper we present an algorithm that produces the same estimate in $\Ot(m\sqrt n)$ expected running time. We then provide strong evidence that a better approximation may be hard to obtain if we insist o…
We study two "above guarantee" versions of the classical Longest Path problem on undirected and directed graphs and obtain the following results. In the first variant of Longest Path that we study, called Longest Detour, the task is to decide whether a graph has an (s,t)-path of length at least dist_G(s,t)+k (where dist_G(s,t) denotes the length of a shortest path from s to t). Bezáková et al. proved that on undirected graphs the problem is fixed-parameter tractable (FPT) by providing an algorithm of running time 2^{O (k)} n. Further, they left the parameterized complexity of the problem on di…
We study the problem of computing a minimum equivalent digraph (also known as the problem of computing a strong transitive reduction) and its maximum objective function variant, with two types of extensions. First, we allow to declare a set $D\subset E$ and require that a valid solution $A$ satisfies $D\subset A$ (it is sometimes called transitive reduction problem). In the second extension (called $p$-ary transitive reduction), we have integer edge labeling and we view two paths as equivalent if they have the same beginning, ending and the sum of labels modulo $p$. A solution $A\subseteq E$ i…
The diameter of an undirected unweighted graph $G=(V,E)$ is the maximum value of the distance from any vertex $u$ to another vertex $v$ for $u,v \in V$ where distance i.e. $d(u,v)$ is the length of the shortest path from $u$ to $v$ in $G$. DAG, is a directed graph without a cycle. We denote the diameter of an unweighted DAG $G=(V,E)$ by $δ(G)$. The stretch of a DAG $G$ is the length of longest path from $u$ to $v$ in $G$, for all choices of $(u, v) \in V$ denoted by $Δ(G)$. The diameter of an undirected graph can be computed in $O(|V|(|V|+|E|))$ time by executing breadth first search $|V|$ tim…
Structural parameterizations of Geodetic Set on directed (acyclic) graphs
Université Clermont-Auvergne(克莱蒙奥弗涅大学);CNRS(法国国家科学研究中心);Mines de Saint-Étienne(圣艾蒂安国立高等矿业学院);Clermont-Auvergne-INP(克莱蒙奥弗涅理工学院);LIMOS(LIMOS实验室);Indian Institute of Science Education and Research Pune(印度科学教育研究学院浦那分校)
Betweenness is a well-known centrality measure that ranks the nodes of a network according to their participation in shortest paths. Since an exact computation is prohibitive in large networks, several approximation algorithms have been proposed. Besides that, recent years have seen the publication of dynamic algorithms for efficient recomputation of betweenness in networks that change over time. In this paper we propose the first betweenness centrality approximation algorithms with a provable guarantee on the maximum approximation error for dynamic networks. Several new intermediate algorithm…
We give a dynamic programming solution to find the minimum cost of a diameter constrained Steiner tree in case of directed graphs. Then we show a simple reduction from undirected version to the directed version to realize an algorithm of similar complexity i.e, FPT in number of terminal vertices. Other natural variants of constrained Steiner trees are defined by imposing constraints on the min-degree and size of the Steiner tree and some polynomial time reductions among these problems are proven. To the best of our knowledge, these fairly simple reductions are not present in the literature pri…
We introduce the problem of Weak Dominance Drawing for general directed acyclic graphs and we show the connection with the linear extension diameter of a partial order P. We present complexity results and bounds.
Zwick's $(1+\varepsilon)$-approximation algorithm for the All Pairs Shortest Path (APSP) problem runs in time $\widetilde{O}(\frac{n^ω}{\varepsilon} \log{W})$, where $ω\le 2.373$ is the exponent of matrix multiplication and $W$ denotes the largest weight. This can be used to approximate several graph characteristics including the diameter, radius, median, minimum-weight triangle, and minimum-weight cycle in the same time bound. Since Zwick's algorithm uses the scaling technique, it has a factor $\log W$ in the running time. In this paper, we study whether APSP and related problems admit approx…
We show how to compute for $n$-vertex planar graphs in $O(n^{11/6}{\rm polylog}(n))$ expected time the diameter and the sum of the pairwise distances. The algorithms work for directed graphs with real weights and no negative cycles. In $O(n^{15/8}{\rm polylog}(n))$ expected time we can also compute the number of pairs of vertices at distance smaller than a given threshold. These are the first algorithms for these problems using time $O(n^c)$ for some constant $c<2$, even when restricted to undirected, unweighted planar graphs.
In this paper we consider the problem of computing the $2$-vertex-connected components ($2$-vccs) of directed graphs. We present two new algorithms for solving this problem. The first algorithm runs in $O(mn^{2})$ time, the second in $O(nm)$ time. Furthermore, we show that the old algorithm of Erusalimskii and Svetlov runs in $O(nm^{2})$ time. In this paper, we investigate the relationship between $2$-vccs and dominator trees. We also present an algorithm for computing the $3$-vertex-connected components ($3$-vccs) of a directed graph in $O(n^{3}m)$ time, and we show that the $k$-vertex-connec…
Consider the setting of \emph{randomly weighted graphs}, namely, graphs whose edge weights are chosen independently according to probability distributions with finite support over the non-negative reals. Under this setting, properties of weighted graphs typically become random variables and we are interested in computing their statistical features. Unfortunately, this turns out to be computationally hard for some properties albeit the problem of computing them in the traditional setting of algorithmic graph theory is tractable. For example, there are well known efficient algorithms that comput…
Directed Steiner Tree (DST) is a central problem in combinatorial optimization and theoretical computer science: Given a directed graph $G=(V, E)$ with edge costs $c \in \mathbb{R}_{\geq 0}^E$, a root $r \in V$ and $k$ terminals $K\subseteq V$, we need to output the minimum-cost arborescence in $G$ that contains an $r$\textrightarrow $t$ path for every $t \in K$. Recently, Grandoni, Laekhanukit and Li, and independently Ghuge and Nagarajan, gave quasi-polynomial time $O(\log^2k/\log \log k)$-approximation algorithms for the problem, which are tight under popular complexity assumptions. In this…
We prove better lower bounds on additive spanners and emulators, which are lossy compression schemes for undirected graphs, as well as lower bounds on shortcut sets, which reduce the diameter of directed graphs. We show that any $O(n)$-size shortcut set cannot bring the diameter below $Ω(n^{1/6})$, and that any $O(m)$-size shortcut set cannot bring it below $Ω(n^{1/11})$. These improve Hesse's [Hesse03] lower bound of $Ω(n^{1/17})$. By combining these constructions with Abboud and Bodwin's [AbboudB17] edge-splitting technique, we get additive stretch lower bounds of $+Ω(n^{1/11})$ for $O(n)$-s…
We consider directed graphs where each edge is labeled with an integer weight and study the fundamental algorithmic question of computing the value of a cycle with minimum mean weight. Our contributions are twofold: (1) First we show that the algorithmic question is reducible in O(n^2) time to the problem of a logarithmic number of min-plus matrix multiplications of n-by-n matrices, where n is the number of vertices of the graph. (2) Second, when the weights are nonnegative, we present the first (1 + ε)-approximation algorithm for the problem and the running time of our algorithm is \tilde(O)(…
The radius and diameter are fundamental graph parameters. They are defined as the minimum and maximum of the eccentricities in a graph, respectively, where the eccentricity of a vertex is the largest distance from the vertex to another node. In directed graphs, there are several versions of these problems. For instance, one may choose to define the eccentricity of a node in terms of the largest distance into the node, out of the node, the sum of the two directions (i.e. roundtrip) and so on. All versions of diameter and radius can be solved via solving all-pairs shortest paths (APSP), followed…
We show, assuming the Strong Exponential Time Hypothesis, that for every $\varepsilon > 0$, approximating directed Diameter on $m$-arc graphs within ratio $7/4 - \varepsilon$ requires $m^{4/3 - o(1)}$ time. Our construction uses nonnegative edge weights but even holds for sparse digraphs, i.e., for which the number of vertices $n$ and the number of arcs $m$ satisfy $m = n \log^{O(1)} n$. This is the first result that conditionally rules out a near-linear time $5/3$-approximation for Diameter.
We design $f$-edge fault-tolerant diameter oracles ($f$-FDOs). We preprocess a given graph $G$ on $n$ vertices and $m$ edges, and a positive integer $f$, to construct a data structure that, when queried with a set $F$ of $|F| \leq f$ edges, returns the diameter of $G-F$. For a single failure ($f=1$) in an unweighted directed graph of diameter $D$, there exists an approximate FDO by Henzinger et al. [ITCS 2017] with stretch $(1+\varepsilon)$, constant query time, space $O(m)$, and a combinatorial preprocessing time of $\widetilde{O}(mn + n^{1.5} \sqrt{Dm/\varepsilon})$.We present an FDO for dir…
Conditional lower bounds for dynamic graph problems has received a great deal of attention in recent years. While many results are now known for the fully-dynamic case and such bounds often imply worst-case bounds for the partially dynamic setting, it seems much more difficult to prove amortized bounds for incremental and decremental algorithms. In this paper we consider partially dynamic versions of three classic problems in graph theory. Based on popular conjectures we show that: -- No algorithm with amortized update time $O(n^{1-\varepsilon})$ exists for incremental or decremental maximum c…
The MEG (minimum equivalent graph) problem is, given a directed graph, to find a small subset of the edges that maintains all reachability relations between nodes. The problem is NP-hard. This paper gives an approximation algorithm with performance guarantee of pi^2/6 ~ 1.64. The algorithm and its analysis are based on the simple idea of contracting long cycles. (This result is strengthened slightly in ``On strongly connected digraphs with bounded cycle length'' (1996).) The analysis applies directly to 2-Exchange, a simple ``local improvement'' algorithm, showing that its performance guarante…
We study fundamental graph parameters such as the Diameter and Radius in directed graphs, when distances are measured using a somewhat unorthodox but natural measure: the distance between $u$ and $v$ is the minimum of the shortest path distances from $u$ to $v$ and from $v$ to $u$. The center node in a graph under this measure can for instance represent the optimal location for a hospital to ensure the fastest medical care for everyone, as one can either go to the hospital, or a doctor can be sent to help. By computing All-Pairs Shortest Paths, all pairwise distances and thus the parameters we…