166,712 research outputs found

    IST Austria Technical Report

    Get PDF
    We consider the problem of developing automated techniques to aid the average-case complexity analysis of programs. Several classical textbook algorithms have quite efficient average-case complexity, whereas the corresponding worst-case bounds are either inefficient (e.g., QUICK-SORT), or completely ineffective (e.g., COUPONCOLLECTOR). Since the main focus of average-case analysis is to obtain efficient bounds, we consider bounds that are either logarithmic, linear, or almost-linear (O(log n), O(n), O(n · log n), respectively, where n represents the size of the input). Our main contribution is a sound approach for deriving such average-case bounds for randomized recursive programs. Our approach is efficient (a simple linear-time algorithm), and it is based on (a) the analysis of recurrence relations induced by randomized algorithms, and (b) a guess-and-check technique. Our approach can infer the asymptotically optimal average-case bounds for classical randomized algorithms, including RANDOMIZED-SEARCH, QUICKSORT, QUICK-SELECT, COUPON-COLLECTOR, where the worstcase bounds are either inefficient (such as linear as compared to logarithmic of average-case, or quadratic as compared to linear or almost-linear of average-case), or ineffective. We have implemented our approach, and the experimental results show that we obtain the bounds efficiently for various classical algorithms

    Linear-Time Algorithm for Long LCF with k Mismatches

    Get PDF
    In the Longest Common Factor with k Mismatches (LCF_k) problem, we are given two strings X and Y of total length n, and we are asked to find a pair of maximal-length factors, one of X and the other of Y, such that their Hamming distance is at most k. Thankachan et al. [Thankachan et al. 2016] show that this problem can be solved in O(n log^k n) time and O(n) space for constant k. We consider the LCF_k(l) problem in which we assume that the sought factors have length at least l. We use difference covers to reduce the LCF_k(l) problem with l=Omega(log^{2k+2}n) to a task involving m=O(n/log^{k+1}n) synchronized factors. The latter can be solved in O(m log^{k+1}m) time, which results in a linear-time algorithm for LCF_k(l) with l=Omega(log^{2k+2}n). In general, our solution to the LCF_k(l) problem for arbitrary l takes O(n + n log^{k+1} n/sqrt{l}) time

    Dynamic Low-Stretch Trees via Dynamic Low-Diameter Decompositions

    Full text link
    Spanning trees of low average stretch on the non-tree edges, as introduced by Alon et al. [SICOMP 1995], are a natural graph-theoretic object. In recent years, they have found significant applications in solvers for symmetric diagonally dominant (SDD) linear systems. In this work, we provide the first dynamic algorithm for maintaining such trees under edge insertions and deletions to the input graph. Our algorithm has update time n1/2+o(1) n^{1/2 + o(1)} and the average stretch of the maintained tree is no(1) n^{o(1)} , which matches the stretch in the seminal result of Alon et al. Similar to Alon et al., our dynamic low-stretch tree algorithm employs a dynamic hierarchy of low-diameter decompositions (LDDs). As a major building block we use a dynamic LDD that we obtain by adapting the random-shift clustering of Miller et al. [SPAA 2013] to the dynamic setting. The major technical challenge in our approach is to control the propagation of updates within our hierarchy of LDDs: each update to one level of the hierarchy could potentially induce several insertions and deletions to the next level of the hierarchy. We achieve this goal by a sophisticated amortization approach. We believe that the dynamic random-shift clustering might be useful for independent applications. One of these applications is the dynamic spanner problem. By combining the random-shift clustering with the recent spanner construction of Elkin and Neiman [SODA 2017]. We obtain a fully dynamic algorithm for maintaining a spanner of stretch 2k1 2k - 1 and size O(n1+1/klogn) O (n^{1 + 1/k} \log{n}) with amortized update time O(klog2n) O (k \log^2 n) for any integer 2klogn 2 \leq k \leq \log n . Compared to the state-of-the art in this regime [Baswana et al. TALG '12], we improve upon the size of the spanner and the update time by a factor of k k .Comment: To be presented at the 51st Annual ACM Symposium on the Theory of Computing (STOC 2019); abstract shortened to respect the arXiv limit of 1920 character

    Near-linear Time Algorithm for Approximate Minimum Degree Spanning Trees

    Full text link
    Given a graph G=(V,E)G = (V, E), we wish to compute a spanning tree whose maximum vertex degree, i.e. tree degree, is as small as possible. Computing the exact optimal solution is known to be NP-hard, since it generalizes the Hamiltonian path problem. For the approximation version of this problem, a O~(mn)\tilde{O}(mn) time algorithm that computes a spanning tree of degree at most Δ+1\Delta^* +1 is previously known [F\"urer \& Raghavachari 1994]; here Δ\Delta^* denotes the minimum tree degree of all the spanning trees. In this paper we give the first near-linear time approximation algorithm for this problem. Specifically speaking, we propose an O~(1ϵ7m)\tilde{O}(\frac{1}{\epsilon^7}m) time algorithm that computes a spanning tree with tree degree (1+ϵ)Δ+O(1ϵ2logn)(1+\epsilon)\Delta^* + O(\frac{1}{\epsilon^2}\log n) for any constant ϵ(0,16)\epsilon \in (0,\frac{1}{6}). Thus, when Δ=ω(logn)\Delta^*=\omega(\log n), we can achieve approximate solutions with constant approximate ratio arbitrarily close to 1 in near-linear time.Comment: 17 page

    A Linear-time Algorithm for Sparsification of Unweighted Graphs

    Full text link
    Given an undirected graph GG and an error parameter ϵ>0\epsilon > 0, the {\em graph sparsification} problem requires sampling edges in GG and giving the sampled edges appropriate weights to obtain a sparse graph GϵG_{\epsilon} with the following property: the weight of every cut in GϵG_{\epsilon} is within a factor of (1±ϵ)(1\pm \epsilon) of the weight of the corresponding cut in GG. If GG is unweighted, an O(mlogn)O(m\log n)-time algorithm for constructing GϵG_{\epsilon} with O(nlogn/ϵ2)O(n\log n/\epsilon^2) edges in expectation, and an O(m)O(m)-time algorithm for constructing GϵG_{\epsilon} with O(nlog2n/ϵ2)O(n\log^2 n/\epsilon^2) edges in expectation have recently been developed (Hariharan-Panigrahi, 2010). In this paper, we improve these results by giving an O(m)O(m)-time algorithm for constructing GϵG_{\epsilon} with O(nlogn/ϵ2)O(n\log n/\epsilon^2) edges in expectation, for unweighted graphs. Our algorithm is optimal in terms of its time complexity; further, no efficient algorithm is known for constructing a sparser GϵG_{\epsilon}. Our algorithm is Monte-Carlo, i.e. it produces the correct output with high probability, as are all efficient graph sparsification algorithms

    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