GATE Computer ScienceModerateGATE CSE

A grammar in Chomsky normal form generates a string of length 17. How many derivation steps (production applications) does any derivation of that string take?

  1. A. 34
  2. B. 16
  3. C. 17
  4. D. 33

Correct answer: D. 33

In CNF, n−1 = 16 binary productions build the tree and n = 17 terminal productions finish it: 2n − 1 = 33.

More Theory of Computation questions

Exams that ask this topic