We show a fast algorithm for determining the set of edges in a planar undirected unweighted graph, whose deletion reduces the maximum flow between two fixed vertices. This is a special case of the max flow vitality problem, that has been efficiently solved for general undirected graphs and st-planar graphs. The vitality of an edge of a graph with respect to the maximum flow between two fixed vertices s and t is defined as the reduction of the maximum flow caused by the removal of that edge. In this paper we show that the set of edges having vitality greater than zero in a planar undirected unweighted graph with n vertices can be found in O(n log n) worst-case time and O(n) space.
The vitality of an edge in a graph with respect to the maximum flow between two fixed vertices $s$ and $t$ is defined as the reduction of the maximum flow value caused by the removal of that edge. The max-flow vitality problem has already been efficiently solved for $st$-planar graphs but has remained open for general planar graphs. For the first time our result provides an optimal solution for general planar graphs although restricted to the case of unweighted planar graphs.
The \emph{vitality} of an arc/node of a graph with respect to the maximum flow between two fixed nodes $s$ and $t$ is defined as the reduction of the maximum flow caused by the removal of that arc/node. In this paper we address the issue of determining the vitality of arcs and/or nodes for the maximum flow problem. We show how to compute the vitality of all arcs in a general undirected graph by solving only $2(n-1)$ max flow instances and, In $st$-planar graphs (directed or undirected) we show how to compute the vitality of all arcs and all nodes in $O(n)$ worst-case time. Moreover, after dete…
Spectral graph sparsification has emerged as a powerful tool in the analysis of large-scale networks by reducing the overall number of edges, while maintaining a comparable graph Laplacian matrix. In this paper, we present an efficient algorithm for the construction of a new type of spectral sparsifier, the unweighted spectral sparsifier. Given a general undirected and unweighted graph $G = (V, E)$ and an integer $\ell < |E|$ (the number of edges in $E$), we compute an unweighted graph $H = (V, F)$ with $F \subset E$ and $|F| = \ell$ such that for every $x \in \mathbb{R}^{V}$ \[ {\displaystyle…
Every undirected graph $G$ has a (weighted) cut-equivalent tree $T$, commonly named after Gomory and Hu who discovered it in 1961. Both $T$ and $G$ have the same node set, and for every node pair $s,t$, the minimum $(s,t)$-cut in $T$ is also an exact minimum $(s,t)$-cut in $G$. We give the first subcubic-time algorithm that constructs such a tree for a simple graph $G$ (unweighted with no parallel edges). Its time complexity is $\tilde{O}(n^{2.5})$, for $n=|V(G)|$; previously, only $\tilde{O}(n^3)$ was known, except for restricted cases like sparse graphs. Consequently, we obtain the first alg…
Given an undirected graph $G$ and an error parameter $ε> 0$, the {\em graph sparsification} problem requires sampling edges in $G$ and giving the sampled edges appropriate weights to obtain a sparse graph $G_ε$ with the following property: the weight of every cut in $G_ε$ is within a factor of $(1\pm ε)$ of the weight of the corresponding cut in $G$. If $G$ is unweighted, an $O(m\log n)$-time algorithm for constructing $G_ε$ with $O(n\log n/ε^2)$ edges in expectation, and an $O(m)$-time algorithm for constructing $G_ε$ with $O(n\log^2 n/ε^2)$ edges in expectation have recently been developed (…
Let $G=(V,E)$ be any undirected graph on $V$ vertices and $E$ edges. A path $\textbf{P}$ between any two vertices $u,v\in V$ is said to be $t$-approximate shortest path if its length is at most $t$ times the length of the shortest path between $u$ and $v$. We consider the problem of building a compact data structure for a given graph $G$ which is capable of answering the following query for any $u,v,z\in V$ and $t>1$: Report $t$-approximate shortest path between $u$ and $v$ when vertex $z$ fails We present data structures for the single source as well all-pairs versions of this problem. Our da…
Given $p$ node pairs in an $n$-node graph, a distance preserver is a sparse subgraph that agrees with the original graph on all of the given pairwise distances. We prove the following bounds on the number of edges needed for a distance preserver: - Any $p$ node pairs in a directed weighted graph have a distance preserver on $O(n + n^{2/3} p)$ edges. - Any $p = Ω\left(\frac{n^2}{rs(n)}\right)$ node pairs in an undirected unweighted graph have a distance preserver on $O(p)$ edges, where $rs(n)$ is the Ruzsa-Szemerédi function from combinatorial graph theory. - As a lower bound, there are example…
In most of the shortest path problems like vehicle routing problems and network routing problems, we only need an efficient path between two points source and destination, and it is not necessary to calculate the shortest path from source to all other nodes. This paper concentrates on this very idea and presents an algorithm for calculating shortest path for (i) nonnegative weighted undirected graphs (ii) unweighted undirected graphs. The algorithm completes its execution in O(E) for all graphs except few in which longer path (in terms of number of edges) from source to some node makes it best…
APSP with small integer weights in undirected graphs [Seidel'95, Galil and Margalit'97] has an $\tilde{O}(n^ω)$ time algorithm, where $ω<2.373$ is the matrix multiplication exponent. APSP in directed graphs with small weights however, has a much slower running time that would be $Ω(n^{2.5})$ even if $ω=2$ [Zwick'02]. To understand this $n^{2.5}$ bottleneck, we build a web of reductions around directed unweighted APSP. We show that it is fine-grained equivalent to computing a rectangular Min-Plus product for matrices with integer entries; the dimensions and entry size of the matrices depend on …
Given a graph $G$ and a set of terminals $T$, a \emph{distance emulator} of $G$ is another graph $H$ (not necessarily a subgraph of $G$) containing $T$, such that all the pairwise distances in $G$ between vertices of $T$ are preserved in $H$. An important open question is to find the smallest possible distance emulator. We prove that, given any subset of $k$ terminals in an $n$-vertex undirected unweighted planar graph, we can construct in $\tilde O(n)$ time a distance emulator of size $\tilde O(\min(k^2,\sqrt{k\cdot n}))$. This is optimal up to logarithmic factors. The existence of such dista…
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,…
In this paper we consider the decremental single-source shortest paths (SSSP) problem, where given a graph $G$ and a source node $s$ the goal is to maintain shortest distances between $s$ and all other nodes in $G$ under a sequence of online adversarial edge deletions. In their seminal work, Even and Shiloach [JACM 1981] presented an exact solution to the problem in unweighted graphs with only $O(mn)$ total update time over all edge deletions. Their classic algorithm was the state of the art for the decremental SSSP problem for three decades, even when approximate shortest paths are allowed. A…
We show an improved parallel algorithm for decomposing an undirected unweighted graph into small diameter pieces with a small fraction of the edges in between. These decompositions form critical subroutines in a number of graph algorithms. Our algorithm builds upon the shifted shortest path approach introduced in [Blelloch, Gupta, Koutis, Miller, Peng, Tangwongsan, SPAA 2011]. By combining various stages of the previous algorithm, we obtain a significantly simpler algorithm with the same asymptotic guarantees as the best sequential algorithm.
A maximum priority matching is a matching in an undirected graph that maximizes a priority score defined with respect to given vertex priorities. An earlier paper showed how to find maximum priority matchings in unweighted graphs. This paper describes an algorithm for bipartite graphs that is faster when the number of distinct priority classes is limited. For graphs with $k$ distinct priority classes it runs in $O(kmn^{1/2})$ time, where $n$ is the number of vertices in the graph and $m$ is the number of edges.
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…
Given an undirected graph on a node set $V$ and positive integers $k$ and $m$, a $k$-connected $m$-dominating set ($(k,m)$-CDS) is defined as a subset $S$ of $V$ such that each node in $V \setminus S$ has at least $m$ neighbors in $S$, and a $k$-connected subgraph is induced by $S$. The weighted $(k,m)$-CDS problem is to find a minimum weight $(k,m)$-CDS in a given node-weighted graph. The problem is called the unweighted $(k,m)$-CDS problem if the objective is to minimize the cardinality of a $(k,m)$-CDS. These problems have been actively studied for unit disk graphs, motivated by the applica…
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…
The Gomory-Hu tree or cut tree (Gomory and Hu, 1961) is a classic data structure for reporting $(s,t)$ mincuts (and by duality, the values of $(s,t)$ maxflows) for all pairs of vertices $s$ and $t$ in an undirected graph. Gomory and Hu showed that it can be computed using $n-1$ exact maxflow computations. Surprisingly, this remains the best algorithm for Gomory-Hu trees more than 50 years later, *even for approximate mincuts*. In this paper, we break this longstanding barrier and give an algorithm for computing a $(1+ε)$-approximate Gomory-Hu tree using $\text{polylog}(n)$ maxflow computations…
Given an undirected, unweighted planar graph $G$ with $n$ vertices, we present a truly subquadratic size distance oracle for reporting exact shortest-path distances between any pair of vertices of $G$ in constant time. For any $\varepsilon > 0$, our distance oracle takes up $O(n^{5/3+\varepsilon})$ space and is capable of answering shortest-path distance queries exactly for any pair of vertices of $G$ in worst-case time $O(\log (1/\varepsilon))$. Previously no truly sub-quadratic size distance oracles with constant query time for answering exact all-pairs shortest paths distance queries existe…
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.
The girth of a graph is the minimum weight of all simple cycles of the graph. We study the problem of determining the girth of an n-node unweighted undirected planar graph. The first non-trivial algorithm for the problem, given by Djidjev, runs in O(n^{5/4} log n) time. Chalermsook, Fakcharoenphol, and Nanongkai reduced the running time to O(n log^2 n). Weimann and Yuster further reduced the running time to O(n log n). In this paper, we solve the problem in O(n) time.
A distance labeling scheme is an assignments of labels, that is binary strings, to all nodes of a graph, so that the distance between any two nodes can be computed from their labels and the labels are as short as possible. A major open problem is to determine the complexity of distance labeling in unweighted and undirected planar graphs. It is known that, in such a graph on $n$ nodes, some labels must consist of $Ω(n^{1/3})$ bits, but the best known labeling scheme uses labels of length $O(\sqrt{n}\log n)$ [Gavoille, Peleg, Pérennes, and Raz, J. Algorithms, 2004]. We show that, in fact, labels…
Finding a maximum-cardinality or maximum-weight matching in (edge-weighted) undirected graphs is among the most prominent problems of algorithmic graph theory. For $n$-vertex and $m$-edge graphs, the best known algorithms run in $\widetilde{O}(m\sqrt{n})$ time. We build on recent theoretical work focusing on linear-time data reduction rules for finding maximum-cardinality matchings and complement the theoretical results by presenting and analyzing (thereby employing the kernelization methodology of parameterized complexity analysis) new (near-)linear-time data reduction rules for both the unwe…
This paper addresses the problem of designing a {\em fault-tolerant} $(α, β)$ approximate BFS structure (or {\em FT-ABFS structure} for short), namely, a subgraph $H$ of the network $G$ such that subsequent to the failure of some subset $F$ of edges or vertices, the surviving part of $H$ still contains an \emph{approximate} BFS spanning tree for (the surviving part of) $G$, satisfying $dist(s,v,H\setminus F) \leq α\cdot dist(s,v,G\setminus F)+β$ for every $v \in V$. We first consider {\em multiplicative} $(α,0)$ FT-ABFS structures resilient to a failure of a single edge and present an algorith…
Given an undirected graph $G=(V,E)$ with positive edge lengths and two vertices $s$ and $t$, the next-to-shortest path problem is to find an $st$-path which length is minimum amongst all $st$-paths strictly longer than the shortest path length. In this paper we show that the problem can be solved in linear time if the distances from $s$ and $t$ to all other vertices are given. Particularly our new algorithm runs in $O(|V|\log |V|+|E|)$ time for general graphs, which improves the previous result of $O(|V|^2)$ time for sparse graphs, and takes only linear time for unweighted graphs, planar graph…
The \emph{maximal $k$-edge-connected subgraphs} problem is a classical graph clustering problem studied since the 70's. Surprisingly, no non-trivial technique for this problem in weighted graphs is known: a very straightforward recursive-mincut algorithm with $Ω(mn)$ time has remained the fastest algorithm until now. All previous progress gives a speed-up only when the graph is unweighted, and $k$ is small enough (e.g.~Henzinger~et~al.~(ICALP'15), Chechik~et~al.~(SODA'17), and Forster~et~al.~(SODA'20)). We give the first algorithm that breaks through the long-standing $\tilde{O}(mn)$-time barr…
Let $G$ be an edge-weighted directed graph with $n$ vertices embedded on an orientable surface of genus $g$. We describe a simple deterministic lexicographic perturbation scheme that guarantees uniqueness of minimum-cost flows and shortest paths in $G$. The perturbations take $O(gn)$ time to compute. We use our perturbation scheme in a black box manner to derive a deterministic $O(n \log \log n)$ time algorithm for minimum cut in \emph{directed} edge-weighted planar graphs and a deterministic $O(g^2 n \log n)$ time proprocessing scheme for the multiple-source shortest paths problem of computin…
In the decremental single-source shortest paths (SSSP) problem we want to maintain the distances between a given source node $s$ and every other node in an $n$-node $m$-edge graph $G$ undergoing edge deletions. While its static counterpart can be solved in near-linear time, this decremental problem is much more challenging even in the undirected unweighted case. In this case, the classic $O(mn)$ total update time of Even and Shiloach [JACM 1981] has been the fastest known algorithm for three decades. At the cost of a $(1+ε)$-approximation factor, the running time was recently improved to $n^{2…
Given an undirected graph $G=(V,E)$ on $n$ vertices, $m$ edges, and an integer $t\ge 1$, a subgraph $(V,E_S)$, $E_S\subseteq E$ is called a $t$-spanner if for any pair of vertices $u,v \in V$, the distance between them in the subgraph is at most $t$ times the actual distance. We present streaming algorithms for computing a $t$-spanner of essentially optimal size-stretch trade offs for any undirected graph. Our first algorithm is for the classical streaming model and works for unweighted graphs only. The algorithm performs a single pass on the stream of edges and requires $O(m)$ time to process…
An instance of the Connected Maximum Cut problem consists of an undirected graph G = (V, E) and the goal is to find a subset of vertices S $\subseteq$ V that maximizes the number of edges in the cut δ(S) such that the induced graph G[S] is connected. We present the first non-trivial Ω(1/log n) approximation algorithm for the connected maximum cut problem in general graphs using novel techniques. We then extend our algorithm to an edge weighted case and obtain a poly-logarithmic approximation algorithm. Interestingly, in stark contrast to the classical max-cut problem, we show that the connecte…
For an undirected graph G=(V,E), a vertex x \in V separates vertices u and v (where u,v \in V, u \neq v) if their distances to x are not equal. Given an integer parameter k \geq 1, a set of vertices L \subseteq V is a feasible solution if for every pair of distinct vertices, u,v, there are at least k distinct vertices x_1,x_2,...,x_k \in L each separating u and v. Such a feasible solution is called a "landmark set", and the k-metric dimension of a graph is the minimal cardinality of a landmark set for the parameter k. The case k=1 is a classic problem, where in its weighted version, each verte…
In 1961, Gomory and Hu showed that the All-Pairs Max-Flow problem of computing the max-flow between all $n\choose 2$ pairs of vertices in an undirected graph can be solved using only $n-1$ calls to any (single-pair) max-flow algorithm. Even assuming a linear-time max-flow algorithm, this yields a running time of $O(mn)$, which is $O(n^3)$ when $m = Θ(n^2)$. While subsequent work has improved this bound for various special graph classes, no subcubic-time algorithm has been obtained in the last 60 years for general graphs. We break this longstanding barrier by giving an $\tilde{O}(n^{2})$-time a…
A $(1+ε)$-approximate distance oracle of an edge-weighted graph is a data structure that returns an approximate shortest path distance between any two query vertices up to a $(1+ε)$ factor. Thorup (FOCS 2001, JACM 2004) and Klein (SODA 2002) independently constructed a $(1+ε)$-approximate distance oracle with $O(n\log n)$ space, measured in number of words, and $O(1)$ query time when $G$ is an undirected planar graph with $n$ vertices and $ε$ is a fixed constant. Many follow-up works gave $(1+ε)$-approximate distance oracles with various trade-offs between space and query time. However, improv…
We consider additive spanners of unweighted undirected graphs. Let $G$ be a graph and $H$ a subgraph of $G$. The most naïve way to construct an additive $k$-spanner of $G$ is the following: As long as $H$ is not an additive $k$-spanner repeat: Find a pair $(u,v) \in H$ that violates the spanner-condition and a shortest path from $u$ to $v$ in $G$. Add the edges of this path to $H$. We show that, with a very simple initial graph $H$, this naïve method gives additive $6$- and $2$-spanners of sizes matching the best known upper bounds. For additive $2$-spanners we start with $H=\emptyset$ and end…
Given a set P of n points in the plane, the unit-disk graph G_{r}(P) with respect to a parameter r is an undirected graph whose vertex set is P such that an edge connects two points p, q \in P if the Euclidean distance between p and q is at most r (the weight of the edge is 1 in the unweighted case and is the distance between p and q in the weighted case). Given a value λ>0 and two points s and t of P, we consider the following reverse shortest path problem: computing the smallest r such that the shortest path length between s and t in G_r(P) is at most λ. In this paper, we present an algorith…
We study the decremental All-Pairs Shortest Paths (APSP) problem in undirected edge-weighted graphs. The input to the problem is an $n$-vertex $m$-edge graph $G$ with non-negative edge lengths, that undergoes a sequence of edge deletions. The goal is to support approximate shortest-path queries: given a pair $x,y$ of vertices of $G$, return a path $P$ connecting $x$ to $y$, whose length is within factor $α$ of the length of the shortest $x$-$y$ path, in time $\tilde O(|E(P)|)$, where $α$ is the approximation factor of the algorithm. APSP is one of the most basic and extensively studied dynamic…
A cycle basis in an undirected graph is a minimal set of simple cycles whose symmetric differences include all Eulerian subgraphs of the given graph. We define a rooted cycle basis to be a cycle basis in which all cycles contain a specified root edge, and we investigate the algorithmic problem of constructing rooted cycle bases. We show that a given graph has a rooted cycle basis if and only if the root edge belongs to its 2-core and the 2-core is 2-vertex-connected, and that constructing such a basis can be performed efficiently. We show that in an unweighted or positively weighted graph, it …
Given a graph with a source vertex $s$, the Single Source Replacement Paths (SSRP) problem is to compute, for every vertex $t$ and edge $e$, the length $d(s,t,e)$ of a shortest path from $s$ to $t$ that avoids $e$. A Single-Source Distance Sensitivity Oracle (Single-Source DSO) is a data structure that answers queries of the form $(t,e)$ by returning the distance $d(s,t,e)$. We show how to deterministically compress the output of the SSRP problem on $n$-vertex, $m$-edge graphs with integer edge weights in the range $[1,M]$ into a Single-Source DSO of size $O(M^{1/2}n^{3/2})$ with query time $\…
One of the first application of the recently introduced technique of \emph{flow-augmentation} [Kim et al., STOC 2022] is a fixed-parameter algorithm for the weighted version of \textsc{Directed Feedback Vertex Set}, a landmark problem in parameterized complexity. In this note we explore applicability of flow-augmentation to other weighted graph separation problems parameterized by the size of the cutset. We show the following. -- In weighted undirected graphs \textsc{Multicut} is FPT, both in the edge- and vertex-deletion version. -- The weighted version of \textsc{Group Feedback Vertex Set} i…
We study several problems related to graph modification problems under connectivity constraints from the perspective of parameterized complexity: {\sc (Weighted) Biconnectivity Deletion}, where we are tasked with deleting~$k$ edges while preserving biconnectivity in an undirected graph, {\sc Vertex-deletion Preserving Strong Connectivity}, where we want to maintain strong connectivity of a digraph while deleting exactly~$k$ vertices, and {\sc Path-contraction Preserving Strong Connectivity}, in which the operation of path contraction on arcs is used instead. The parameterized tractability of t…