539 research outputs found

    Algorithms, Reductions and Equivalences for Small Weight Variants of All-Pairs Shortest Paths

    Get PDF
    APSP with small integer weights in undirected graphs [Seidel'95, Galil and Margalit'97] has an O~(nω)\tilde{O}(n^\omega) time algorithm, where ω<2.373\omega<2.373 is the matrix multiplication exponent. APSP in directed graphs with small weights however, has a much slower running time that would be Ω(n2.5)\Omega(n^{2.5}) even if ω=2\omega=2 [Zwick'02]. To understand this n2.5n^{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 the value of ω\omega. As a consequence, we establish an equivalence between APSP in directed unweighted graphs, APSP in directed graphs with small (O~(1))(\tilde{O}(1)) integer weights, All-Pairs Longest Paths in DAGs with small weights, approximate APSP with additive error cc in directed graphs with small weights, for cO~(1)c\le \tilde{O}(1) and several other graph problems. We also provide fine-grained reductions from directed unweighted APSP to All-Pairs Shortest Lightest Paths (APSLP) in undirected graphs with {0,1}\{0,1\} weights and #mod c\#_{\text{mod}\ c}APSP in directed unweighted graphs (computing counts mod cc). We complement our hardness results with new algorithms. We improve the known algorithms for APSLP in directed graphs with small integer weights and for approximate APSP with sublinear additive error in directed unweighted graphs. Our algorithm for approximate APSP with sublinear additive error is optimal, when viewed as a reduction to Min-Plus product. We also give new algorithms for variants of #APSP in unweighted graphs, as well as a near-optimal O~(n3)\tilde{O}(n^3)-time algorithm for the original #APSP problem in unweighted graphs. Our techniques also lead to a simpler alternative for the original APSP problem in undirected graphs with small integer weights.Comment: abstract shortened to fit arXiv requirement

    Sublinear Distance Labeling

    Get PDF
    A distance labeling scheme labels the nn nodes of a graph with binary strings such that, given the labels of any two nodes, one can determine the distance in the graph between the two nodes by looking only at the labels. A DD-preserving distance labeling scheme only returns precise distances between pairs of nodes that are at distance at least DD from each other. In this paper we consider distance labeling schemes for the classical case of unweighted graphs with both directed and undirected edges. We present a O(nDlog2D)O(\frac{n}{D}\log^2 D) bit DD-preserving distance labeling scheme, improving the previous bound by Bollob\'as et. al. [SIAM J. Discrete Math. 2005]. We also give an almost matching lower bound of Ω(nD)\Omega(\frac{n}{D}). With our DD-preserving distance labeling scheme as a building block, we additionally achieve the following results: 1. We present the first distance labeling scheme of size o(n)o(n) for sparse graphs (and hence bounded degree graphs). This addresses an open problem by Gavoille et. al. [J. Algo. 2004], hereby separating the complexity from distance labeling in general graphs which require Ω(n)\Omega(n) bits, Moon [Proc. of Glasgow Math. Association 1965]. 2. For approximate rr-additive labeling schemes, that return distances within an additive error of rr we show a scheme of size O(nrpolylog(rlogn)logn)O\left ( \frac{n}{r} \cdot\frac{\operatorname{polylog} (r\log n)}{\log n} \right ) for r2r \ge 2. This improves on the current best bound of O(nr)O\left(\frac{n}{r}\right) by Alstrup et. al. [SODA 2016] for sub-polynomial rr, and is a generalization of a result by Gawrychowski et al. [arXiv preprint 2015] who showed this for r=2r=2.Comment: A preliminary version of this paper appeared at ESA'1

    Streaming Complexity of Spanning Tree Computation

    Get PDF
    The semi-streaming model is a variant of the streaming model frequently used for the computation of graph problems. It allows the edges of an n-node input graph to be read sequentially in p passes using Õ(n) space. If the list of edges includes deletions, then the model is called the turnstile model; otherwise it is called the insertion-only model. In both models, some graph problems, such as spanning trees, k-connectivity, densest subgraph, degeneracy, cut-sparsifier, and (Δ+1)-coloring, can be exactly solved or (1+ε)-approximated in a single pass; while other graph problems, such as triangle detection and unweighted all-pairs shortest paths, are known to require Ω̃(n) passes to compute. For many fundamental graph problems, the tractability in these models is open. In this paper, we study the tractability of computing some standard spanning trees, including BFS, DFS, and maximum-leaf spanning trees. Our results, in both the insertion-only and the turnstile models, are as follows. Maximum-Leaf Spanning Trees: This problem is known to be APX-complete with inapproximability constant ρ ∈ [245/244, 2). By constructing an ε-MLST sparsifier, we show that for every constant ε > 0, MLST can be approximated in a single pass to within a factor of 1+ε w.h.p. (albeit in super-polynomial time for ε ≤ ρ-1 assuming P ≠ NP) and can be approximated in polynomial time in a single pass to within a factor of ρ_n+ε w.h.p., where ρ_n is the supremum constant that MLST cannot be approximated to within using polynomial time and Õ(n) space. In the insertion-only model, these algorithms can be deterministic. BFS Trees: It is known that BFS trees require ω(1) passes to compute, but the naïve approach needs O(n) passes. We devise a new randomized algorithm that reduces the pass complexity to O(√n), and it offers a smooth tradeoff between pass complexity and space usage. This gives a polynomial separation between single-source and all-pairs shortest paths for unweighted graphs. DFS Trees: It is unknown whether DFS trees require more than one pass. The current best algorithm by Khan and Mehta [STACS 2019] takes Õ(h) passes, where h is the height of computed DFS trees. Note that h can be as large as Ω(m/n) for n-node m-edge graphs. Our contribution is twofold. First, we provide a simple alternative proof of this result, via a new connection to sparse certificates for k-node-connectivity. Second, we present a randomized algorithm that reduces the pass complexity to O(√n), and it also offers a smooth tradeoff between pass complexity and space usage.ISSN:1868-896

    Clustered Integer 3SUM via Additive Combinatorics

    Full text link
    We present a collection of new results on problems related to 3SUM, including: 1. The first truly subquadratic algorithm for      \ \ \ \ \ 1a. computing the (min,+) convolution for monotone increasing sequences with integer values bounded by O(n)O(n),      \ \ \ \ \ 1b. solving 3SUM for monotone sets in 2D with integer coordinates bounded by O(n)O(n), and      \ \ \ \ \ 1c. preprocessing a binary string for histogram indexing (also called jumbled indexing). The running time is: O(n(9+177)/12polylogn)=O(n1.859)O(n^{(9+\sqrt{177})/12}\,\textrm{polylog}\,n)=O(n^{1.859}) with randomization, or O(n1.864)O(n^{1.864}) deterministically. This greatly improves the previous n2/2Ω(logn)n^2/2^{\Omega(\sqrt{\log n})} time bound obtained from Williams' recent result on all-pairs shortest paths [STOC'14], and answers an open question raised by several researchers studying the histogram indexing problem. 2. The first algorithm for histogram indexing for any constant alphabet size that achieves truly subquadratic preprocessing time and truly sublinear query time. 3. A truly subquadratic algorithm for integer 3SUM in the case when the given set can be partitioned into n1δn^{1-\delta} clusters each covered by an interval of length nn, for any constant δ>0\delta>0. 4. An algorithm to preprocess any set of nn integers so that subsequently 3SUM on any given subset can be solved in O(n13/7polylogn)O(n^{13/7}\,\textrm{polylog}\,n) time. All these results are obtained by a surprising new technique, based on the Balog--Szemer\'edi--Gowers Theorem from additive combinatorics

    Distance Oracles for Time-Dependent Networks

    Full text link
    We present the first approximate distance oracle for sparse directed networks with time-dependent arc-travel-times determined by continuous, piecewise linear, positive functions possessing the FIFO property. Our approach precomputes (1+ϵ)(1+\epsilon)-approximate distance summaries from selected landmark vertices to all other vertices in the network. Our oracle uses subquadratic space and time preprocessing, and provides two sublinear-time query algorithms that deliver constant and (1+σ)(1+\sigma)-approximate shortest-travel-times, respectively, for arbitrary origin-destination pairs in the network, for any constant σ>ϵ\sigma > \epsilon. Our oracle is based only on the sparsity of the network, along with two quite natural assumptions about travel-time functions which allow the smooth transition towards asymmetric and time-dependent distance metrics.Comment: A preliminary version appeared as Technical Report ECOMPASS-TR-025 of EU funded research project eCOMPASS (http://www.ecompass-project.eu/). An extended abstract also appeared in the 41st International Colloquium on Automata, Languages, and Programming (ICALP 2014, track-A

    Improved Distributed Algorithms for Exact Shortest Paths

    Full text link
    Computing shortest paths is one of the central problems in the theory of distributed computing. For the last few years, substantial progress has been made on the approximate single source shortest paths problem, culminating in an algorithm of Becker et al. [DISC'17] which deterministically computes (1+o(1))(1+o(1))-approximate shortest paths in O~(D+n)\tilde O(D+\sqrt n) time, where DD is the hop-diameter of the graph. Up to logarithmic factors, this time complexity is optimal, matching the lower bound of Elkin [STOC'04]. The question of exact shortest paths however saw no algorithmic progress for decades, until the recent breakthrough of Elkin [STOC'17], which established a sublinear-time algorithm for exact single source shortest paths on undirected graphs. Shortly after, Huang et al. [FOCS'17] provided improved algorithms for exact all pairs shortest paths problem on directed graphs. In this paper, we present a new single-source shortest path algorithm with complexity O~(n3/4D1/4)\tilde O(n^{3/4}D^{1/4}). For polylogarithmic DD, this improves on Elkin's O~(n5/6)\tilde{O}(n^{5/6}) bound and gets closer to the Ω~(n1/2)\tilde{\Omega}(n^{1/2}) lower bound of Elkin [STOC'04]. For larger values of DD, we present an improved variant of our algorithm which achieves complexity O~(n3/4+o(1)+min{n3/4D1/6,n6/7}+D)\tilde{O}\left( n^{3/4+o(1)}+ \min\{ n^{3/4}D^{1/6},n^{6/7}\}+D\right), and thus compares favorably with Elkin's bound of O~(n5/6+n2/3D1/3+D)\tilde{O}(n^{5/6} + n^{2/3}D^{1/3} + D ) in essentially the entire range of parameters. This algorithm provides also a qualitative improvement, because it works for the more challenging case of directed graphs (i.e., graphs where the two directions of an edge can have different weights), constituting the first sublinear-time algorithm for directed graphs. Our algorithm also extends to the case of exact κ\kappa-source shortest paths...Comment: 26 page
    corecore