2,335 views

2 Answers

5 votes
5 votes

While solving these type of questions simply use one trick.

Take variable on LHS, from that variable draw output operations such as :

S -> bS

means S on seeing b goes to S again.

S --> aA

means S on seeing a goes to A.

Overall DFA is :

Let input string is aaa.

By using Grammar : S --> aA --> aaB --> aaa.

Using DFA : (S, a) = A

(A,a) = B

(B,a) = S accepted.

edited by

Related questions

1 votes
1 votes
1 answer
1
sushmita asked Sep 16, 2018
678 views
In converting right linear regular grammar to DFA how to determine the final states?Can anyone tell the procedure?
1 votes
1 votes
1 answer
2
sripo asked Oct 13, 2018
1,242 views
For the given GrammarS->aA|bBA->bC|aSB->aC|bSC->aB|bA Construct DFA I am getting confused in understanding how to take the final state.
1 votes
1 votes
1 answer
3
Abbas Ahmad asked Nov 30, 2018
400 views
If a grammar G is both left linear as well as right linear then,what should be the case a) G is always not regularb) G may or may not be regularc) something else