Computer Science EngineeringHardISRO SC

Consider the grammar S -> aAd | bBd | aBe | bAe; A -> c; B -> c. The canonical LR(0) collection (with the augmented production S' -> start symbol) has how many states?

  1. A. 14
  2. B. 13
  3. C. 12
  4. D. 15

Correct answer: B. 13

Build closure and goto sets from {S' -> .S}; the automaton has 13 states.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic