587 HW due Wednesday 4/20//05
Consider a regular expression, its FSM, and its equivalent table:

|
stateNumber |
characterEaten |
nextState1 |
NextState2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rules:
0: initialize deque to initial state,
eat
1: If current character to match and character in state at head
are the same, dequeue state and append successor
state to tail.
2:
Conclusions:
Does
New
Applicable Deque Conclusion
Rule State
(rule 0) 1
eat
(rule 1) eat
2
(rule 4) 2
eat
(rule 3) 6
3 eat
(rule 3) 5
7 3 eat
(rule 1) 7
3 eat 6
(rule 3) 4
3 eat 6 C2: MATCH
(rule 3) 3
eat 6
(rule 2) eat
6
(rule 4) 6
eat
(rule 3) 5
7 eat
(rule 2) 7
eat
(rule 3) 4
eat C2: MATCH
(rule
3) eat C3: TERMINATE
HW problem #1: what would be
the sequence of events if the string was "Z"?
HW problem #2: what would the sequence of events be if the string was
"ACC"?