GATE Computer ScienceModerateGATE CS (PYQ pattern)

A grammar in Greibach normal form generates a string of length 15. How many derivation steps does any derivation of it take?

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

Correct answer: B. 15

Every GNF production starts with a terminal, so each step produces exactly one terminal symbol: n = 15 steps.

More Theory of Computation questions

Exams that ask this topic