Suppose we are given a text $T$ of length $n$ and a straight-line program for $T$ with $g$ rules. Let $\bar{r}$ be the number of runs in the Burrows-Wheeler Transform of the reverse of $T$. We can index $T$ in $O (\bar{r} + g)$ space such that, given a pattern $P$ and constant-time access to the Karp-Rabin hashes of the substrings of $P$ and the reverse of $P$, we can find the maximal exact matches of $P$ with respect to $T$ correctly with high probability and using $O (\log n)$ time for each edge we would descend in the suffix tree of $T$ while finding those matches.
翻译:假设我们给定长度为 $n$ 的文本 $T$ 及其包含 $g$ 条规则的直线程序。令 $\bar{r}$ 表示 $T$ 的反向文本的Burrows-Wheeler变换中的游程数。我们可以在 $O (\bar{r} + g)$ 空间内对 $T$ 建立索引,使得给定模式 $P$ 以及对 $P$ 子串及其反向子串的Karp-Rabin哈希值的常数时间访问时,我们能够以高概率正确找到 $P$ 相对于 $T$ 的最大精确匹配,并且在寻找这些匹配的过程中,对于后缀树中每一条下降边仅需 $O (\log n)$ 时间。