in Theory of Computation
2,084 views
1 vote
1 vote

Whats The Answer & How to solve such kind of Questions ?

in Theory of Computation
by
2.1k views

4 Comments

Since given grammer is CFG you can't make a DFA out of it
But you can make regular expression from it which can help you answer the question but that might took some time :D
0
0
Oh right right !!
I forgot Its  a CFG so can't be converted to DFA
Thanks For the help :)
0
0
Option b
0
0

1 Answer

1 vote
1 vote
Best answer
First they should have to mentioned start state here I assuming X as a start state because x is only state from which all other state are reachable, minimum length string generate by x is a

X->Y

Y-> A from here itself we can say answer is b

Now state X and Y assure that already one a is extra either at beginning or end or both side

State S,A,B ensure number of a= number of b

S,A,B cannot be reached without X hence option b is correct
selected by

1 comment

bro what if you assume start symbol as S then answer would be equal number of a's and b's
1
1