The text-to-pattern Hamming distances problem asks to compute the Hamming distances between a given pattern of length $m$ and all length-$m$ substrings of a given text of length $n\ge m$. We focus on the $k$-mismatch version of the problem, where a distance needs to be returned only if it does not exceed a threshold $k$. We assume $n\le 2m$ (in general, one can partition the text into overlapping blocks). In this work, we show data structures for the dynamic version of this problem supporting two operations: An update performs a single-letter substitution in the pattern or the text, and a query, given an index $i$, returns the Hamming distance between the pattern and the text substring starting at position $i$, or reports that it exceeds $k$. First, we show a data structure with $\tilde{O}(1)$ update and $\tilde{O}(k)$ query time. Then we show that $\tilde{O}(k)$ update and $\tilde{O}(1)$ query time is also possible. These two provide an optimal trade-off for the dynamic $k$-mismatch problem with $k \le \sqrt{n}$: we prove that, conditioned on the strong 3SUM conjecture, one cannot simultaneously achieve $k^{1-\Omega(1)}$ time for all operations. For $k\ge \sqrt{n}$, we give another lower bound, conditioned on the Online Matrix-Vector conjecture, that excludes algorithms taking $n^{1/2-\Omega(1)}$ time per operation. This is tight for constant-sized alphabets: Clifford et al. (STACS 2018) achieved $\tilde{O}(\sqrt{n})$ time per operation in that case, but with $\tilde{O}(n^{3/4})$ time per operation for large alphabets. We improve and extend this result with an algorithm that, given $1\le x\le k$, achieves update time $\tilde{O}(\frac{n}{k} +\sqrt{\frac{nk}{x}})$ and query time $\tilde{O}(x)$. In particular, for $k\ge \sqrt{n}$, an appropriate choice of $x$ yields $\tilde{O}(\sqrt[3]{nk})$ time per operation, which is $\tilde{O}(n^{2/3})$ when no threshold $k$ is provided.


翻译:文本到窗外的距离问题要求计算一个给定的长度 $ 美元和所有长度- 美元 美元 美元 长度 美元 美元 美元 。 我们关注一个问题 的 $ 美元 美元, 只有当它不超过一个阈值时, 才会返回一个距离 。 首先, 我们假设 $\ le 2 美元 (一般情况下, 我们可以将文本分割成重叠的区块 。 在此工作中, 我们为这个问题的动态版本显示数据结构支持两个操作 : 更新在模式或运行中进行单字母替换 美元 美元 。 以 美元 美元 美元, 美元 美元 美元 。 我们显示一个数据结构 $\ 美元 美元 美元 更新 和 美元 美元 。 然后, 我们显示 美元 (k) 的动态版本, 美元 更新和 美元 美元 运行运行 美元 美元 。

0
下载
关闭预览

相关内容

专知会员服务
75+阅读 · 2021年3月16日
【经典书】精通Linux,394页pdf
专知会员服务
89+阅读 · 2021年2月19日
【干货书】机器学习速查手册,135页pdf
专知会员服务
122+阅读 · 2020年11月20日
专知会员服务
158+阅读 · 2020年1月16日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
【泡泡汇总】CVPR2019 SLAM Paperlist
泡泡机器人SLAM
14+阅读 · 2019年6月12日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
Linguistically Regularized LSTMs for Sentiment Classification
黑龙江大学自然语言处理实验室
8+阅读 · 2018年5月4日
胶囊网络资源汇总
论智
7+阅读 · 2018年3月10日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
深度文本匹配开源工具(MatchZoo)
中国科学院网络数据重点实验室
7+阅读 · 2017年12月5日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
Arxiv
0+阅读 · 2021年7月4日
Arxiv
0+阅读 · 2021年7月2日
Arxiv
0+阅读 · 2021年7月1日
Arxiv
3+阅读 · 2018年2月24日
VIP会员
相关VIP内容
专知会员服务
75+阅读 · 2021年3月16日
【经典书】精通Linux,394页pdf
专知会员服务
89+阅读 · 2021年2月19日
【干货书】机器学习速查手册,135页pdf
专知会员服务
122+阅读 · 2020年11月20日
专知会员服务
158+阅读 · 2020年1月16日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
57+阅读 · 2019年10月17日
相关资讯
【泡泡汇总】CVPR2019 SLAM Paperlist
泡泡机器人SLAM
14+阅读 · 2019年6月12日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
Linguistically Regularized LSTMs for Sentiment Classification
黑龙江大学自然语言处理实验室
8+阅读 · 2018年5月4日
胶囊网络资源汇总
论智
7+阅读 · 2018年3月10日
条件GAN重大改进!cGANs with Projection Discriminator
CreateAMind
8+阅读 · 2018年2月7日
深度文本匹配开源工具(MatchZoo)
中国科学院网络数据重点实验室
7+阅读 · 2017年12月5日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
Top
微信扫码咨询专知VIP会员