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 条
  • [1] Optimal exact and fast approximate two dimensional pattern matching allowing rotations
    Fredriksson, K
    Navarro, G
    Ukkonen, E
    COMBINATORIAL PATTERN MATCHING, 2002, 2373 : 235 - 248
  • [2] Exact and approximate rhythm matching algorithms
    Chan, Joseph Wun-Tat
    Iliopoulos, Costas S.
    Michalakopoulos, Spiros
    Rahman, M. Sohel
    INTERNATIONAL JOURNAL ON DIGITAL LIBRARIES, 2012, 12 (2-3) : 149 - 158
  • [3] Exact and approximate rhythm matching algorithms
    Joseph Wun-Tat Chan
    Costas S. Iliopoulos
    Spiros Michalakopoulos
    M. Sohel Rahman
    International Journal on Digital Libraries, 2012, 12 (2-3) : 149 - 158
  • [4] Approximate Pattern Matching Algorithm
    Hurtik, Petr
    Hodakova, Petra
    Perfilieva, Irina
    INFORMATION PROCESSING AND MANAGEMENT OF UNCERTAINTY IN KNOWLEDGE-BASED SYSTEMS, IPMU 2016, PT I, 2016, 610 : 577 - 587
  • [5] On approximate pattern matching with thresholds
    Zhang, Peng
    Atallah, Mikhail J.
    INFORMATION PROCESSING LETTERS, 2017, 123 : 21 - 26
  • [6] APPROXIMATE PATTERN-MATCHING
    MANBER, U
    WU, S
    BYTE, 1992, 17 (12): : 281 - +
  • [7] Streaming Pattern Matching with d Wildcards
    Golan, Shay
    Kopelowitz, Tsvi
    Porat, Ely
    ALGORITHMICA, 2019, 81 (05) : 1988 - 2015
  • [8] Streaming Pattern Matching with d Wildcards
    Shay Golan
    Tsvi Kopelowitz
    Ely Porat
    Algorithmica, 2019, 81 : 1988 - 2015
  • [9] EXACT AND APPROXIMATE ALGORITHMS FOR UNORDERED TREE MATCHING
    SHASHA, D
    WANG, JTL
    ZHANG, KZ
    SHIH, FY
    IEEE TRANSACTIONS ON SYSTEMS MAN AND CYBERNETICS, 1994, 24 (04): : 668 - 678
  • [10] Approximate Ellipsoid in the Streaming Model
    Mukhopadhyay, Asish
    Sarker, Animesh
    Switzer, Tom
    COMBINATORIAL OPTIMIZATION AND APPLICATIONS, PT II, 2010, 6509 : 401 - 413