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 条
[31]   A Hybrid Architecture for the Approximate String Matching on an FPGA [J].
Wada, Takuma ;
Funasaka, Shunji ;
Nakano, Koji ;
Ito, Yasuaki .
2017 FIFTH INTERNATIONAL SYMPOSIUM ON COMPUTING AND NETWORKING (CANDAR), 2017, :48-57
[32]   Approximate string matching: A simpler faster algorithm [J].
Cole, R ;
Hariharan, R .
SIAM JOURNAL ON COMPUTING, 2002, 31 (06) :1761-1782
[33]   Faster Approximate String Matching for Short Patterns [J].
Philip Bille .
Theory of Computing Systems, 2012, 50 :492-515
[34]   Real-Time Streaming String-Matching [J].
Breslauer, Dany ;
Galil, Zvi .
COMBINATORIAL PATTERN MATCHING, 22ND ANNUAL SYMPOSIUM, CPM 2011, 2011, 6661 :162-172
[35]   Real-Time Streaming String-Matching [J].
Breslauer, Dany ;
Galil, Zvi .
ACM TRANSACTIONS ON ALGORITHMS, 2014, 10 (04)
[36]   Hardness of Permutation Pattern Matching [J].
Jelinek, Vit ;
Kyncl, Jan .
PROCEEDINGS OF THE TWENTY-EIGHTH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS, 2017, :378-396
[37]   Nonlinear pattern matching in trees [J].
Ramesh, R. ;
Ramakrishnan, I.V. .
Journal of the ACM, 1992, 39 (02) :295-316
[38]   Compressed parameterized pattern matching [J].
Beal, Richard ;
Adjeroh, Donald .
THEORETICAL COMPUTER SCIENCE, 2016, 609 :129-142
[39]   Incremental Graph Pattern Matching [J].
Fan, Wenfei ;
Wang, Xin ;
Wu, Yinghui .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 2013, 38 (03)
[40]   Secure parameterized pattern matching [J].
Zarezadeh, Maryam ;
Mala, Hamid ;
Ladani, Behrouz Tork .
INFORMATION SCIENCES, 2020, 522 :299-316