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$.
翻译:我们研究在查询字符串 $Q 和 标注的环状图(DAG) $G=(V,E,\ell) $G =(V,E,\ell) $(DAG) 之间找到最大精确匹配(MEM ) 的问题。 我们显示只要在节点标签和 $Q (node MOMS) 之间找到最大精确匹配(MEM ) 来编码完整的MEM 。 可以用线性时间计算Node MMMM, 并显示如何将它们连结起来解决 $(LCS) 美元和 $G$($) 。 我们的链式算算法首先考虑在图形中链条问题的对应配方配方配方, 以$(k) +H++ + + + $($QMMMMM) 来计算完整的 mMMMMM(L) 的宽度(至少包含节点数), 而$ 美元是 数字 和 NOMMS 。 我们然后考虑在输入图表中找到 MEMMMS 的问题,, 时, 的输入图表是可以用 和 AL AL 的索引 20 。