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

用双向串采样器进行串采样

String Sampling with Bidirectional String Anchors

Grigorios Loukides, Solon P. Pissis, Michelle Sweering

摘要:

最小值采样机制是由Schleimer等人[SIGMOD 2003]和Roberts等人[Bioinf. 2004年]。给定两个正整数$w$和$k$,它在$w$连续长度- $k$子串的每个片段中(在长度为$w + k - 1$的每个滑动窗口中)选择字典上最小长度- $k$子串。极小化器的样本是近似均匀的,局部一致的,并且可以在线性时间内计算。最小值抽样机制的两个主要缺点是:第一,它们不能很好地保证$w$和$k$的每种组合的样本的预期大小;第二,在它们的样本上构造的索引不能很好地保证在线模式搜索的最坏情况。我们引入双向字符串锚(bd锚),一个新的字符串采样机制。给定一个正整数$\ell$,我们的机制在每个长度为$\ell$的片段中(在每个长度为$\ell$的滑动窗口中)选择字典上最小的旋转。我们表明,bd锚样本也是近似均匀的,局部一致的,可计算的线性时间。此外,我们使用几个数据集进行的实验表明,bd锚样本量与$\ell$成比例减少;并且这些样本量与使用类似采样参数的最小样本量相比具有竞争力或更小。通过分析bd锚样本的预期大小,我们为这些结果提供了理论依据。作为一个否定的结果,我们表明,计算总的顺序$\leq$的输入字母表,它最大限度地减少了bd锚的样本大小,是NP难的。我们还表明,通过使用任何bd锚样本,我们可以构建,在近线性时间,一个索引,需要线性(额外)的空间的大小的样本和答案在线模式搜索在近最佳的时间。

英文摘要:

The minimizers sampling mechanism is a popular mechanism for string sampling introduced independently by Schleimer et al. [SIGMOD 2003] and by Roberts et al. [Bioinf. 2004]. Given two positive integers $w$ and $k$, it selects the lexicographically smallest length-$k$ substring in every fragment of $w$ consecutive length-$k$ substrings (in every sliding window of length $w + k - 1$). Minimizers samples are approximately uniform, locally consistent, and computable in linear time. Two main disadvantages of minimizers sampling mechanisms are: first, they do not have good guarantees on the expected size of their samples for every combination of $w$ and $k$; and, second, indexes that are constructed over their samples do not have good worst-case guarantees for on-line pattern searches. We introduce bidirectional string anchors (bd-anchors), a new string sampling mechanism. Given a positive integer $\ell$, our mechanism selects the lexicographically smallest rotation in every length-$\ell$ fragment (in every sliding window of length $\ell$). We show that bd-anchors samples are also approximately uniform, locally consistent, and computable in linear time. In addition, our experiments using several datasets demonstrate that the bd-anchors sample sizes decrease proportionally to $\ell$; and that these sizes are competitive to or smaller than the minimizers sample sizes using the analogous sampling parameters. We provide theoretical justification for these results by analyzing the expected size of bd-anchors samples. As a negative result, we show that computing a total order $\leq$ on the input alphabet, which minimizes the bd-anchors sample size, is NP-hard. We also show that by using any bd-anchors sample, we can construct, in near-linear time, an index which requires linear (extra) space in the size of the sample and answers on-line pattern searches in near-optimal time.

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

↑