Computer Science EngineeringHard

A string of length 5 is derived in a grammar in Chomsky normal form. How many derivation steps are required?

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

Correct answer: A. 9

CNF needs 2n - 1 steps for a string of length n, so 2*5 - 1 = 9.

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

Exams that ask this topic