Skip to main content
QUICK REVIEW

[论文解读] Breaking a Barrier in Constructing Compact Indexes for Parameterized Pattern Matching

Kento Iseri, I Tomohiro|arXiv (Cornell University)|Aug 11, 2023
Algorithms and Data Compression被引用 2
一句话总结

本文提出首个在线、紧凑索引构造方法,用于参数化模式匹配,时间复杂度为 O(n lg σp lg n / lg lg n),消除了此前构造时间中持续超过十年的 O(σp) 因子。该方法通过在在线构造过程中高效支持后向搜索,结合分段树与动态数据结构,实现了首个在空间效率与从右向左逐步构建方面均表现优异的索引。

ABSTRACT

A parameterized string (p-string) is a string over an alphabet (Σ_s ∪ Σ_p), where Σ_s and Σ_p are disjoint alphabets for static symbols (s-symbols) and for parameter symbols (p-symbols), respectively. Two p-strings x and y are said to parameterized match (p-match) if and only if x can be transformed into y by applying a bijection on Σ_p to every occurrence of p-symbols in x. The indexing problem for p-matching is to preprocess a p-string T of length n so that we can efficiently find the occurrences of substrings of T that p-match with a given pattern. Let σ_s and respectively σ_p be the numbers of distinct s-symbols and p-symbols that appear in T and σ = σ_s + σ_p. Extending the Burrows-Wheeler Transform (BWT) based index for exact string pattern matching, Ganguly et al. [SODA 2017] proposed parameterized BWTs (pBWTs) to design the first compact index for p-matching, and posed an open problem on how to construct the pBWT-based index in compact space, i.e., in O(n lg |Σ_s ∪ Σ_p|) bits of space. Hashimoto et al. [SPIRE 2022] showed how to construct the pBWT for T, under the assumption that Σ_s ∪ Σ_p = [0..O(σ)], in O(n lg σ) bits of space and O(n (σ_p lg n)/(lg lg n)) time in an online manner while reading the symbols of T from right to left. In this paper, we refine Hashimoto et al.’s algorithm to work in O(n lg σ) bits of space and O(n (lg σ_p lg n)/(lg lg n)) time in a more general assumption that Σ_s ∪ Σ_p = [0..n^{O(1)}]. Our result has an immediate application to constructing parameterized suffix arrays in O(n (lg σ_p lg n)/(lg lg n)) time and O(n lg σ) bits of working space. We also show that our data structure can support backward search, a core procedure of BWT-based indexes, at any stage of the online construction, making it the first compact index for p-matching that can be constructed in compact space and even in an online manner.

研究动机与目标

  • 解决在 O(n lg |Σs ∪ Σp|) 位空间内构造紧凑参数化 BWT(pBWT)索引的开放问题。
  • 消除构造时间中持续超过十年的 O(σp) 因子,该因子长期存在于参数化后缀数组等相关数据结构中。
  • 在在线构造过程中支持后向搜索,使在任意构造阶段均可高效执行计数与定位查询。
  • 设计一种在空间效率与从右向左逐步构建方面均表现优异的数据结构,克服先前工作的局限性。

提出的方法

  • 利用 pBWT 上的分段树,支持高效的二维范围计数与秩/选择查询。
  • 使用动态整数串与位向量,以 O(lg n / lg lg n) 时间维护 LF/FL 映射的采样位置。
  • 提出一种新方法,通过 LCP∞T 与通过 Burrows-Wheeler 变换逆变换的 LF 映射,在 O(lg σp lg n / lg lg n) 时间内计算 cw-区间。
  • 采用从右向左的在线构造策略,逐步维护 LT、FT 与 LCP∞T 的数据结构。
  • 应用基于距离文本右端距离的采样技术,以 O(lg²n / (lg σ lg lg n)) 时间支持快速 R−1T(i) 访问。
  • 使用引理 2 中的动态数据结构,以 O(n lg σ) 位空间维护 LT 与 VT,并实现 O(lg n) 的查询时间。

实验结果

研究问题

  • RQ1能否通过消除时间复杂度中的 O(σp) 因子,改进紧凑 pBWT 索引的构造时间?
  • RQ2是否可能在紧凑 pBWT 索引的在线构造过程中支持后向搜索?
  • RQ3能否构建一个完全在线、空间高效的 pBWT 索引,同时支持计数与定位查询?
  • RQ4如何在动态、在线环境下高效支持参数化字符串的二维范围计数?

主要发现

  • 本文实现了 O(n lg σp lg n / lg lg n) 的构造时间,消除了在相关数据结构中持续超过十年的 O(σp) 因子。
  • 所提出的索引在在线构造的任意阶段均支持后向搜索,从而实现高效的计数与定位查询。
  • 空间使用量为 O(n lg σ) 位,与 pBWT 的紧凑空间界限一致,使其成为首个同时实现紧凑空间与在线构造的索引。
  • 计数查询的响应时间为 O(m lg σp lg n / lg lg n),定位查询的响应时间为 O(m lg σp lg n / lg lg n + occ · lg²n / (lg σ lg lg n)),其中 m 为模式长度,occ 为报告到的匹配次数。
  • 通过维护动态分段树与采样的逆后缀数组值,该方法在构造过程中实现了完整的后向搜索支持。
  • 该方法是首个在基于 pBWT 的参数化模式匹配索引中,同时实现在线构造、紧凑空间与完整后向搜索支持的方案。

更好的研究,从现在开始

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

无需绑定信用卡

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