Professional Documents
Culture Documents
construct DFA, NFA construct regular expression show L is the union, concatenation, intersection (regular operations) of regular languages.
Showing non-regular
pumping lemma assume regular, apply closure properties of regular languages and obtain a known non-regular language.
1
Outline
Equivalence of a state in a DFA regular languages Minimization of DFA smallest possible DFA for a given regular language
Example (cont)
A: No, they can be unified as illustrated below. Q: Can any other states be unified because any subsequent string suffixes produce identical results?
b 0 a 1 f 0 d 1 1 0
5
1 e
0 0,1
0,1 cg
Example (cont)
A: Yes, b and f. Notice that if youre in b or f then: if string ends, reject in both cases if next character is 0, forever accept in both cases if next character is 1, forever reject in both cases So unify b with f. b
0 a 1 f 0 d 1 1 0
6
1 e
0 0,1
0,1 cg
Example (cont)
Intuitively two states are equivalent if all subsequent behavior from those states is the same. Come up with a formal characterization of state equivalence. Q: Any other ways to simplify the automaton?
0,1 a 0,1 bf 0 d 1 1 0
7
0,1
cg
Example (cont)
A: Get rid of d. i.e. Getting rid of unreachable useless states doesnt affect the accepted language.
0,1 a 0,1 bf 1 0
8
0,1
cg
10
Minimization of DFAs
Example:
The DFA has equivalence classes {{A,E}, {B,H}, {C}, {D,F}, {G}}
11
Equivalence Class
Transitivity: If p q and q r, then p r Proof: Suppose to the contrary that p r Then w : H * ( p, w) F & H * ( r , w) F or vice versa. Now H * ( q, w) is either accepting or not If H * ( q, w) F q | r Otherwise H * ( q, w) F p | q The vice versa case is proved symmetrically
@p|r
12
13
Example
Can be minimized to
K ({ A, E},0} ! B / | ! H / | ! {B, H } 3 H ( A,0) ! B H ( E ,0) ! H & K ({ A, E},1} ! D / | ! F / | ! {D, F } 3 H ( A,1) ! F H ( E ,1) ! F
14
q | q 3 L( B) ! L(C ) B C Also H ( q0 , a ) | H ( q0 , a ), a
B 0
C 0
B 0
C 0
16
Since C has fewer states than B, there must be two states r & s of B s.t. r | t | s For some state t of C. But r | s CONTRADICTION!!
17