Download presentation
Presentation is loading. Please wait.
Published byCollin Grant Modified over 8 years ago
1
Author : Tzu-Fang Sheu,Nen-Fu Huang and Hsiao-Ping Lee Publisher : IEEE Globecom, 2006 Presenter : Tsung-Lin Hsieh Date : 2012/05/16 1
2
Introduction Related Work A Cost-Effective String Matching Algorithm Results 2
3
The Aho-Corasick algorithm (AC) had the best worst-case computational time complexity( compared to other algorithms [1] ~ [7]). But is also needs a lot of memory. Tuck et al modified the AC with a compressed data structure, which reduced the memory size, but also increased the processing time[10]. 3
4
In this paper, we will propose a practical multiple- pattern matching algorithm that has better worst- case performance as well as smaller required memory. The proposed novel scheme is based on the property of Chinese Remainder Theorem and contributes modifications to the AC. 4
5
Aho-Corasick Algorithm each node – 1028 bytes -> too much memory 5
6
Aho-Corasick Algorithm with Bitmap It can reduce the memory to only 44 bytes/per state But it needs doing “popcount” to calculate the offset of the starting pointer -> too much time 6
7
Assume that we can find a simple function so that the input symbols {h,s,i} can be mapped to {0,1,2} Assume that there is a magic number X 7
8
8
9
For example, assume we have three valid symbols {h, s, i} that have paths to the child state as shown in Figure 3. Assign three prime numbers {2, 3, 5} for {h, s, i} respectively. We want to find X % 2 = 0,X % 3 = 1,X % 5 = 2. According to CRT -> X = 22 Using “s” for test,prime represent “s” is 3. 22 % 3 = 1 -> when input is “s”,visit child 1. 9
10
The Multiple-Pattern Matching with a Magic Number Input “ish” 10 52 bytes
11
11
12
ACO-100 means penalty of external access is 100 cycles 12
13
As the required time and memory are usually trade- off, to compare the overall costs of these three algorithms, we define an evaluation function C: C = C M × C T. (C M : total memory, C T : average time) 13
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.