使用前缀表增强正则和不定字符串的覆盖
Enhanced Covers of Regular & Indeterminate Strings using Prefix Tables
摘要:
字符串$x = x[1..n]$的\itbf{cover}是$x$的适当子串$u$,使得$x$可以从$u$的可能重叠的实例构造。最近的一篇论文\cite{FIKPPST13}放宽了这一定义-$x$的一个\itbf{enhanced cover} $u$是$x$的一个边界(也就是说,一个适当的前缀,也是一个后缀),它覆盖了$x$中的{ \it maximum}个位置(不一定是全部)-并提出了计算增强覆盖的有效算法。这些算法依赖于\itbf{border array} $β[1..n]$的先前计算,其中$β[i]$是$x[1..i]$的最长边界的长度,即$1 \le i \le n$。在本文中,我们首先展示了如何使用\itbf{prefix table}来计算增强的覆盖:一个数组$π[1..n]$,使得$π[i]$是$x$的最长子串的长度,该子串从与$x$的前缀匹配的位置$i$开始。与边界数组不同,前缀表是健壮的:它的属性也适用于\itbf{indeterminate strings} --也就是说,字符串定义在字母表$Σ$的{ \it子集}上,而不是$Σ$的单个元素上。因此,我们的算法,除了在实践中更快,更节省空间比那些\cite{FIKPPST13},使我们能够轻松地扩展计算的增强覆盖不确定的字符串。对于规则和不确定的字符串,我们的算法在预期的线性时间内执行。在此过程中,我们建立了一个重要的理论结果:对于二进制字母表,常规字符串$x$的任何前缀的任何边界的预期最大长度约为1.64,对于较大的字符串则更小。
英文摘要:
A \itbf{cover} of a string $x = x[1..n]$ is a proper substring $u$ of $x$ such that $x$ can be constructed from possibly overlapping instances of $u$. A recent paper \cite{FIKPPST13} relaxes this definition --- an \itbf{enhanced cover} $u$ of $x$ is a border of $x$ (that is, a proper prefix that is also a suffix) that covers a {\it maximum} number of positions in $x$ (not necessarily all) --- and proposes efficient algorithms for the computation of enhanced covers. These algorithms depend on the prior computation of the \itbf{border array} $β[1..n]$, where $β[i]$ is the length of the longest border of $x[1..i]$, $1 \le i \le n$. In this paper, we first show how to compute enhanced covers using instead the \itbf{prefix table}: an array $π[1..n]$ such that $π[i]$ is the length of the longest substring of $x$ beginning at position $i$ that matches a prefix of $x$. Unlike the border array, the prefix table is robust: its properties hold also for \itbf{indeterminate strings} --- that is, strings defined on {\it subsets} of the alphabet $Σ$ rather than individual elements of $Σ$. Thus, our algorithms, in addition to being faster in practice and more space-efficient than those of \cite{FIKPPST13}, allow us to easily extend the computation of enhanced covers to indeterminate strings. Both for regular and indeterminate strings, our algorithms execute in expected linear time. Along the way we establish an important theoretical result: that the expected maximum length of any border of any prefix of a regular string $x$ is approximately 1.64 for binary alphabets, less for larger ones.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。