Download presentation
Presentation is loading. Please wait.
Published byColin Greene Modified over 9 years ago
1
An Improved Algorithm to Accelerate Regular Expression Evaluation Author : Michela Becchi 、 Patrick Crowley Publisher : ANCS’07 Presenter : Wen-Tse Liang Date : 2010/11/17 1
2
Introduction D 2 FA Improved Algorithm Experiment Evaluation Outline 2
3
Kumar et al. [9] observe that many states in DFAs have similar sets of outgoing transitions. Substantial space savings in excess of 90% are achievable in current rule-sets when this redundancy is exploited. The proposed automaton, called a Delayed Input DFA (D 2 FA), replaces redundant transitions common to a pair of states with a single default transition. 3 Introduction
4
In this paper, we propose an improved yet simplified algorithm for building default transitions that addresses these problems. On practical data sets, the level of compression achieved is similar than the original D 2 FA scheme, while providing a superior worst-case memory bandwidth bound. 4 Introduction
5
Consider two states u and v, where both u and v have a transition labeled by the symbol a to a common third state w, and no default transition. If we introduce a default transition from u to v, we can eliminate the a-transition from u without affecting the destination state function δ(x). 5 D 2 FA
6
6 two automata on the input string aabdbc.
7
Note that by the same reasoning, if there are multiple symbols a, for which u has a labeled outgoing edge and for which δ(a,u)=δ(a,v), the introduction of a default edge from u to v allows us to eliminate all these edges. 7 D 2 FA
8
8
9
The edge joining a pair of vertices (states) u and v is assigned a weight w(u,v) that is one less than the number of symbols a for which δ(a,u)=δ(a,v). 9 D 2 FA
10
The natural way to avoid long default paths is to construct a maximum weight spanning tree with a specified bounded diameter. 10 D 2 FA
11
Diameter bound of 4 11 D 2 FA
12
Diameter bound of 2 12 D 2 FA
13
in order to propose a more general compression algorithm which leads to a traversal time bound independent of the maximum default transition path length. we define its depth as the minimum number of states visited when moving from s0 to s in the DFA. In other words, the initial state s0 will have depth 0, the set of states S1 directly reachable from s0 will have depth 1, the set of states S2 directly reachable from any of the S1 (but not from s0) will have depth 2, and so on. 13 Improved Algorithm
14
Lemma: If none of the default transitions in a D 2 FA lead from a state with depth di to a state of depth dj with dj ≥ di, then any string of length N will require at most 2N state traversals to be processed. In other words, a 2N time bound is guaranteed on all D 2 FA having only “backwards” transitions. In a sense, this can be thought of as a generalization of to regular expressions. 14 Improved Algorithm
15
15 Improved Algorithm
16
16 Experiment Evaluation
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.