亚线性时间下的近似在线模式匹配

Diptarka Chakraborty, Debarati Das, M. Koucký
{"title":"亚线性时间下的近似在线模式匹配","authors":"Diptarka Chakraborty, Debarati Das, M. Koucký","doi":"10.4230/LIPIcs.FSTTCS.2019.10","DOIUrl":null,"url":null,"abstract":"We consider the approximate pattern matching problem under edit distance. In this problem we are given a pattern $P$ of length $w$ and a text $T$ of length $n$ over some alphabet $\\Sigma$, and a positive integer $k$. The goal is to find all the positions $j$ in $T$ such that there is a substring of $T$ ending at $j$ which has edit distance at most $k$ from the pattern $P$. Recall, the edit distance between two strings is the minimum number of character insertions, deletions, and substitutions required to transform one string into the other. For a position $t$ in $\\{1,...,n\\}$, let $k_t$ be the smallest edit distance between $P$ and any substring of $T$ ending at $t$. In this paper we give a constant factor approximation to the sequence $k_1,k_2,...,k_{n}$. We consider both offline and online settings. \nIn the offline setting, where both $P$ and $T$ are available, we present an algorithm that for all $t$ in $\\{1,...,n\\}$, computes the value of $k_t$ approximately within a constant factor. The worst case running time of our algorithm is $O(n w^{3/4})$. As a consequence we break the $O(nw)$-time barrier for this problem. \nIn the online setting, we are given $P$ and then $T$ arrives one symbol at a time. We design an algorithm that upon arrival of the $t$-th symbol of $T$ computes $k_t$ approximately within $O(1)$-multiplicative factor and $w^{8/9}$-additive error. Our algorithm takes $O(w^{1-(7/54)})$ amortized time per symbol arrival and takes $O(w^{1-(1/54)})$ additional space apart from storing the pattern $P$. \nBoth of our algorithms are randomized and produce correct answer with high probability. To the best of our knowledge this is the first worst-case sub-linear (in the length of the pattern) time and sub-linear succinct space algorithm for online approximate pattern matching problem.","PeriodicalId":175000,"journal":{"name":"Foundations of Software Technology and Theoretical Computer Science","volume":"2 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-10-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":"{\"title\":\"Approximate Online Pattern Matching in Sub-linear Time\",\"authors\":\"Diptarka Chakraborty, Debarati Das, M. Koucký\",\"doi\":\"10.4230/LIPIcs.FSTTCS.2019.10\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"We consider the approximate pattern matching problem under edit distance. In this problem we are given a pattern $P$ of length $w$ and a text $T$ of length $n$ over some alphabet $\\\\Sigma$, and a positive integer $k$. The goal is to find all the positions $j$ in $T$ such that there is a substring of $T$ ending at $j$ which has edit distance at most $k$ from the pattern $P$. Recall, the edit distance between two strings is the minimum number of character insertions, deletions, and substitutions required to transform one string into the other. For a position $t$ in $\\\\{1,...,n\\\\}$, let $k_t$ be the smallest edit distance between $P$ and any substring of $T$ ending at $t$. In this paper we give a constant factor approximation to the sequence $k_1,k_2,...,k_{n}$. We consider both offline and online settings. \\nIn the offline setting, where both $P$ and $T$ are available, we present an algorithm that for all $t$ in $\\\\{1,...,n\\\\}$, computes the value of $k_t$ approximately within a constant factor. The worst case running time of our algorithm is $O(n w^{3/4})$. As a consequence we break the $O(nw)$-time barrier for this problem. \\nIn the online setting, we are given $P$ and then $T$ arrives one symbol at a time. We design an algorithm that upon arrival of the $t$-th symbol of $T$ computes $k_t$ approximately within $O(1)$-multiplicative factor and $w^{8/9}$-additive error. Our algorithm takes $O(w^{1-(7/54)})$ amortized time per symbol arrival and takes $O(w^{1-(1/54)})$ additional space apart from storing the pattern $P$. \\nBoth of our algorithms are randomized and produce correct answer with high probability. To the best of our knowledge this is the first worst-case sub-linear (in the length of the pattern) time and sub-linear succinct space algorithm for online approximate pattern matching problem.\",\"PeriodicalId\":175000,\"journal\":{\"name\":\"Foundations of Software Technology and Theoretical Computer Science\",\"volume\":\"2 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2018-10-08\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"6\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Foundations of Software Technology and Theoretical Computer Science\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4230/LIPIcs.FSTTCS.2019.10\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Foundations of Software Technology and Theoretical Computer Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.FSTTCS.2019.10","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6

摘要

考虑了编辑距离下的近似模式匹配问题。在这个问题中,我们给出了一个长度为w的模式$P$和一个长度为n$的文本$T$和一个正整数$k$。目标是找到$T$中的所有位置$j$,使得$T$的子串以$j$结尾,并且与模式$P$的编辑距离最多为$k$。回想一下,两个字符串之间的编辑距离是将一个字符串转换为另一个字符串所需的字符插入、删除和替换的最小数量。对于$ $\{1中的位置$ $t$,…,n\}$,设$k_t$为$P$与以$T$结尾的$T$的任何子串之间的最小编辑距离。本文给出序列$k_1,k_2,…,k_{n}$的常因子逼近。我们考虑了离线和在线设置。在离线设置中,其中$P$和$T$都是可用的,我们提出了一个算法,对于$\{1,…,n\}$,在一个常数因子内近似地计算$k_t$的值。我们算法的最坏情况运行时间是$O(n w^{3/4})$。因此,我们打破了这个问题的$O(nw)$时间障碍。在在线设置中,我们得到$P$,然后$T$一次到达一个符号。我们设计了一种算法,在$t$的$t$符号到达$t$时,在$O(1)$-乘法因子和$w^{8/9}$-加性误差范围内近似地计算$k_t$。我们的算法每次符号到达需要$O(w^{1-(7/54)})$平摊时间,并且除了存储模式$P$之外,还需要$O(w^{1-(1/54)})$额外空间。这两种算法都是随机的,产生正确答案的概率都很高。据我们所知,这是第一个针对在线近似模式匹配问题的最坏情况亚线性(在模式长度上)时间和亚线性简洁空间算法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Approximate Online Pattern Matching in Sub-linear Time
We consider the approximate pattern matching problem under edit distance. In this problem we are given a pattern $P$ of length $w$ and a text $T$ of length $n$ over some alphabet $\Sigma$, and a positive integer $k$. The goal is to find all the positions $j$ in $T$ such that there is a substring of $T$ ending at $j$ which has edit distance at most $k$ from the pattern $P$. Recall, the edit distance between two strings is the minimum number of character insertions, deletions, and substitutions required to transform one string into the other. For a position $t$ in $\{1,...,n\}$, let $k_t$ be the smallest edit distance between $P$ and any substring of $T$ ending at $t$. In this paper we give a constant factor approximation to the sequence $k_1,k_2,...,k_{n}$. We consider both offline and online settings. In the offline setting, where both $P$ and $T$ are available, we present an algorithm that for all $t$ in $\{1,...,n\}$, computes the value of $k_t$ approximately within a constant factor. The worst case running time of our algorithm is $O(n w^{3/4})$. As a consequence we break the $O(nw)$-time barrier for this problem. In the online setting, we are given $P$ and then $T$ arrives one symbol at a time. We design an algorithm that upon arrival of the $t$-th symbol of $T$ computes $k_t$ approximately within $O(1)$-multiplicative factor and $w^{8/9}$-additive error. Our algorithm takes $O(w^{1-(7/54)})$ amortized time per symbol arrival and takes $O(w^{1-(1/54)})$ additional space apart from storing the pattern $P$. Both of our algorithms are randomized and produce correct answer with high probability. To the best of our knowledge this is the first worst-case sub-linear (in the length of the pattern) time and sub-linear succinct space algorithm for online approximate pattern matching problem.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信