We study the internal dictionary matching (IDM) problem where a dictionary $\mathcal{D}$ containing $d$ substrings of a text $T$ is given, and each query concerns the occurrences of patterns in $\mathcal{D}$ in another substring of $T.$ We propose a novel $O(n)$-sized data structure named Basic Substring Structure (BASS) where $n$ is the length of the text $T.$ With BASS, we are able to handle all types of queries in the IDM problem in nearly optimal query and preprocessing time. Specifically, our results include: - The first algorithm that answers the *CountDistinct* query in $\tilde{O}(1)$ time with $\tilde{O}(n+d)$ preprocessing, where we need to compute the number of distinct patterns that exist in $T[i..j]$. Previously, the best result was $\tilde{O}(m)$ time per query after $\tilde{O}(n^2/m+d)$ or $\tilde{O}(nd/m+d)$ preprocessing, where $m$ is a chosen parameter. - Faster algorithms for two other types of internal queries. We improve the runtime for \textbf{(1)} Pattern counting (Count) queries to $O(\log n/\log\log n)$ time per query with $O(n+d\sqrt{\log n})$ preprocessing from $O(\log^2 n/\log\log n)$ time per query with $O(n\log n/\log \log n+d\log^{3/2} n)$ preprocessing. \textbf{(2)} Distinct pattern reporting (ReportDistinct) queries to $O(1+|\text{output}|)$ time per query from $O(\log n+|\text{output}|)$ per query. In addition, we match the optimal runtime in the remaining two types of queries, pattern existence (Exist), and pattern reporting (Report). We also show that BASS is more generally applicable to other internal query problems.


翻译:我们研究内部字典匹配(IDM)问题,其中给定一个包含文本 $T$ 的 $d$ 个子串的字典 $\mathcal{D}$,每个查询关注字典 $\mathcal{D}$ 中的模式在 $T$ 的另一个子串中的出现情况。我们提出了一种新颖的、大小为 $O(n)$ 的数据结构,称为基本子串结构(BASS),其中 $n$ 是文本 $T$ 的长度。利用 BASS,我们能够以近乎最优的查询和预处理时间处理 IDM 问题中的所有类型查询。具体来说,我们的结果包括:- 第一个能在 $\tilde{O}(1)$ 时间内回答 *CountDistinct* 查询的算法,其预处理时间为 $\tilde{O}(n+d)$,该查询需要计算存在于 $T[i..j]$ 中的不同模式的数量。此前的最佳结果是每次查询 $\tilde{O}(m)$ 时间,预处理时间为 $\tilde{O}(n^2/m+d)$ 或 $\tilde{O}(nd/m+d)$,其中 $m$ 是一个选定的参数。- 针对另外两种内部查询的更快算法。我们将 \textbf{(1)} 模式计数(Count)查询的每次查询运行时间改进为 $O(\log n/\log\log n)$,预处理时间为 $O(n+d\sqrt{\log n})$,而之前为每次查询 $O(\log^2 n/\log\log n)$ 时间,预处理时间为 $O(n\log n/\log \log n+d\log^{3/2} n)$。\textbf{(2)} 不同模式报告(ReportDistinct)查询的每次查询运行时间改进为 $O(1+|\text{输出}|)$,而之前为每次查询 $O(\log n+|\text{输出}|)$。此外,在其余两种查询类型,即模式存在性(Exist)和模式报告(Report)中,我们匹配了最优运行时间。我们还展示了 BASS 更广泛地适用于其他内部查询问题。

0
下载
关闭预览

相关内容

【ACL2020】多模态信息抽取,365页ppt
专知会员服务
151+阅读 · 2020年7月6日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
《DeepGCNs: Making GCNs Go as Deep as CNNs》
专知会员服务
32+阅读 · 2019年10月17日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
164+阅读 · 2019年10月12日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2024年8月22日
Arxiv
0+阅读 · 2024年8月22日
Arxiv
0+阅读 · 2024年8月21日
Arxiv
0+阅读 · 2024年8月15日
Arxiv
0+阅读 · 2024年8月13日
Arxiv
0+阅读 · 2024年8月12日
Arxiv
0+阅读 · 2024年8月9日
Arxiv
14+阅读 · 2018年5月15日
VIP会员
最新内容
人工智能赋能无人机:俄乌战争(万字长文)
专知会员服务
6+阅读 · 4月23日
国外海军作战管理系统与作战训练系统
专知会员服务
3+阅读 · 4月23日
美军条令《海军陆战队规划流程(2026版)》
专知会员服务
10+阅读 · 4月23日
《压缩式分布式交互仿真标准》120页
专知会员服务
4+阅读 · 4月23日
《电子战数据交换模型研究报告》
专知会员服务
6+阅读 · 4月23日
《低数据领域军事目标检测模型研究》
专知会员服务
6+阅读 · 4月23日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
STRCF for Visual Object Tracking
统计学习与视觉计算组
15+阅读 · 2018年5月29日
Focal Loss for Dense Object Detection
统计学习与视觉计算组
12+阅读 · 2018年3月15日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关论文
Arxiv
0+阅读 · 2024年8月22日
Arxiv
0+阅读 · 2024年8月22日
Arxiv
0+阅读 · 2024年8月21日
Arxiv
0+阅读 · 2024年8月15日
Arxiv
0+阅读 · 2024年8月13日
Arxiv
0+阅读 · 2024年8月12日
Arxiv
0+阅读 · 2024年8月9日
Arxiv
14+阅读 · 2018年5月15日
相关基金
国家自然科学基金
13+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员