NFA example Set-1
Example-1:Design the NFA transition diagram for transition table as given below
Present State
|
Next State
|
|
Input 0
|
Input 1
|
|
à q0
|
{q0,q1}
|
{q0,q2}
|
q1
|
{q3}
|
-
|
q2
|
{q2,q3}
|
{q3}
|
*q3
|
{q3}
|
{q3}
|
Here the NFA is M= ( {q0,q1, q2, q3},{0,1}, δ , q0, {q3})
Example-02: Design the NFA transition diagram M= ( {q0,q1, q2 }, δ , q1, {q3}) ,Where δ is given by
Example-02: Design the NFA transition diagram M= ( {q0,q1, q2 }, δ , q1, {q3}) ,Where δ is given by
δ( q1 , 0)= {q2,q3} ,δ
(q1,1)= {q1}
δ( q2, 0)= {q1,q2} ,δ (q2,1)= ∅
δ( q3, 0)= {q2} ,δ (q3,1)= {q1,q2}
Example-03: Construct a NFA for a language which accepts all the strings in which third symbol from right end is always ‘a’
Example-04: Construct a NFA accepting all the strings ending with 01 over ∑={0,1}
Example-04: Construct a NFA accepting all the strings ending with 01 over ∑={0,1}
Example-05: Construct a NFA to accept strings whichend with ‘aa’ over ∑={a,b}
Example-06: Construct a NFA to accept strings witheither two consecutive 0’s or twoconsecutive 1’s over ∑={0,1}
Example-06: Construct a NFA to accept strings witheither two consecutive 0’s or twoconsecutive 1’s over ∑={0,1}
Example-07: Construct a NFA to accept language L={w|w contain an even number of 0’s or exactly two 1’s} over ∑={0,1}
Comments
Post a Comment