GATE Computer ScienceModerateGATE CSE

A grammar in Chomsky normal form (no ε-productions) is used to derive a string of length 9. How many derivation steps (production applications) are needed?

  1. A. 17
  2. B. 9
  3. C. 16
  4. D. 18

Correct answer: A. 17

A string of length n needs n − 1 binary-rule steps and n terminal-rule steps: 8 + 9 = 17.

More Theory of Computation questions

Exams that ask this topic