Construct minimal DFA over ∑={a,b} which accepts L={a power n and b power n | n, m>=1}


SOLUTION:

∑={a,b}

L =  {ab, aab, abb, aabb, aaabb, …….. }

Ø  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
D
    q1
 q1
q2
    *q2
D
q2
      D
D
D

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

Comments

  1. Here a to the power n and b to the power n is given it means the number of a and b should be same here.
    But for this dfa it is not maintained

    ReplyDelete

Post a Comment

Search related post on google