4,619 research outputs found
Sparse Dynamic Programming on DAGs with Small Width
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
Faster subsequence recognition in compressed strings
Computation on compressed strings is one of the key approaches to processing
massive data sets. We consider local subsequence recognition problems on
strings compressed by straight-line programs (SLP), which is closely related to
Lempel--Ziv compression. For an SLP-compressed text of length , and an
uncompressed pattern of length , C{\'e}gielski et al. gave an algorithm for
local subsequence recognition running in time . We improve
the running time to . Our algorithm can also be used to
compute the longest common subsequence between a compressed text and an
uncompressed pattern in time ; the same problem with a
compressed pattern is known to be NP-hard
Why is it hard to beat for Longest Common Weakly Increasing Subsequence?
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
Fine-Grained Complexity Analysis of Two Classic TSP Variants
We analyze two classic variants of the Traveling Salesman Problem using the
toolkit of fine-grained complexity. Our first set of results is motivated by
the Bitonic TSP problem: given a set of points in the plane, compute a
shortest tour consisting of two monotone chains. It is a classic
dynamic-programming exercise to solve this problem in time. While the
near-quadratic dependency of similar dynamic programs for Longest Common
Subsequence and Discrete Frechet Distance has recently been proven to be
essentially optimal under the Strong Exponential Time Hypothesis, we show that
bitonic tours can be found in subquadratic time. More precisely, we present an
algorithm that solves bitonic TSP in time and its bottleneck
version in time. Our second set of results concerns the popular
-OPT heuristic for TSP in the graph setting. More precisely, we study the
-OPT decision problem, which asks whether a given tour can be improved by a
-OPT move that replaces edges in the tour by new edges. A simple
algorithm solves -OPT in time for fixed . For 2-OPT, this is
easily seen to be optimal. For we prove that an algorithm with a runtime
of the form exists if and only if All-Pairs
Shortest Paths in weighted digraphs has such an algorithm. The results for
may suggest that the actual time complexity of -OPT is
. We show that this is not the case, by presenting an algorithm
that finds the best -move in time for
fixed . This implies that 4-OPT can be solved in time,
matching the best-known algorithm for 3-OPT. Finally, we show how to beat the
quadratic barrier for in two important settings, namely for points in the
plane and when we want to solve 2-OPT repeatedly.Comment: Extended abstract appears in the Proceedings of the 43rd
International Colloquium on Automata, Languages, and Programming (ICALP 2016
- …