We revisit the classic border tree data structure [Gu, Farach, Beigel, SODA 1994] that answers the following prefix-suffix queries on a string $T$ of length $n$ over an integer alphabet $\Sigma=[0,\sigma)$: for any $i,j \in [0,n)$ return all occurrences of $T$ in $T[0\mathinner{.\,.} i]T[j\mathinner{.\,.} n-1]$. The border tree of $T$ can be constructed in $\mathcal{O}(n)$ time and answers prefix-suffix queries in $\mathcal{O}(\log n + \textsf{Occ})$ time, where $\textsf{Occ}$ is the number of occurrences of $T$ in $T[0\mathinner{.\,.} i]T[j\mathinner{.\,.} n-1]$. Our contribution here is the following. We present a completely different and remarkably simple data structure that can be constructed in the optimal $\mathcal{O}(n/\log_\sigma n)$ time and supports queries in the optimal $\mathcal{O}(1)$ time. Our result is based on a new structural lemma that lets us encode the output of any query in constant time and space. We also show a new direct application of our result in pattern matching on node-labeled graphs.


翻译:暂无翻译

0
下载
关闭预览

相关内容

机器学习相关资源(框架、库、软件)大列表
专知会员服务
40+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
41+阅读 · 2019年10月9日
RL解决'BipedalWalkerHardcore-v2' (SOTA)
CreateAMind
31+阅读 · 2019年7月17日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
CVE-2018-7600 - Drupal 7.x 远程代码执行exp
黑客工具箱
14+阅读 · 2018年4月17日
详述DeepMind wavenet原理及其TensorFlow实现
深度学习每日摘要
12+阅读 · 2017年6月26日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
1+阅读 · 2024年12月17日
VIP会员
相关资讯
RL解决'BipedalWalkerHardcore-v2' (SOTA)
CreateAMind
31+阅读 · 2019年7月17日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
CVE-2018-7600 - Drupal 7.x 远程代码执行exp
黑客工具箱
14+阅读 · 2018年4月17日
详述DeepMind wavenet原理及其TensorFlow实现
深度学习每日摘要
12+阅读 · 2017年6月26日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员