Computer Science EngineeringHardISRO SC

For the grammar S -> A b | B c; A -> a A | epsilon; B -> a B | d, how many total LR(0) items (all dotted positions over all productions, excluding the augmented rule) exist?

  1. A. 15
  2. B. 16
  3. C. 14
  4. D. 17

Correct answer: A. 15

A production with rhs length k has k+1 items (an epsilon production has 1): total 15.

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

Exams that ask this topic