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

内部字典匹配

Internal Dictionary Matching

Panagiotis Charalampopoulos, Tomasz Kociumaka, Manal Mohamed, Jakub Radoszewski, Wojciech Rytter, Tomasz Waleń

摘要:

我们介绍的数据结构回答查询的出现模式从一个给定的字典$\mathcal{D}$在片段的一个给定的字符串$T$的长度$n$。字典是内部的,因为$\mathcal{D}$中的每个模式都是作为$T$的一个片段给出的。这样,$\mathcal{D}$占用的空间与模式$d=|\mathcal{D}|$的数量成比例,而不是它们的总长度,后者可能是$Θ(n\cdot d)$。特别是,我们考虑以下类型的查询:报告和计数的所有出现的模式从$\mathcal{D}$在一个片段$T[i..j]$和报告不同的模式从$\mathcal{D}$发生在$T[i..j]$。我们将展示如何构建,在$\mathcal{O}((n+d) \log^{\mathcal{O}(1)} n)$的时间,回答这些查询的时间$\mathcal{O}(\log^{\mathcal{O}(1)} n+|output|)$的数据结构。计数模式的情况更加复杂,需要将局部一致性解析与正交范围搜索相结合。另一方面,报告不同的模式,使用字符串中最大重复的结构。最后,我们提供了紧-次多项式因子-上界和下界的情况下,一个动态字典。

英文摘要:

We introduce data structures answering queries concerning the occurrences of patterns from a given dictionary $\mathcal{D}$ in fragments of a given string $T$ of length $n$. The dictionary is internal in the sense that each pattern in $\mathcal{D}$ is given as a fragment of $T$. This way, $\mathcal{D}$ takes space proportional to the number of patterns $d=|\mathcal{D}|$ rather than their total length, which could be $Θ(n\cdot d)$. In particular, we consider the following types of queries: reporting and counting all occurrences of patterns from $\mathcal{D}$ in a fragment $T[i..j]$ and reporting distinct patterns from $\mathcal{D}$ that occur in $T[i..j]$. We show how to construct, in $\mathcal{O}((n+d) \log^{\mathcal{O}(1)} n)$ time, a data structure that answers each of these queries in time $\mathcal{O}(\log^{\mathcal{O}(1)} n+|output|)$. The case of counting patterns is much more involved and needs a combination of a locally consistent parsing with orthogonal range searching. Reporting distinct patterns, on the other hand, uses the structure of maximal repetitions in strings. Finally, we provide tight---up to subpolynomial factors---upper and lower bounds for the case of a dynamic dictionary.

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

↑