We show how to chain maximal exact matches (MEMs) between a query string $Q$ and a labeled directed acyclic graph (DAG) $G=(V,E)$ to solve the longest common subsequence (LCS) problem between $Q$ and $G$. We obtain our result via a new symmetric formulation of chaining in DAGs that we solve in $O(m+n+k^2|V| + |E| + kN\log N)$ time, where $m=|Q|$, $n$ is the total length of node labels, $k$ is the minimum number of paths covering the nodes of $G$ and $N$ is the number of MEMs between $Q$ and node labels, which we show encode full MEMs.
翻译:我们展示了如何在查询字符串$Q$与带标签的有向无环图(DAG)$G=(V,E)$之间串联最大精确匹配(MEM),以解决$Q$与$G$之间的最长公共子序列(LCS)问题。我们通过一种新的对称化公式来实现在DAG中的串联,并在$O(m+n+k^2|V| + |E| + kN\log N)$时间内求解该问题,其中$m=|Q|$,$n$为节点标签的总长度,$k$为覆盖$G$中所有节点所需的最小路径数,$N$为$Q$与节点标签之间的MEM数量(我们证明这些MEM可编码完整的MEM)。