Java Reference
In-Depth Information
Then, renumber the states and re-compute the moves for the new (possibly smaller) set
of states, based on the old moves on the original set of states.
Let us quickly run through one additional example, starting from a regular expression,
producing an NFA, then a DFA, and finally a minimal DFA.
Example. Consider the regular expression, (ajb)baa. Its syntactic structure is illustrated
in Figure 2.20.
FIGURE 2.20 The syntactic structure for (ajb)baa.
Given this, we apply the Thompson's construction for producing the NFA illustrated in
Figure 2.21.
FIGURE 2.21 An NFA recognizing (ajb)baa.
Using the powerset construction method, we derive a DFA having the following states:
s 0 : f0; 1; 2; 4; 7; 8g;
m(s 0 ;a) : f1; 2; 3; 4; 6; 7; 8g = s 1 ;
m(s 0 ;b) : f1; 2; 4; 5; 6; 7; 8; 9; 10g = s 2 ;
m(s 1 ;a) : f1; 2; 3; 4; 6; 7; 8g = s 1 ;
m(s 1 ;b) : f1; 2; 4; 5; 6; 7; 8; 9; 10g = s 2 ;
m(s 2 ;a) : f1; 2; 3; 4; 6; 7; 8; 11; 12g = s 3 ;
m(s 2 ;b) : f1; 2; 4; 5; 6; 7; 8; 9; 10g = s 2 ; and
m(s 3 ;a) : f1; 2; 3; 4; 6; 7; 8; 13g = s 4 :
 
Search WWH ::




Custom Search