arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.12600cs.DS
收藏

PalFM-index:用于回文模式匹配的FM-index

PalFM-index: FM-index for Palindrome Pattern Matching

Shinya Nagashita, Tomohiro I

AI总结:

本文提出PalFM-index,一种用于回文模式匹配的FM-index类型索引,以近线性空间实现O(m)时间计数查询,并可通过空间换时间支持定位查询。

摘要:

回文模式匹配(pal-matching)是一种广义模式匹配,其中两个长度相同的字符串 $x$ 和 $y$ 被认为匹配(pal-match),如果它们具有相同的回文结构,即对于任意可能的 $1 \le i < j \le |x| = |y|$,$x[i..j]$ 是回文当且仅当 $y[i..j]$ 是回文。回文匹配问题是在文本中搜索与模式回文匹配的子串出现位置的问题。给定一个长度为 $n$、字母表大小为 $σ$ 的文本 $T$,回文匹配索引需要支持:给定长度为 $m$ 的模式 $P$,计算 $P$ 出现次数 $\mathsf{occ}$ 的计数查询,以及计算 $P$ 出现位置的定位查询。[I et al., Theor. Comput. Sci., 2013] 的作者提出了一种 $O(n \lg n)$ 比特的数据结构,支持 $O(m \lg σ)$ 时间的计数查询和 $O(m \lg σ+ \mathsf{occ})$ 时间的定位查询。本文提出了一种用于回文匹配问题的FM-index类型索引,我们称之为PalFM-index,其占用 $2n \lg \min(σ, \lg n) + 2n + o(n)$ 比特空间,并支持 $O(m)$ 时间的计数查询。通过增加 $\frac{n}Δ \lg n + n + o(n)$ 比特空间,PalFM-index可以在 $O(m + Δ\mathsf{occ})$ 时间内支持定位查询,其中 $Δ$ 是在预处理阶段从 $\{1, 2, \dots, n\}$ 中选择的参数。

英文摘要:

The palindrome pattern matching (pal-matching) is a kind of generalized pattern matching, in which two strings $x$ and $y$ of same length are considered to match (pal-match) if they have the same palindromic structures, i.e., for any possible $1 \le i < j \le |x| = |y|$, $x[i..j]$ is a palindrome if and only if $y[i..j]$ is a palindrome. The pal-matching problem is the problem of searching for, in a text, the occurrences of the substrings that pal-match with a pattern. Given a text $T$ of length $n$ over an alphabet of size $σ$, an index for pal-matching is to support, given a pattern $P$ of length $m$, the counting queries that compute the number $\mathsf{occ}$ of occurrences of $P$ and the locating queries that compute the occurrences of $P$. The authors in~[I et al., Theor. Comput. Sci., 2013] proposed an $O(n \lg n)$-bit data structure to support the counting queries in $O(m \lg σ)$ time and the locating queries in $O(m \lg σ+ \mathsf{occ})$ time. In this paper, we propose an FM-index type index for the pal-matching problem, which we call the PalFM-index, that occupies $2n \lg \min(σ, \lg n) + 2n + o(n)$ bits of space and supports the counting queries in $O(m)$ time. The PalFM-indexes can support the locating queries in $O(m + Δ\mathsf{occ})$ time by adding $\frac{n}Δ \lg n + n + o(n)$ bits of space, where $Δ$ is a parameter chosen from $\{1, 2, \dots, n\}$ in the preprocessing phase.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑