103 research outputs found

    Why is it hard to beat O(n2)O(n^2) for Longest Common Weakly Increasing Subsequence?

    Full text link
    The Longest Common Weakly Increasing Subsequence problem (LCWIS) is a variant of the classic Longest Common Subsequence problem (LCS). Both problems can be solved with simple quadratic time algorithms. A recent line of research led to a number of matching conditional lower bounds for LCS and other related problems. However, the status of LCWIS remained open. In this paper we show that LCWIS cannot be solved in strongly subquadratic time unless the Strong Exponential Time Hypothesis (SETH) is false. The ideas which we developed can also be used to obtain a lower bound based on a safer assumption of NC-SETH, i.e. a version of SETH which talks about NC circuits instead of less expressive CNF formulas

    A Simple Algorithm for Approximating the Text-To-Pattern Hamming Distance

    Get PDF
    The algorithmic task of computing the Hamming distance between a given pattern of length m and each location in a text of length n, both over a general alphabet Sigma, is one of the most fundamental algorithmic tasks in string algorithms. The fastest known runtime for exact computation is tilde O(nsqrt m). We recently introduced a complicated randomized algorithm for obtaining a (1 +/- eps) approximation for each location in the text in O( (n/eps) log(1/eps) log n log m log |Sigma|) total time, breaking a barrier that stood for 22 years. In this paper, we introduce an elementary and simple randomized algorithm that takes O((n/eps) log n log m) time

    Coloring Graphs having Few Colorings over Path Decompositions

    Full text link
    Lokshtanov, Marx, and Saurabh SODA 2011 proved that there is no (kϵ)pw(G)poly(n)(k-\epsilon)^{\operatorname{pw}(G)}\operatorname{poly}(n) time algorithm for deciding if an nn-vertex graph GG with pathwidth pw(G)\operatorname{pw}(G) admits a proper vertex coloring with kk colors unless the Strong Exponential Time Hypothesis (SETH) is false. We show here that nevertheless, when k>Δ/2+1k>\lfloor \Delta/2 \rfloor + 1, where Δ\Delta is the maximum degree in the graph GG, there is a better algorithm, at least when there are few colorings. We present a Monte Carlo algorithm that given a graph GG along with a path decomposition of GG with pathwidth pw(G)\operatorname{pw}(G) runs in (Δ/2+1)pw(G)poly(n)s(\lfloor \Delta/2 \rfloor + 1)^{\operatorname{pw}(G)}\operatorname{poly}(n)s time, that distinguishes between kk-colorable graphs having at most ss proper kk-colorings and non-kk-colorable graphs. We also show how to obtain a kk-coloring in the same asymptotic running time. Our algorithm avoids violating SETH for one since high degree vertices still cost too much and the mentioned hardness construction uses a lot of them. We exploit a new variation of the famous Alon--Tarsi theorem that has an algorithmic advantage over the original form. The original theorem shows a graph has an orientation with outdegree less than kk at every vertex, with a different number of odd and even Eulerian subgraphs only if the graph is kk-colorable, but there is no known way of efficiently finding such an orientation. Our new form shows that if we instead count another difference of even and odd subgraphs meeting modular degree constraints at every vertex picked uniformly at random, we have a fair chance of getting a non-zero value if the graph has few kk-colorings. Yet every non-kk-colorable graph gives a zero difference, so a random set of constraints stands a good chance of being useful for separating the two cases.Comment: Strengthened result from uniquely kk-colorable graphs to graphs with few kk-colorings. Also improved running tim

    Edit Distance Cannot Be Computed in Strongly Subquadratic Time (Unless SETH is False)

    No full text
    © 2018 Society for Industrial and Applied Mathematics. The edit distance (a.k.a. the Levenshtein distance) between two strings is defined as the minimum number of insertions, deletions, or substitutions of symbols needed to transform one string into another. The problem of computing the edit distance between two strings is a classical computational task, with a well-known algorithm based on dynamic programming. Unfortunately, all known algorithms for this problem run in nearly quadratic time. In this paper we provide evidence that the near-quadratic running time bounds known for the problem of computing edit distance might be tight. Specifically, we show that if the edit distance can be computed in time O(n2−δ) for some constant δ > 0, then the satisfiability of conjunctive normal form formulas with N variables and M clauses can be solved in time MO(1)2(1−)N for a constant > 0. The latter result would violate the strong exponential time hypothesis, which postulates that such algorithms do not exist

    Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false)

    No full text
    The edit distance (a.k.a. the Levenshtein distance) between two strings is defined as the minimum number of insertions, deletions or substitutions of symbols needed to transform one string into another. The problem of computing the edit distance between two strings is a classical computational task, with a well-known algorithm based on dynamic programming. Unfortunately, all known algorithms for this problem run in nearly quadratic time. In this paper we provide evidence that the near-quadratic running time bounds known for the problem of computing edit distance might be {tight}. Specifically, we show that, if the edit distance can be computed in time O(n[superscript 2-δ]) for some constant δ>0, then the satisfiability of conjunctive normal form formulas with N variables and M clauses can be solved in time M[superscript O(1)] 2[superscript (1-ε)N] for a constant ε>0. The latter result would violate the Strong Exponential Time Hypothesis, which postulates that such algorithms do not existNational Science Foundation (U.S.)IBM (PhD Felllowship)Center for Massive Data Algorithmics (MADALGO)Simons Foundation (Investigator Award

    Coloring Graphs Having Few Colorings Over Path Decompositions

    Get PDF
    Lokshtanov, Marx, and Saurabh SODA 2011 proved that there is no (k-epsilon)^pw(G)poly(n) time algorithm for deciding if an n-vertex graph G with pathwidth pw admits a proper vertex coloring with k colors unless the Strong Exponential Time Hypothesis (SETH) is false, for any constant epsilon>0. We show here that nevertheless, when k>lfloor Delta/2 rfloor + 1, where Delta is the maximum degree in the graph G, there is a better algorithm, at least when there are few colorings. We present a Monte Carlo algorithm that given a graph G along with a path decomposition of G with pathwidth pw(G) runs in (lfloor Delta/2 rfloor + 1)^pw(G)poly(n)s time, that distinguishes between k-colorable graphs having at most s proper k-colorings and non-k-colorable graphs. We also show how to obtain a k-coloring in the same asymptotic running time. Our algorithm avoids violating SETH for one since high degree vertices still cost too much and the mentioned hardness construction uses a lot of them. We exploit a new variation of the famous Alon--Tarsi theorem that has an algorithmic advantage over the original form. The original theorem shows a graph has an orientation with outdegree less than k at every vertex, with a different number of odd and even Eulerian subgraphs only if the graph is k-colorable, but there is no known way of efficiently finding such an orientation. Our new form shows that if we instead count another difference of even and odd subgraphs meeting modular degree constraints at every vertex picked uniformly at random, we have a fair chance of getting a non-zero value if the graph has few k-colorings. Yet every non-k-colorable graph gives a zero difference, so a random set of constraints stands a good chance of being useful for separating the two cases

    On the Hardness of Partially Dynamic Graph Problems and Connections to Diameter

    Get PDF
    Conditional lower bounds for dynamic graph problems has received a great deal of attention in recent years. While many results are now known for the fully-dynamic case and such bounds often imply worst-case bounds for the partially dynamic setting, it seems much more difficult to prove amortized bounds for incremental and decremental algorithms. In this paper we consider partially dynamic versions of three classic problems in graph theory. Based on popular conjectures we show that: -- No algorithm with amortized update time O(n1ε)O(n^{1-\varepsilon}) exists for incremental or decremental maximum cardinality bipartite matching. This significantly improves on the O(m1/2ε)O(m^{1/2-\varepsilon}) bound for sparse graphs of Henzinger et al. [STOC'15] and O(n1/3ε)O(n^{1/3-\varepsilon}) bound of Kopelowitz, Pettie and Porat. Our linear bound also appears more natural. In addition, the result we present separates the node-addition model from the edge insertion model, as an algorithm with total update time O(mn)O(m\sqrt{n}) exists for the former by Bosek et al. [FOCS'14]. -- No algorithm with amortized update time O(m1ε)O(m^{1-\varepsilon}) exists for incremental or decremental maximum flow in directed and weighted sparse graphs. No such lower bound was known for partially dynamic maximum flow previously. Furthermore no algorithm with amortized update time O(n1ε)O(n^{1-\varepsilon}) exists for directed and unweighted graphs or undirected and weighted graphs. -- No algorithm with amortized update time O(n1/2ε)O(n^{1/2 - \varepsilon}) exists for incremental or decremental (4/3ε)(4/3-\varepsilon')-approximating the diameter of an unweighted graph. We also show a slightly stronger bound if node additions are allowed. [...]Comment: To appear at ICALP'16. Abstract truncated to fit arXiv limit
    corecore