We study the problem of finding maximal exact matches (MEMs) between a query string $Q$ and a labeled directed acyclic graph (DAG) $G=(V,E,\ell)$ and subsequently co-linearly chaining these matches. We show that it suffices to compute MEMs between node labels and $Q$ (node MEMs) to encode full MEMs. Node MEMs can be computed in linear time and we show how to co-linearly chain them to solve the Longest Common Subsequence (LCS) problem between $Q$ and $G$. Our chaining algorithm is the first to consider a symmetric formulation of the chaining problem in graphs and runs in $O(k^2|V| + |E| + kN\log N)$ time, where $k$ is the width (minimum number of paths covering the nodes) of $G$, and $N$ is the number of node MEMs. We then consider the problem of finding MEMs when the input graph is an indexable elastic founder graph (subclass of labeled DAGs studied by Equi et al., Algorithmica 2022). For arbitrary input graphs, the problem cannot be solved in truly sub-quadratic time under SETH (Equi et al., ICALP 2019). We show that we can report all MEMs between $Q$ and an indexable elastic founder graph in time $O(nH^2 + m + M_\kappa)$, where $n$ is the total length of node labels, $H$ is the maximum number of nodes in a block of the graph, $m = |Q|$, and $M_\kappa$ is the number of MEMs of length at least $\kappa$. The results extend to the indexing problem, where the graph is preprocessed and a set of queries is processed as a batch.
翻译:我们研究在查询字符串 $Q 和 标注的环状图(DAG) $G = (V,E,\ell) $G = (V,E,\ell) 之间找到最大精确匹配(MEM ) 的问题。 我们显示只要在节点标签和 $Q (node MEM) 之间找到最大精确匹配(MEM ) 来编码完整的 MTM 。 可以用线性时间来计算节点 MEM, 并显示如何将它们连结起来解决最长期常见的离子(LCS) 美元和 $G$ 。 我们的链式算法是首先考虑在图形中链条问题的对应配方配方, $2\\ + + + + ⁇ + + $ + kN\ log N) 的时间, $k 的宽度( 包含节点数的路径数) $, 而 $NMMMMM(L) 和 数字 。 我们然后考虑在输入图表时找到 MEMMMUS 的问题, 的 问题是, 。