GATE Computer ScienceHardGATE CS · ISRO

How many LR(0) items does the grammar S → a S b | S S | ε | c d have (the ε-production contributes one item; do not count the augmented production)?

  1. A. 10
  2. B. 12
  3. C. 11
  4. D. 9

Correct answer: C. 11

A production with k right-hand symbols gives k + 1 items: 4 + 3 + 1 + 3 = 11.

More Compiler Design questions

Exams that ask this topic