109,310 research outputs found

    Sparse Dynamic Programming on DAGs with Small Width

    Get PDF
    The minimum path cover problem asks us to find a minimum-cardinality set of paths that cover all the nodes of a directed acyclic graph (DAG). We study the case when the size k of a minimum path cover is small, that is, when the DAG has a small width. This case is motivated by applications in pan-genomics, where the genomic variation of a population is expressed as a DAG. We observe that classical alignment algorithms exploiting sparse dynamic programming can be extended to the sequence-against-DAG case by mimicking the algorithm for sequences on each path of a minimum path cover and handling an evaluation order anomaly with reachability queries. Namely, we introduce a general framework for DAG-extensions of sparse dynamic programming. This framework produces algorithms that are slower than their counterparts on sequences only by a factor k. We illustrate this on two classical problems extended to DAGs: longest increasing subsequence and longest common subsequence. For the former, we obtain an algorithm with running time O(k vertical bar E vertical bar log vertical bar V vertical bar). This matches the optimal solution to the classical problem variant when the input sequence is modeled as a path. We obtain an analogous result for the longest common subsequence problem. We then apply this technique to the co-linear chaining problem, which is a generalization of the above two problems. The algorithm for this problem turns out to be more involved, needing further ingredients, such as an FM-index tailored for large alphabets and a two-dimensional range search tree modified to support range maximum queries. We also study a general sequence-to-DAG alignment formulation that allows affine gap costs in the sequence. The main ingredient of the proposed framework is a new algorithm for finding a minimum path cover of a DAG (V, E) in O(k vertical bar E vertical bar log vertical bar V vertical bar) time, improving all known time-bounds when k is small and the DAG is not too dense. In addition to boosting the sparse dynamic programming framework, an immediate consequence of this new minimum path cover algorithm is an improved space/time tradeoff for reachability queries in arbitrary directed graphs.Peer reviewe

    Weighted Min-Cut: Sequential, Cut-Query and Streaming Algorithms

    Get PDF
    Consider the following 2-respecting min-cut problem. Given a weighted graph GG and its spanning tree TT, find the minimum cut among the cuts that contain at most two edges in TT. This problem is an important subroutine in Karger's celebrated randomized near-linear-time min-cut algorithm [STOC'96]. We present a new approach for this problem which can be easily implemented in many settings, leading to the following randomized min-cut algorithms for weighted graphs. * An O(mlog⁥2nlog⁥log⁥n+nlog⁥6n)O(m\frac{\log^2 n}{\log\log n} + n\log^6 n)-time sequential algorithm: This improves Karger's O(mlog⁥3n)O(m \log^3 n) and O(m(log⁥2n)log⁥(n2/m)log⁥log⁥n+nlog⁥6n)O(m\frac{(\log^2 n)\log (n^2/m)}{\log\log n} + n\log^6 n) bounds when the input graph is not extremely sparse or dense. Improvements over Karger's bounds were previously known only under a rather strong assumption that the input graph is simple [Henzinger et al. SODA'17; Ghaffari et al. SODA'20]. For unweighted graphs with parallel edges, our bound can be improved to O(mlog⁥1.5nlog⁥log⁥n+nlog⁥6n)O(m\frac{\log^{1.5} n}{\log\log n} + n\log^6 n). * An algorithm requiring O~(n)\tilde O(n) cut queries to compute the min-cut of a weighted graph: This answers an open problem by Rubinstein et al. ITCS'18, who obtained a similar bound for simple graphs. * A streaming algorithm that requires O~(n)\tilde O(n) space and O(log⁥n)O(\log n) passes to compute the min-cut: The only previous non-trivial exact min-cut algorithm in this setting is the 2-pass O~(n)\tilde O(n)-space algorithm on simple graphs [Rubinstein et al., ITCS'18] (observed by Assadi et al. STOC'19). In contrast to Karger's 2-respecting min-cut algorithm which deploys sophisticated dynamic programming techniques, our approach exploits some cute structural properties so that it only needs to compute the values of O~(n)\tilde O(n) cuts corresponding to removing O~(n)\tilde O(n) pairs of tree edges, an operation that can be done quickly in many settings.Comment: Updates on this version: (1) Minor corrections in Section 5.1, 5.2; (2) Reference to newer results by GMW SOSA21 (arXiv:2008.02060v2), DEMN STOC21 (arXiv:2004.09129v2) and LMN 21 (arXiv:2102.06565v1

    LRM-Trees: Compressed Indices, Adaptive Sorting, and Compressed Permutations

    Full text link
    LRM-Trees are an elegant way to partition a sequence of values into sorted consecutive blocks, and to express the relative position of the first element of each block within a previous block. They were used to encode ordinal trees and to index integer arrays in order to support range minimum queries on them. We describe how they yield many other convenient results in a variety of areas, from data structures to algorithms: some compressed succinct indices for range minimum queries; a new adaptive sorting algorithm; and a compressed succinct data structure for permutations supporting direct and indirect application in time all the shortest as the permutation is compressible.Comment: 13 pages, 1 figur

    Efficient Batch Query Answering Under Differential Privacy

    Full text link
    Differential privacy is a rigorous privacy condition achieved by randomizing query answers. This paper develops efficient algorithms for answering multiple queries under differential privacy with low error. We pursue this goal by advancing a recent approach called the matrix mechanism, which generalizes standard differentially private mechanisms. This new mechanism works by first answering a different set of queries (a strategy) and then inferring the answers to the desired workload of queries. Although a few strategies are known to work well on specific workloads, finding the strategy which minimizes error on an arbitrary workload is intractable. We prove a new lower bound on the optimal error of this mechanism, and we propose an efficient algorithm that approaches this bound for a wide range of workloads.Comment: 6 figues, 22 page

    Exact Distance Oracles for Planar Graphs

    Full text link
    We present new and improved data structures that answer exact node-to-node distance queries in planar graphs. Such data structures are also known as distance oracles. For any directed planar graph on n nodes with non-negative lengths we obtain the following: * Given a desired space allocation S∈[nlg⁥lg⁥n,n2]S\in[n\lg\lg n,n^2], we show how to construct in O~(S)\tilde O(S) time a data structure of size O(S)O(S) that answers distance queries in O~(n/S)\tilde O(n/\sqrt S) time per query. As a consequence, we obtain an improvement over the fastest algorithm for k-many distances in planar graphs whenever k∈[n,n)k\in[\sqrt n,n). * We provide a linear-space exact distance oracle for planar graphs with query time O(n1/2+eps)O(n^{1/2+eps}) for any constant eps>0. This is the first such data structure with provable sublinear query time. * For edge lengths at least one, we provide an exact distance oracle of space O~(n)\tilde O(n) such that for any pair of nodes at distance D the query time is O~(minD,n)\tilde O(min {D,\sqrt n}). Comparable query performance had been observed experimentally but has never been explained theoretically. Our data structures are based on the following new tool: given a non-self-crossing cycle C with c=O(n)c = O(\sqrt n) nodes, we can preprocess G in O~(n)\tilde O(n) time to produce a data structure of size O(nlg⁥lg⁥c)O(n \lg\lg c) that can answer the following queries in O~(c)\tilde O(c) time: for a query node u, output the distance from u to all the nodes of C. This data structure builds on and extends a related data structure of Klein (SODA'05), which reports distances to the boundary of a face, rather than a cycle. The best distance oracles for planar graphs until the current work are due to Cabello (SODA'06), Djidjev (WG'96), and Fakcharoenphol and Rao (FOCS'01). For σ∈(1,4/3)\sigma\in(1,4/3) and space S=nσS=n^\sigma, we essentially improve the query time from n2/Sn^2/S to n2/S\sqrt{n^2/S}.Comment: To appear in the proceedings of the 23rd ACM-SIAM Symposium on Discrete Algorithms, SODA 201
    • 

    corecore