arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1206.2523cs.DScs.IR
收藏

行程长度可压缩文本的二进制乱串匹配

Binary Jumbled String Matching for Highly Run-Length Compressible Texts

Golnaz Badkobeh, Gabriele Fici, Steve Kroon, Zsuzsanna Lipták

摘要:

二进制混乱串匹配问题被定义为:给定长度为$n$的$\{a,b\}$上的串$s$和查询$(x,y)$,其中$x,y$为非负整数,判定$s$是否具有恰好为$x$ $a$和$y$ $b$的子串$t$。以前的解决方案在预处理步骤中创建了一个大小为O(n)的索引,然后用于在常数时间内回答查询。用于构建该索引的最快算法具有运行时间$O(n^2/\log n)$ [Burcsi等人,FUN 2010; Moosa和Rahman,IPL 2010],或字RAM模型中的$O(n^2/\log^2 n)$ [Moosa和Rahman,JDA 2012]。我们提出了一个直接从$s$的游程编码构造的索引。我们的索引的构造时间是$O(n+ρ^2\log ρ)$,其中O(n)是计算$s$的游程编码的时间,$ρ$是这个编码的长度-如果是$ρ= O(n/\log n)$,这并不比以前的解决方案差,如果是$ρ= o(n/\log n)$,这就更好了。我们的索引$L$可以在$O(\log ρ)$时间内查询。虽然$|L|= O(\min(n, ρ^{2}))$是最差情况,但初步研究表明$|L|$可能通常接近$ρ$。此外,用于构造索引的算法在概念上是简单的并且易于实现。为了阐明我们的索引的结构和大小,我们根据[Fici and Lipták,DLT 2011]中引入的$s$的前缀范式对其进行了表征。

英文摘要:

The Binary Jumbled String Matching problem is defined as: Given a string $s$ over $\{a,b\}$ of length $n$ and a query $(x,y)$, with $x,y$ non-negative integers, decide whether $s$ has a substring $t$ with exactly $x$ $a$'s and $y$ $b$'s. Previous solutions created an index of size O(n) in a pre-processing step, which was then used to answer queries in constant time. The fastest algorithms for construction of this index have running time $O(n^2/\log n)$ [Burcsi et al., FUN 2010; Moosa and Rahman, IPL 2010], or $O(n^2/\log^2 n)$ in the word-RAM model [Moosa and Rahman, JDA 2012]. We propose an index constructed directly from the run-length encoding of $s$. The construction time of our index is $O(n+ρ^2\log ρ)$, where O(n) is the time for computing the run-length encoding of $s$ and $ρ$ is the length of this encoding---this is no worse than previous solutions if $ρ= O(n/\log n)$ and better if $ρ= o(n/\log n)$. Our index $L$ can be queried in $O(\log ρ)$ time. While $|L|= O(\min(n, ρ^{2}))$ in the worst case, preliminary investigations have indicated that $|L|$ may often be close to $ρ$. Furthermore, the algorithm for constructing the index is conceptually simple and easy to implement. In an attempt to shed light on the structure and size of our index, we characterize it in terms of the prefix normal forms of $s$ introduced in [Fici and Lipták, DLT 2011].

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

↑