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 条
[41]   Text Scanning approach for Exact String Matching [J].
Zubair, Muhammad ;
Wahab, Fazal ;
Hussain, Iftikhar ;
Ikram, Muhammad .
2010 INTERNATIONAL CONFERENCE ON NETWORKING AND INFORMATION TECHNOLOGY (ICNIT 2010), 2010, :118-122
[42]   Approximate Matching for Run-Length Encoded Strings Is 3SUM-Hard [J].
Chen, Kuan-Yu ;
Hsu, Ping-Hui ;
Chao, Kun-Mao .
COMBINATORIAL PATTERN MATCHING, PROCEEDINGS, 2009, 5577 :168-179
[43]   On-line approximate string matching with bounded errors [J].
Kiwi, Marcos ;
Navarro, Gonzalo ;
Telha, Claudio .
THEORETICAL COMPUTER SCIENCE, 2011, 412 (45) :6359-6370
[44]   Unified framework for fast exact and approximate search in dissimilarity spaces [J].
Skopal, Tomas .
ACM TRANSACTIONS ON DATABASE SYSTEMS, 2007, 32 (04)
[45]   Exact and approximate size reduction for the bin packing problem with conflicts [J].
Zahrouni, Wassim ;
Kamoun, Hichem .
INTELLIGENT DECISION TECHNOLOGIES-NETHERLANDS, 2025, 19 (03) :1822-1836
[46]   Path probability ratios for Langevin dynamics-Exact and approximate [J].
Kieninger, S. ;
Keller, B. G. .
JOURNAL OF CHEMICAL PHYSICS, 2021, 154 (09)
[47]   On mining approximate and exact fault-tolerant frequent itemsets [J].
Liu, Shengxin ;
Poon, Chung Keung .
KNOWLEDGE AND INFORMATION SYSTEMS, 2018, 55 (02) :361-391
[48]   Detecting negative eigenvalues of exact and approximate Hessian matrices in optimization [J].
Hare, Warren ;
Royer, Clement W. .
OPTIMIZATION LETTERS, 2023, 17 (08) :1739-1756
[49]   Squeakr: an exact and approximate k-mer counting system [J].
Pandey, Prashant ;
Bender, Michael A. ;
Johnson, Rob ;
Patro, Rob .
BIOINFORMATICS, 2018, 34 (04) :568-575
[50]   A STUDY OF PATTERN-MATCHING ALGORITHMS [J].
PIRKLBAUER, K .
STRUCTURED PROGRAMMING, 1992, 13 (02) :89-98