基于 $q$-gram 出现距离的快速线性时间串匹配算法
数据结构与算法
2020-04-14 v2
摘要
给定长度为 的文本 和长度为 的模式 ,串匹配问题是在 中找出 的所有出现。在本研究中,我们考虑 中同一 -gram 的相邻两次出现之间的距离,提出了一种以 时间解决该问题的算法。我们还提出了一种理论改进,其运行时间为 ,尽管在实践中不一定更快。我们在多种真实与人工数据集(如英文文本、基因组序列和 Fibonacci 串)上比较了我们的算法与现有算法的执行时间。实验结果表明,我们的算法在许多情况下与最先进(SOTA)算法一样快,尤其是当模式在文本中频繁出现时。
关键词
引用
@article{arxiv.2002.08004,
title = {Fast and linear-time string matching algorithms based on the distances of $q$-gram occurrences},
author = {Satoshi Kobayashi and Diptarama Hendrian and Ryo Yoshinaka and Ayumi Shinohara},
journal= {arXiv preprint arXiv:2002.08004},
year = {2020}
}
备注
14 pages, accepted to SEA 2020