3,961 research outputs found

    Efficient Parameterized Algorithms for Computing All-Pairs Shortest Paths

    Get PDF
    Computing all-pairs shortest paths is a fundamental and much-studied problem with many applications. Unfortunately, despite intense study, there are still no significantly faster algorithms for it than the O(n3)\mathcal{O}(n^3) time algorithm due to Floyd and Warshall (1962). Somewhat faster algorithms exist for the vertex-weighted version if fast matrix multiplication may be used. Yuster (SODA 2009) gave an algorithm running in time O(n2.842)\mathcal{O}(n^{2.842}), but no combinatorial, truly subcubic algorithm is known. Motivated by the recent framework of efficient parameterized algorithms (or "FPT in P"), we investigate the influence of the graph parameters clique-width (cwcw) and modular-width (mwmw) on the running times of algorithms for solving All-Pairs Shortest Paths. We obtain efficient (and combinatorial) parameterized algorithms on non-negative vertex-weighted graphs of times O(cw2n2)\mathcal{O}(cw^2n^2), resp. O(mw2n+n2)\mathcal{O}(mw^2n + n^2). If fast matrix multiplication is allowed then the latter can be improved to O(mw1.842n+n2)\mathcal{O}(mw^{1.842}n + n^2) using the algorithm of Yuster as a black box. The algorithm relative to modular-width is adaptive, meaning that the running time matches the best unparameterized algorithm for parameter value mwmw equal to nn, and they outperform them already for mwO(n1ε)mw \in \mathcal{O}(n^{1 - \varepsilon}) for any ε>0\varepsilon > 0

    Speeding up shortest path algorithms

    Full text link
    Given an arbitrary, non-negatively weighted, directed graph G=(V,E)G=(V,E) we present an algorithm that computes all pairs shortest paths in time O(mn+mlgn+nTψ(m,n))\mathcal{O}(m^* n + m \lg n + nT_\psi(m^*, n)), where mm^* is the number of different edges contained in shortest paths and Tψ(m,n)T_\psi(m^*, n) is a running time of an algorithm to solve a single-source shortest path problem (SSSP). This is a substantial improvement over a trivial nn times application of ψ\psi that runs in O(nTψ(m,n))\mathcal{O}(nT_\psi(m,n)). In our algorithm we use ψ\psi as a black box and hence any improvement on ψ\psi results also in improvement of our algorithm. Furthermore, a combination of our method, Johnson's reweighting technique and topological sorting results in an O(mn+mlgn)\mathcal{O}(m^*n + m \lg n) all-pairs shortest path algorithm for arbitrarily-weighted directed acyclic graphs. In addition, we also point out a connection between the complexity of a certain sorting problem defined on shortest paths and SSSP.Comment: 10 page

    Quantum and approximation algorithms for maximum witnesses of Boolean matrix products

    Full text link
    The problem of finding maximum (or minimum) witnesses of the Boolean product of two Boolean matrices (MW for short) has a number of important applications, in particular the all-pairs lowest common ancestor (LCA) problem in directed acyclic graphs (dags). The best known upper time-bound on the MW problem for n\times n Boolean matrices of the form O(n^{2.575}) has not been substantially improved since 2006. In order to obtain faster algorithms for this problem, we study quantum algorithms for MW and approximation algorithms for MW (in the standard computational model). Some of our quantum algorithms are input or output sensitive. Our fastest quantum algorithm for the MW problem, and consequently for the related problems, runs in time \tilde{O}(n^{2+\lambda/2})=\tilde{O}(n^{2.434}), where \lambda satisfies the equation \omega(1, \lambda, 1) = 1 + 1.5 \, \lambda and \omega(1, \lambda, 1) is the exponent of the multiplication of an n \times n^{\lambda}$ matrix by an n^{\lambda} \times n matrix. Next, we consider a relaxed version of the MW problem (in the standard model) asking for reporting a witness of bounded rank (the maximum witness has rank 1) for each non-zero entry of the matrix product. First, by adapting the fastest known algorithm for maximum witnesses, we obtain an algorithm for the relaxed problem that reports for each non-zero entry of the product matrix a witness of rank at most \ell in time \tilde{O}((n/\ell)n^{\omega(1,\log_n \ell,1)}). Then, by reducing the relaxed problem to the so called k-witness problem, we provide an algorithm that reports for each non-zero entry C[i,j] of the product matrix C a witness of rank O(\lceil W_C(i,j)/k\rceil ), where W_C(i,j) is the number of witnesses for C[i,j], with high probability. The algorithm runs in \tilde{O}(n^{\omega}k^{0.4653} +n^2k) time, where \omega=\omega(1,1,1).Comment: 14 pages, 3 figure

    Combining All Pairs Shortest Paths and All Pairs Bottleneck Paths Problems

    Full text link
    We introduce a new problem that combines the well known All Pairs Shortest Paths (APSP) problem and the All Pairs Bottleneck Paths (APBP) problem to compute the shortest paths for all pairs of vertices for all possible flow amounts. We call this new problem the All Pairs Shortest Paths for All Flows (APSP-AF) problem. We firstly solve the APSP-AF problem on directed graphs with unit edge costs and real edge capacities in O~(tn(ω+9)/4)=O~(tn2.843)\tilde{O}(\sqrt{t}n^{(\omega+9)/4}) = \tilde{O}(\sqrt{t}n^{2.843}) time, where nn is the number of vertices, tt is the number of distinct edge capacities (flow amounts) and O(nω)<O(n2.373)O(n^{\omega}) < O(n^{2.373}) is the time taken to multiply two nn-by-nn matrices over a ring. Secondly we extend the problem to graphs with positive integer edge costs and present an algorithm with O~(tc(ω+5)/4n(ω+9)/4)=O~(tc1.843n2.843)\tilde{O}(\sqrt{t}c^{(\omega+5)/4}n^{(\omega+9)/4}) = \tilde{O}(\sqrt{t}c^{1.843}n^{2.843}) worst case time complexity, where cc is the upper bound on edge costs

    The graph bottleneck identity

    Get PDF
    A matrix S=(sij)Rn×nS=(s_{ij})\in{\mathbb R}^{n\times n} is said to determine a \emph{transitional measure} for a digraph GG on nn vertices if for all i,j,k{1,.˙.,n},i,j,k\in\{1,\...,n\}, the \emph{transition inequality} sijsjksiksjjs_{ij} s_{jk}\le s_{ik} s_{jj} holds and reduces to the equality (called the \emph{graph bottleneck identity}) if and only if every path in GG from ii to kk contains jj. We show that every positive transitional measure produces a distance by means of a logarithmic transformation. Moreover, the resulting distance d(,)d(\cdot,\cdot) is \emph{graph-geodetic}, that is, d(i,j)+d(j,k)=d(i,k)d(i,j)+d(j,k)=d(i,k) holds if and only if every path in GG connecting ii and kk contains jj. Five types of matrices that determine transitional measures for a digraph are considered, namely, the matrices of path weights, connection reliabilities, route weights, and the weights of in-forests and out-forests. The results obtained have undirected counterparts. In [P. Chebotarev, A class of graph-geodetic distances generalizing the shortest-path and the resistance distances, Discrete Appl. Math., URL http://dx.doi.org/10.1016/j.dam.2010.11.017] the present approach is used to fill the gap between the shortest path distance and the resistance distance.Comment: 12 pages, 18 references. Advances in Applied Mathematic

    All-Pairs Minimum Cuts in Near-Linear Time for Surface-Embedded Graphs

    Get PDF
    For an undirected nn-vertex graph GG with non-negative edge-weights, we consider the following type of query: given two vertices ss and tt in GG, what is the weight of a minimum stst-cut in GG? We solve this problem in preprocessing time O(nlog3n)O(n\log^3 n) for graphs of bounded genus, giving the first sub-quadratic time algorithm for this class of graphs. Our result also improves by a logarithmic factor a previous algorithm by Borradaile, Sankowski and Wulff-Nilsen (FOCS 2010) that applied only to planar graphs. Our algorithm constructs a Gomory-Hu tree for the given graph, providing a data structure with space O(n)O(n) that can answer minimum-cut queries in constant time. The dependence on the genus of the input graph in our preprocessing time is 2O(g2)2^{O(g^2)}
    corecore