Skip to main content
QUICK REVIEW

[论文解读] A Compact DAG for Storing and Searching Maximal Common Subsequences

Alessio Conte, Roberto Grossi|arXiv (Cornell University)|Jan 1, 2023
Algorithms and Data Compression被引用 3
一句话总结

本文提出了一种紧凑有向无环图(MDAG),以多项式空间 O(n³σ) 表示两个字符串的所有最大公共子序列(MCSs),并在 O(n³σ log n) 时间内构建该结构。MDAG 支持常数均摊时间(CAT)枚举、字典序排名/选择操作以及基于前缀的搜索——所有操作均接近最优时间复杂度,从而填补了 LCS 与 MCS 计算之间的复杂度差距。

ABSTRACT

Maximal Common Subsequences (MCSs) between two strings X and Y are subsequences of both X and Y that are maximal under inclusion. MCSs relax and generalize the well known and widely used concept of Longest Common Subsequences (LCSs), which can be seen as MCSs of maximum length. While the number both LCSs and MCSs can be exponential in the length of the strings, LCSs have been long exploited for string and text analysis, as simple compact representations of all LCSs between two strings, built via dynamic programming or automata, have been known since the '70s. MCSs appear to have a more challenging structure: even listing them efficiently was an open problem open until recently, thus narrowing the complexity difference between the two problems, but the gap remained significant. In this paper we close the complexity gap: we show how to build DAG of polynomial size-in polynomial time-which allows for efficient operations on the set of all MCSs such as enumeration in Constant Amortized Time per solution (CAT), counting, and random access to the i-th element (i.e., rank and select operations). Other than improving known algorithmic results, this work paves the way for new sequence analysis methods based on MCSs.

研究动机与目标

  • 为高效存储和查询两个字符串之间指数级庞大的最大公共子序列(MCSs)集合提供解决方案。
  • 填补 LCS 与 MCS 计算之间的复杂度差距,此前尽管 MCSs 在某些应用场景中更具信息量,但缺乏高效的算法结构。
  • 设计一种紧凑的、多项式规模的数据结构,支持对 MCSs 的高效枚举、排名、选择及前缀搜索。
  • 通过提供对 MCSs 全集的近似最优算法操作,使 MCSs 在序列分析中具备实际可用性。

提出的方法

  • 构建一个带标签的有向无环图(MDAG),其中从源点到汇点的每条路径唯一对应一个 MCS。
  • 通过路径压缩技术压缩单一路径,减少空间占用,同时保持字典序与路径语义不变。
  • 利用每个节点出边的有序排列实现字典序分区,以支持有序枚举与排名/选择操作。
  • 采用动态规划与标注的节点计数(p(v))机制,通过在边部分和上进行二分查找,实现高效的选取与排名。
  • 通过深度优先搜索(DFS)结合子节点的字典序遍历实现 CAT 枚举,确保每个解的生成均摊时间为常数。
  • 通过沿给定前缀在 MDAG 上的遍历,定位到对应节点后从该节点启动枚举,实现前缀搜索支持。

实验结果

研究问题

  • RQ1能否设计一种紧凑的数据结构,在多项式空间与时间内表示两个字符串之间的所有最大公共子序列(MCSs)?
  • RQ2是否可能利用紧凑数据结构实现所有 MCSs 的常数均摊时间(CAT)枚举?
  • RQ3能否在接近最优的时间复杂度内支持对字典序排列的 MCSs 集合的高效排名与选择操作?
  • RQ4能否使用同一紧凑结构高效支持基于前缀的 MCSs 搜索?
  • RQ5如何在不显式存储所有子序列的情况下,克服 MCS 集合的指数级规模?

主要发现

  • MDAG 数据结构以 O(n³σ) 空间存储所有 MCSs,并可在 O(n³σ log n) 时间内构建。
  • 支持以字典序枚举所有 MCSs,且为常数均摊时间(CAT),总时间复杂度为 O(|MCS(X,Y)|)。
  • 前缀搜索在 O(|P| log σ + occ) 时间内完成,其中 occ 为匹配的 MCS 数量。
  • 第 i 个字典序 MCS 可在 O(|S| log σ) 时间内选取,给定 MCS S 的排名也可在相同时间内计算。
  • 该结构支持紧凑存储并支持高效的随机访问操作,使 MCSs 在序列分析中具备实用性。
  • 本工作通过为 MCSs 的所有核心操作提供多项式时间、多项式空间的算法,填补了 LCS 与 MCS 计算之间的复杂度差距。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。