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
关键词
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 black box for online approximate pattern matching
    Clifford, Raphael
    Efremenko, Klim
    Porat, Benny
    Porat, Ely
    INFORMATION AND COMPUTATION, 2011, 209 (04) : 731 - 736
  • [32] Strict approximate pattern matching with general gaps
    Youxi Wu
    Shuai Fu
    He Jiang
    Xindong Wu
    Applied Intelligence, 2015, 42 : 566 - 580
  • [33] A black box for online approximate pattern matching
    Clifford, Raphael
    Efremenko, Klim
    Porat, Benny
    Porat, Ely
    COMBINATORIAL PATTERN MATCHING, 2008, 5029 : 143 - +
  • [34] NetDAP: (δ, γ)-approximate pattern matching with length constraints
    Wu, Youxi
    Fan, Jinquan
    Li, Yan
    Guo, Lei
    Wu, Xindong
    APPLIED INTELLIGENCE, 2020, 50 (11) : 4094 - 4116
  • [35] State Complexity of Neighbourhoods and Approximate Pattern Matching
    Ng, Timothy
    Rappaport, David
    Salomaa, Kai
    INTERNATIONAL JOURNAL OF FOUNDATIONS OF COMPUTER SCIENCE, 2018, 29 (02) : 315 - 329
  • [36] An Efficient Algorithm for Approximate Pattern Matching with Swaps
    Campanelli, Matteo
    Cantone, Domenico
    Faro, Simone
    Giaquinta, Emanuele
    PROCEEDINGS OF THE PRAGUE STRINGOLOGY CONFERENCE 2009, 2009, : 90 - 104
  • [37] MULTIPLE FILTRATION AND APPROXIMATE PATTERN-MATCHING
    PEVZNER, PA
    WATERMAN, MS
    ALGORITHMICA, 1995, 13 (1-2) : 135 - 154
  • [38] A linear size index for approximate pattern matching
    Chan, Ho-Leung
    Lam, Tak-Wah
    Sung, Wing-Kin
    Tama, Siu-Lung
    Wong, Swee-Seong
    JOURNAL OF DISCRETE ALGORITHMS, 2011, 9 (04) : 358 - 364
  • [39] Faster Approximate Pattern Matching: A Unified Approach
    Charalampopoulos, Panagiotis
    Kociumaka, Tomasz
    Wellnitz, Philip
    2020 IEEE 61ST ANNUAL SYMPOSIUM ON FOUNDATIONS OF COMPUTER SCIENCE (FOCS 2020), 2020, : 978 - 989
  • [40] State Complexity of Neighbourhoods and Approximate Pattern Matching
    Ng, Timothy
    Rappaport, David
    Salomaa, Kai
    DEVELOPMENTS IN LANGUAGE THEORY (DLT 2015), 2015, 9168 : 389 - 400