1.

Which of the following is the correct representation of grammar for the given regular expression? a(aUb)*b(a) (1) S → aMb (2) M → e (3) M → aM (4) M → bM(b) (1) S → aMb (2) M → Mab (3) M → aM (4) M → bM(c) (1) S → aMb (2) M → e (3) M → aMb (4) M → bMa(d) None of the mentionedI had been asked this question in final exam.My question is based upon DPDA and Context Free Languages in chapter Push Down Automata of Automata Theory

Answer»

Correct option is (a) (1) S → aMb (2) M → e (3) M → aM (4) M → bM

Easy explanation: The basic idea of grammar FORMALISMS is to CAPTURE the structure of STRING by

a) using special symbols to stand for substrings of a particular structure

b) using rules to SPECIFY how the substrings are COMBINED to form new substrings.



Discussion

No Comment Found

Related InterviewSolutions