1.

Simplify the given grammar:A-> a| aaA| abBcB-> abba| b (a) A-> a| aaA| ababbAc| abbc(b) A-> a| aaA| ababbAc| abbc, B-> abba|b(c) A-> a| aaA| abbc, B->abba(d) None of the mentionedThe question was asked in an online interview.My enquiry is from CFG-Eliminating Useless Symbols in division Properties of Context Free Languages of Automata Theory

Answer»

Correct CHOICE is (a) A-> a| aaA| ababbAc| abbc

For explanation I would say: Using the SUBSTITUTION rules, we can simply ERADICATE what is useless and thus produce the SIMPLIFIED result i.e. A-> a| aaA| ababbAc| abbc.



Discussion

No Comment Found

Related InterviewSolutions