RGPV 2020
Construct a NDFA accepting all string in {a,b} with either two consecutive a’s or two consecutive b's.
Ans.
|
State |
Input 0 |
Input 1 |
|
->q0 |
q0 |
q0, q1 |
|
q1 |
- |
*q2 |
|
q2 |
- |
- |
|
State |
Input a |
Input b |
|
->q0 |
q0 |
{q0, q1} |
|
{q0, q1} |
q0 |
*{q0, q1, q2} |
|
*{q0, q1, q2} |
q0 |
*{q0, q1, q2} |