1.

For the following grammar: S → A | B | 2 A → C0 | D B → C1 | E C → D | E | 3 D → E0 | S E → D1 | S Identify all the unit pairs.(a) D,C(b) A,B(c) B,C(d) A,CThe question was posed to me during an internship interview.My question is based upon The NFA with n-moves to the DFA in portion Finite Automata and Regular Expression of Compiler

Answer»

Correct choice is (a) D,C

The explanation is: The cycle of unit-productions S → A → D → S says that any PAIR INVOLVING only S, A, and D is a unit pair. Similarly, the cycle S → B → E → S tells US that any pair involving S, B, and E is a unit pair.



Discussion

No Comment Found

Related InterviewSolutions