in Theory of Computation
3,170 views
0 votes
0 votes
Which of the following CFG’s can’t be simulated by an FSM ?
a. S->Sa/b
b. S->aSb/ab
c. S->abX, X->cY, Y->d/aX
d. None of these
in Theory of Computation
by
3.2k views

3 Comments

B) ..
0
0
plz tell me  solution /reason
0
0

S->aSb/ab

If you try to check what strings the grammar generates then you will find that they are in the form of {anbn/n>0}.

S->aSb>aaSbb->aaaSbbb->aaaabbbb (like this)

This can't be a regular language because we have to remember the count of a and match it with b. In FSM we don't have any mechanism to "remember" anything..

0
0

1 Answer

2 votes
2 votes
Best answer
Answer is B). S->aSb/ab

Because its language contains L = {ab,aabb,aaabbb......} = a^nb^n;for which Finite state machine is not possible
selected by

Related questions