[论文解读] Extending the Burrows-Wheeler Transform for Cartesian Tree Matching and Constructing It
本文提出了一种cBWT索引的紧凑构造算法,该索引基于Burrows-Wheeler变换,用于笛卡尔树匹配,可实现对多份文本的高效索引。其构造时间复杂度为O(n lg σ lg n / lg lg n),空间复杂度为O(n lg σ),支持动态扩展,仅带来对数级的性能下降,且工作空间紧凑,对时间序列和音乐谱中的基序检测等应用至关重要。
Cartesian tree matching is a form of generalized pattern matching where a substring of the text matches with the pattern if they share the same Cartesian tree. This form of matching finds application for time series of stock prices and can be of interest for melody matching between musical scores. For the indexing problem, the state-of-the-art data structure is a Burrows-Wheeler transform based solution due to [Kim and Cho, CPM'21], which uses nearly succinct space and can count the number of substrings that Cartesian tree match with a pattern in time linear in the pattern length. The authors address the construction of their data structure with a straight-forward solution that, however, requires pointer-based data structures, resulting in O(n lg n) bits of space, where n is the text length [Kim and Cho, CPM'21, Section A.4]. We address this bottleneck by a construction that requires O(n lg σ) bits of space and has a time complexity of O(n (lg σ lg n)/(lg lg n)), where σ is alphabet size. Additionally, we can extend this index for indexing multiple circular texts in the spirit of the extended Burrows-Wheeler transform without sacrificing the time and space complexities. We present this index in a dynamic variant, where we pay a logarithmic slowdown and need space linear in the input texts in bits for the extra functionality that we can incrementally add texts. Our extended setting is of interest for finding repetitive motifs common in the aforementioned applications, independent of offsets and scaling.
研究动机与目标
- 解决cBWT索引缺乏紧凑构造算法的问题,此前由于依赖指针结构,需要O(n lg n)的额外空间。
- 实现对多份循环文本的高效索引,支持笛卡尔树匹配,可检测与偏移和缩放无关的重复基序。
- 设计cBWT索引的动态变体,支持以紧凑空间和对数时间开销逐步添加新文本。
- 通过扩展的Burrows-Wheeler变换,将FM-index框架扩展至笛卡尔树匹配,同时保持最优的时间与空间复杂度。
- 支持对索引文本的循环旋转进行高效的计数、LCP和后缀数组查询,这对时间序列和音乐数据中的基序发现至关重要。
提出的方法
- 利用扩展的Burrows-Wheeler变换技术,扩展cBWT索引以支持多份循环文本。
- 引入一个动态位串E,用于在增量构造过程中标记修改区域,确保更新期间索引功能的完整性。
- 在cBWT索引上使用反向搜索,计算每个新字符串S的旋转i对应的cntR(Rot(S,i))、plcp∞R(Rot(S,i))和slcp∞R(Rot(S,i))。
- 利用引理4.6,通过在E上执行rank和select操作,递归地从旋转后缀计算查询值。
- 使用E和引理2.1中的rank/select数据结构,按字典序存储cntR值,以保持紧凑空间并支持高效更新。
- 采用迭代构造方法:从第一份文本开始,然后利用引理4.7逐步扩展索引以包含后续每一份文本,确保每次扩展前后E均被清零。
实验结果
研究问题
- RQ1cBWT索引能否在不依赖指针结构的前提下,以紧凑空间完成构造?
- RQ2如何在保持最优时间与空间复杂度的前提下,将cBWT索引扩展以支持多份循环文本?
- RQ3动态扩展cBWT索引以添加新文本的时间与空间复杂度是多少?是否可实现对数级的性能下降?
- RQ4该索引能否高效支持在多份文本中所有模式旋转的计数与LCP查询?
- RQ5在仅使用紧凑辅助数据结构的前提下,能否在增量构造过程中保持cBWT索引的功能完整性?
主要发现
- cBWT索引可在O(n lg σ lg n / lg lg n)时间内、O(n lg σ)比特空间内完成构造,显著优于先前需要O(n lg n)额外空间的方案。
- 该构造算法支持对索引的动态扩展,每次添加新文本的时间复杂度为O((λ + ρ) lg σ lg(λ+ρ) / lg lg(λ+ρ)),空间复杂度为O((λ + ρ) lg σ)比特。
- 动态变体保持了对长度为m的模式在O(m)时间内回答计数查询的能力,与原始cBWT索引性能一致。
- 通过使用动态位串E,实现了紧凑的增量更新,仅带来对数级的性能下降,确保了构造过程中的索引功能完整性。
- 扩展后的索引可高效计算新字符串所有旋转的plcp∞R和slcp∞R,从而实现对多份文本中重复基序的检测,且不受偏移或缩放影响。
- 对于总长度为n的d份文本,cBWT索引的最终构造时间复杂度为O(n lg σ lg n / lg lg n),空间复杂度为O(n lg σ),前提是文本长度非递减。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。