Exact And Approximate Pattern Matching In The Streaming Model

被引:39
作者
Porat, Benny [1 ]
Porat, Ely [1 ]
机构
[1] Bar Ilan Univ, IL-52100 Ramat Gan, Israel
来源
2009 50TH ANNUAL IEEE SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE: FOCS 2009, PROCEEDINGS | 2009年
关键词
K-MISMATCHES; ALGORITHMS;
D O I
10.1109/FOCS.2009.11
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
We present a fully online randomized algorithm for the classical pattern matching problem that uses merely O(log m) space(1), breaking the O(m) barrier that held for this problem for a long time. Our method can be used as a tool in many practical applications, including monitoring Internet traffic and firewall applications. In our online model we first receive the pattern P of size m and preprocess it. After the preprocessing phase, the characters of the text T of size n arrive one at a time in an online fashion. For each index of the text input we indicate whether the pattern matches the text at that location index or not. Clearly, for index i, an indication can only be given once all characters from index i till index i + m - 1 have arrived. Our goal is to provide such answers while using minimal space, and while spending as little time as possible on each character (time and space which are in O(poly log(n))). We present an algorithm whereby both false positive and false negative answers are allowed with probability of at most 1/n(3). Thus, overall, the correct answer for all positions is returned with a probability of 1/n(2). The time which our algorithm spends on each input character is bounded by O(log m), and the space complexity is O(log m) words. We also present a solution in the same model for the pattern matching with k mismatches problem. In this problem, a match means allowing up to k symbol mismatches between the pattern and the subtext beginning at index i. We provide an algorithm in which the time spent on each character is bounded by O(k(2) poly(log m)), and the space complexity is O(k(3) poly(log m)) words.
引用
收藏
页码:315 / 323
页数:9
相关论文
共 50 条
[21]   Pattern matching for permutations [J].
Bose, P ;
Buss, AF ;
Lubiw, A .
INFORMATION PROCESSING LETTERS, 1998, 65 (05) :277-283
[22]   A graph-theoretic model to solve the approximate string matching problem allowing for translocations [J].
Ahmed, Pritom ;
Islam, A. S. M. Shohidull ;
Rahman, M. Sohel .
JOURNAL OF DISCRETE ALGORITHMS, 2013, 23 :143-156
[23]   On Regularity Lemma and Barriers in Streaming and Dynamic Matching [J].
Assadi, Sepehr ;
Behnezhad, Soheil ;
Khanna, Sanjeev ;
Li, Huan .
PROCEEDINGS OF THE 55TH ANNUAL ACM SYMPOSIUM ON THEORY OF COMPUTING, STOC 2023, 2023, :131-144
[24]   Streaming Local Community Detection Through Approximate Conductance [J].
Wang, Meng ;
Yang, Yanhao ;
Bindel, David ;
He, Kun .
IEEE TRANSACTIONS ON BIG DATA, 2024, 10 (01) :12-22
[25]   Improving practical exact string matching [J].
Durian, Branislav ;
Holub, Jan ;
Peltola, Hannu ;
Tarhio, Jorma .
INFORMATION PROCESSING LETTERS, 2010, 110 (04) :148-152
[26]   On the Exact Matching Problem in Dense Graphs [J].
El Maalouly, Nicolas ;
Haslebacher, Sebastian ;
Wulf, Lasse .
41ST INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF COMPUTER SCIENCE, STACS 2024, 2024, 289
[27]   Exact and Approximate Tasks Computation in IoT Networks [J].
Cui, Yuhan ;
Chin, Kwan-Wu ;
Soh, Sieteng ;
Ros, Montserrat .
IEEE INTERNET OF THINGS JOURNAL, 2024, 11 (05) :7974-7988
[28]   Boosting the Quality of Approximate String Matching by Synonyms [J].
Lu, Jiaheng ;
Lin, Chunbin ;
Wang, Wei ;
Li, Chen ;
Xiao, Xiaokui .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 2015, 40 (03)
[29]   Approximate Semantic Matching of Events for the Internet of Things [J].
Hasan, Souleiman ;
Curry, Edward .
ACM TRANSACTIONS ON INTERNET TECHNOLOGY, 2014, 14 (01)
[30]   Faster Approximate String Matching for Short Patterns [J].
Bille, Philip .
THEORY OF COMPUTING SYSTEMS, 2012, 50 (03) :492-515