Construct minimal DFA which accepts set of all strings over ∑={a,b} in which every ‘a’ should never be followed by ‘bb’.
SOLUTION:
∑={a,b}
L = {∈,b, bb, bbb,………,a, aa, aaa, ……., ab, aab, baab, ……….
}
Ø So DFA can be Q={ q0 , q1 , q2},∑={a,b}, q0={ q0},F={q2} and δ is given by the table
1)Transition
diagram:
2)Transition Table:
Present State
|
Next State
|
|
Input a
|
Input b
|
|
à *q0
|
q1
|
q0
|
* q1
|
q1
|
q2
|
*q2
|
q1
|
D
|
D
|
D
|
D
|
3)Transition function:
δ( q0, a)= q1 ,δ
(q0,b)= q0
δ( q1, a)= q1 ,δ (q1,b)= q2
δ( q2, a)= q1 ,δ
(q2,b)= D
δ( D, a)= D ,δ (D, b)= D
Nice website, accurate content and information
ReplyDelete