Design DFA to accepts L , where L is set of strings in which 'a' always appears tripled over ∑={a,b}


SOLUTION:

∑={a,b}

L = {aaa, aaab, baaa, baaab, bbaaa,……… }

Ø  So DFA can be Q={ q0 , q1 , q2 ,q3 },∑={a,b}, q0={ q0},F={q3} and δ is given by the table

1)Transition diagram:




   2)Transition Table:

Present State
Next State
Input a
Input b
à q0
q1
q0
    q1
 q2
D
    q2
q3
D
   *q3
q1
q3
D
D
D

  3)Transition function:
δ( q0, a)= q1     ,δ (q0,b)= q0
            δ( q1, a)= q2     ,δ (q1,b)= D    
δ( q2, a)= q3     ,δ (q2,b)= D
δ( q3, a)= q1     ,δ (q2,b)= q3
δ( D, a)= D      ,δ (D, b)= D

Comments

Post a Comment

Search related post on google