Computer Science EngineeringHardISRO SC

Consider the grammar S -> AB; A -> aA | a; B -> bB | b. The canonical LR(0) collection (with the augmented production S' -> start symbol) has how many states?

  1. A. 9
  2. B. 7
  3. C. 10
  4. D. 8

Correct answer: D. 8

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

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

Exams that ask this topic